Table Explorer displays an overview of the workspace's database. A treeview displays each table, table columns, indexes, relationships and data dictionary classes.
Use the Table Explorer to:
Review the composition of each database table.
Select table columns and indexes to view their detailed attribute values.
Open Tables for structural editing.
Open Data Dictionaries in the Data Dictionary Modeler.
Manage the collection of database tables and registered data dictionaries.
DataFlex maintains a list of tables for each workspace in a special file called FileList.cfg. The FileList associates each table name with a table number and two other attributes.
Table Explorer displays each table that is registered in the current workspace's FileList. The tables can be sorted alphabetically (by table name), or sorted by table number.
For more information about FileLists, see The Filelist.
The Table Editor treeview displays the composition of tables in the workspace's FileList. Each table item can be expanded to reveal its composition of columns, indexes, relationships to parent tables, and data dictionary classes.
Below is an explanation of the different icons in the treeview and what each one represents:
- Table: This displays the table name and, optionally, the table number. Expand this item to view items representing the table's composition. Hover the mouse over this item to view a longer description of the table.
- Table Column Collection: Expand this item to view a list of all columns defined for the selected table.
- Table Column: This displays the column name. Hover the mouse over this item to view the column number, data type, size, and numeric precision.
- Table Index Collection: Expand this item to view a list of all indexes (sorting orders) for the selected table.
- Table Index: This displays the index's ordinal number, e.g. "Index 1". Expand this item to view the set of column segments that define this index.
- Table Relationship Collection: Expand this item to view a list of all parent table relationships defined for the selected table.
- Table Relationship: This displays the table name for the parent table in this relationship. Expand this item to view the Foreign Key to Parent Primary Key column parings that define this relationship.
- Data Dictionary Collection: Expand this item to view all data dictionary classes that are bound to the selected table and have been 'registered' in the current workspace.
See Managing the Database and Data Dictionaries (below) for more information about registering data dictionaries.
- Data Dictionary (default for table): This item represents the default data dictionary class for the selected table. The default data dictionary is the one that is automatically chosen when you create a view's data dictionary object (DDO) structure with the DDO Explorer.
You can modify which data dictionary class is the default class for the selected table by selecting the data dictionary tree item and choosing "Set as Default Data Dictionary" from the context menu.
- Data Dictionary (alternate): This item represents a data dictionary class for the selected table that is not the default data dictionary. Each table should have one (and only one) default data dictionary.
You can configure Table Explorer to sort the tables by table name or by table number. For more information, see Configure Studio.
Selecting certain items in the treeview will display the full set of table attributes relating to that item in the Properties Panel. Specifically:
• Select a table item to display the table's attributes.
• Select a table column to display the column's attributes.
• Select an index to display the index's attributes.
• Select an index segment column to display the index segment's attributes.
These attribute values will be read-only, unless the table has been opened for structural editing in the Table Editor. In this case you will also be able to edit the displayed attributes.
To begin editing a table's structure, double-click the desired table item in the treeview. This will open the Table Editor where you can begin editing the table's structure. Alternatively, you can select a table in the treeview and click the "Open Table" button in the toolbar, or select "Open Table from the context menu.
To begin editing a table's data dictionary class, expand the desired table's tree item. This reveals collection items for the table's columns, indexes, relationships and data dictionaries. Expand the data dictionaries collection; this reveals the set of data dictionary classes that have bindings to this table. Usually there will be only one. Double-click the desired data dictionary. This will open the data dictionary in the Data Dictionary Modeler view. Alternatively, you can select the data dictionary in the treeview and select "Open Data Dictionary" from the context menu.
The Table Explorer context menu and Toolbar can perform various operations on the collection of tables in the database and the collection of data dictionaries for each table. See Toolbar (below) and Table Explorer Context Menus, for details.
Additional database manipulation options are available from the Database main menu and additional data dictionary collection maintenance can be performed from the Tools main menu.
Click this button to create a new table for the workspace's database. This activates the Create New Table dialog.
Click this button to activate the Remove Table dialog. This dialog is used to perform one of two possible operations:
Remove the selected table from the workspace's FileList. This does not delete the table or the data contained within it. Instead it will remove the table's entry from the workspace's registry file (Filelist.cfg).
Delete the selected table. This physically deletes the table and its data from the workspace's database.
Click this button to open the selected table in the Table Editor window. This allows you to edit the table's structure of columns, indexes and relationships.
Click this button to refresh the workspace's definition of the selected table.
This option does not touch the tables or the .int files. It rebuilds the .CCH, .FD and .DD files. If an external change has been made to a table that does not require that the .int file gets updated (and most do not), then refresh does what you need. If the .int file needs updating, you can do this by reconnecting the tables via the wizards or by manually updating the .int files yourself.
If the Studio is configured to save .DEF files then this option will also rebuild the table’s (.DEF) file. See Configure Studio - Database for more information.
Note: .DEF files are only designed to work with the embedded database. For other databases, we recommend using the native tools of the database you are working with to maintain table definitions.
Click this button to change the sort order of tables in the Table Explorer. When the button is checked, then the tables are sorted alphabetically using the table name. When it is unchecked, then the tables are sorted using the tables' FileList number.
Click this button to activate the Table Explorer Filter Settings dialog. This dialog is used to apply filters to the set of tables displayed within Table Explorer.
While a filter is being applied to Table Explorer this toolbar button is highlighted.
Click this button to open the SQL Connection Manager.