Table Editor
Use the Table Editor to create and edit table definitions for your workspace’s database. You can only define tables for databases that are connected to the current workspace. You define a table by creating and editing columns, relationships, indexes, and table attributes.
Data Entry
Table Name and Number
This displays the name given to the table followed by a unique table number in parentheses. These values are assigned to the table when it is created and cannot be edited within the Table Editor. For example, “Customer (25)” refers to the table named Customer that has table number position 25.
The table name is used to reference the table in your application source code. For example:
Open Customer
The table number is a unique number assigned to the table within the current workspace. It is used to reference the table internally. This value is also referred to as the ‘file number’ or ‘filelist number’. For more information about Table Number, see Create New Table and The FileList.
Description
Enter a short description for the table of up to 32 characters.
Columns Grid
The Columns Grid displays the table columns. You can create columns, delete columns, and edit column attributes. Selecting a column in the grid displays the full set of attributes for the column in the Properties Panel.
The Columns Grid can be resized relative to the Indexes and Relationships tabs by dragging the slider between these two groups.
See Defining Columns.
Indexes Tab
The Indexes Tab displays the list of indexes (ordering) and index segments. You can add and delete indexes and edit each index’s composition of column segments.
Select one of the indexes in the list to view the column segments that define the index’s sorting order. Selecting an index also displays the full set of attributes for the index in the Properties Panel.
See Defining Indexes.
Relationships Tab
The Relationships Tab displays the list of relationships to parent tables and relationship column pairs. Relationship column pairs specify the foreign key to primary key matchings for each relationship. You can add and delete relationships to parent tables and edit each relationship’s composition of foreign key to primary key column pairs.
Select one of the relationships in the list to view its foreign key to primary key column pairs.
Read-Only Tables
If a table is read-only, you are able to view its columns, indexes, relationships, and attributes, but you cannot edit its structure in any way. A read-only table is indicated in the Table Editor by the read-only icon in the status bar.
You can configure Table Editor’s ability to edit tables in the current workspace via the Configure Workspace Preferences dialog.
Saving or 'Committing' Changes
To save the changes you have made to a table definition, click the Save button on the toolbar (or use the Ctrl+S hotkey). This will commit the structural changes you have made to the database. The Studio will display progress information in the Output Panel and the status bar as these changes are being committed.
Changes that you make to a table in Table Editor are not available to the rest of the Studio's modeling tools until the changes are committed to the database. The exception to this is the Table Explorer and the Properties Panel.
The Table Explorer always displays the current state of the table's structure, including uncommitted changes; it is synchronized with the Table Editor.
The Properties Panel can be considered as an extension to the Table Editor. It displays the full set of attributes of the selected item in Table Editor and allows you to edit these attributes (note: some attributes are read-only).
If you are defining a new table, then the first time it is saved, the Studio will create a data dictionary class for the table. For a description of the naming conventions used to create the data dictionary class, see Configure Studio.
Abandoning Changes
If you have made structural changes to a table that you want to abandon, simply close the Table Editor window. You will be prompted if you want to abandon all changes since the last save.
Table Editor does not support the Studio's Undo/Redo feature.