The Table Editor
The Studio's Table Editor and Data Dictionary Modeler tools are the preferred methods for creating database tables and data dictionaries.
The Studio's Table Explorer provides a means for viewing the column structure, index structure, and other attributes of existing database tables. The Studio maintains all the directory files that make up a database, and it does so automatically.
Database tables can be modified with data in them, but it is faster and less likely to cause errors to modify empty tables before populating them with data. When the Table Editor is used to restructure a table with data, it must convert the data from the old structure to the new, a process that can consume significant time in large tables.
With the Table Editor, you can:
- Add or delete columns
- Modify existing columns
- Insert new columns at any point
The order of columns in the table is usually of no importance, but sometimes it can be. You can change the lengths of columns, their types, and their names. Changing the name of a column will render program source code that uses the obsolete names unusable until the names are updated in the source code. You can also change the table's record length, either implicitly by changing the aggregate length of its columns or explicitly by direct entry.
The Table Editor is the facility for defining a table's indexes. Any desired changes may be made, although improper changes to interrelated tables can upset table relationships. Indexes can be:
- Added
- Deleted
- Inserted
- Changed (to be either on-line, updated on each change to the database, or batch, updated only by running Reindex)
For existing indexes, segments (participating columns) can be:
- Added
- Deleted
- Inserted
- Changed (to be either ascending or descending, or case-sensitive or case-insensitive)
You can change the maximum number of records the database file may hold, which is important for the design of its index files. You can update one or all the indexes of a database file through the Table Editor.
The Table Editor also provides a means for defining relationships between tables. Defining relationships involves specifying which column (or columns) in a parent table is related to which column (or columns) in the child table. These definitions are always made in the child table, where many records may relate to a single record in the parent table (the reverse is not permitted).
Finally, the Table Editor affords the means of setting the type of data compression that should be applied to a table, as well as updating such compression in tables whose contents have changed substantially since the last time they were recompressed.