Schemas
Work with tables and columns
Tables and their columns are the foundation of a schema. You can create a table six ways, then manage its columns on the table’s own page.
In the app: Data Model › Schemas › your schema › Tables tab
Before you start¶
Creating and editing tables needs Read/Write access to the schema. Read Only users don’t see these buttons.
The Tables tab¶
The tab has a search box (it matches table names and descriptions), a Per page selector, and three buttons: Generate Descriptions, Delete Tables and Create Table. The grid shows Table Name, Description, DB Schema, Columns, Last Modified By, Created and Modified.
Create a table¶
Click Create Table and pick an option.
| Option | Use it when |
|---|---|
New Table |
You’re designing a table by hand. |
Paste Code |
You have one CREATE TABLE statement. |
Derivative Table |
You want a new table based on the columns of an existing one. |
From Template |
You want to start from a predefined reference model. |
From File |
You have a CSV, TSV or Parquet file and want its shape. |
From Database |
You want to pull objects from a saved database connection. |
New table¶
- Choose
New Table. - Enter a
Table Name(required, up to 255 characters, a valid identifier, unique in the schema) and an optional description. - Click
Create Table. The table’s page opens so you can add columns.
Paste code¶
- Choose
Paste Code. TheCreate Table from SQLdialog opens. - Paste the statement into
Paste SQL CREATE TABLE Statement. - Optionally fill in
Table Name (Optional Override)to use a different name, and a description. - Click
Parse and Create Table. Kenseme parses the DDL with AI (“Generating your table schema…”) and opens the new table.
Tip: For more than one table, use
Import Database Objects From Scripton theInfotab instead. See Start an import.
Derivative table¶
- Choose
Derivative Table. - Enter a
New Table Nameand an optionalDescription. - Pick the
Source SchemaandSource Table. - Under
Column Mapping, untick columns you don’t want and edit the new names.Suggest Namesasks AI for better names. - Click
Create Derivative Table.
From template¶
- Choose
From Template. TheSelect Template Tableswindow opens with a catalog of reference tables. - Filter by schema or type, or search, and tick the tables you want.
- Click
Done. Kenseme creates the tables, their columns and the relationships between them.
From file¶
- Choose
From File. - Enter a
Table Name. - Upload a
.csv,.tsvor.parquetfile up to 50 MB. - Click
Import and Create Table.
Column names come from the first row of a CSV or TSV file, or from a Parquet file’s schema. Types are inferred; correct them on the table page if needed.
From database¶
Choose From Database to open Import Database Objects From Connection. See Import objects from a database connection.
The table page¶
Click a table name to open it. The table page has these tabs:
Info: name (Rename Table), description, key columns, database schema, column and relationship counts, and anACTIONScard withCreate Derivative Table,Suggest NamesandBulk Add Columns. TheDelete Tablebutton is here too.Columns: the column editor (below).RelationshipsandIndexes: see Define relationships and indexes.Attributes: custom attribute values for the table.SQL: the table’s DDL for any dialect, with aUse IF (NOT) EXISTSoption. See Generate SQL for one object.Versions: the table’s history across schema versions.Governance: placeholder (“Coming soon”).
Work with columns¶
The Columns tab lists each column with its data type, constraint badges and description. A key icon marks the primary key; a link icon marks foreign keys. The toolbar has Generate Descriptions, Delete Columns, Create Index, Suggest Names, Bulk Add Columns and Add Column.
Add or edit a column¶
- Click
Add Column, or the pencil icon on a row to edit it. - Fill in the dialog:
| Field | What it does |
|---|---|
Name |
Required, up to 255 characters, a valid identifier. |
Description (Optional) |
Free text. |
Type |
The data type. Length (or Max), Precision and Scale appear when the type needs them. |
Default Value (Optional) |
The column default. |
Computed Column, Persisted, Expression (Optional) |
Make the column computed from an expression. |
Nullable |
Whether the column allows NULL. |
Primary Key |
Part of the primary key. Tick it on each column of a composite key. |
Identity Column |
Auto-numbered, with Seed and Increment. |
Unique |
Not available yet (marked “coming soon”). |
Constrain to allowed values |
For string types, limit the column to an enum. See Work with enums. |
- Click
Add ColumnorSave Changes.
Add many columns at once¶
- Click
Bulk Add Columns. - Enter one column per line. SQL-style definitions (
price DECIMAL(10,2)), comma-separated lists and plain-language descriptions all work. - Click
Add Columns. Kenseme parses the lines with AI and adds the columns.
Index columns from the grid¶
Tick one or more columns and click Create Index. The index dialog opens with those columns chosen.
Get AI naming suggestions¶
Suggest Names checks the table and column names against the schema’s naming conventions and proposes better ones.
- Click
Suggest Nameson theColumnsorInfotab. - If the table name should change, a
Rename tablerow shows the current and suggested name. It is disabled if a table with the suggested name already exists. - Each column row shows the
Original Nameand aSuggested Namedrop-down with alternatives, plus a short reason when there is one. - Tick the rows you want (or
Select All) and clickApply (N).
If everything already follows the conventions, the dialog says No naming improvements suggested. Set the conventions on the schema’s Settings tab. See Schema settings.
Delete tables and columns¶
- Select rows and click
Delete TablesorDelete Columns, or use the trash icon on a single column. - If views, procedures or other objects depend on what you’re deleting, Kenseme stops and lists the dependencies.
- Views and procedures that referenced a deleted table or column are flagged as broken on their lists. See AI in SQL object analysis.