Table Design
See also

Description
Designing tables is an important part of creating an online application. Applications usually rely heavily on data which is stored in tables. Concequently, a good table design will make the application easier to manage. A table should contain fields that are closely related as part of a record. Fields which are not related should go in another table. For instance, a table containing student records should contain the name and address of a student, but not information about the courses the student is taking; the course name and description should go in another table for course records. The two tables can be linked using a 'key', which is a field common to both tables.

Creating and Modifying Tables
Tables can be created or modified from the 'Table List' screen, which is displayed by clicking on the 'Data Tables' link in the toolbar on the left. To create a new table, click on the 'Create a new table' link at the bottom of the list. To edit an existing table, click on the 'Edit' bullet (Edit symbol) to the left of the table name in the list. This will display the table editor in which the name, description, or comments about a table may be modified. The fields of a table can be edited by clicking on the 'Edit fields' link in the table editor.

Working with Fields
The fields of a table can be edited by clicking on the 'Edit fields' link in the table editor. This will bring up the field list for that table. From here, a field can be edited by clicking on the 'Edit' bullet (Edit symbol) to the left of the field name in the list. A new field can be added to the table by clicking on the 'New' button at the bottom of the list.

When creating a new field, you will be asked first about the data type of the field you want. The type is important because it will inform the system what data is allowed for entry (e.g. only numbers in numeric fields) and how the data will be formatted for display. Click here for a list of available data types.

When editing a field, the system will display the field editor. The appearance and options on a field editor will change according to the data type of the field being edited. For instance, a formula field will have an attribute for the formula, whereas a numeric field will not have such an attribute.

The position of a field in the table is important because it reflects the position of the field in a report or a data entry/display screen. The position can be changed by editing the field and modifying the 'Sequence' attribute.

Sub-Tables
A sub-table (or nested table) is a table within a table. A sub-table is created as a new field whose type is that of the sub-table. When creating a field, you will be asked to specify the data type for that field. Among those types is a section titled 'Sub-Table Types'. Under this section, you will see a list of all the tables you have created. Choose one of those tables to include a sub-table.

Formulas
QuickModules.com supports the use of formulas and calculated fields. You can created fields for a table whose values will not be entered or stored in the database, but rather calculated. For instance, if the table already contains the two fields: 'First Name' and 'Last Name', then a third field, 'Full Name' can be specified as a calculated field and will combine the values of the 'First Name' and 'Last Name' to create the full name. For a detailed description of the syntax of formulas, available functions, and system variables, please click here.

See Also
Databases

 

Copyright © 2001 RIQ Technologies Inc. All rights reserved.
Copyright Policy, Privacy Policy, License & Terms of Use