Basic column attributes
This section discusses basic column attributes. Consider these attributes carefully for each new column.
A column must have a Column Name that is unique within the table, such as CUSTOMER_ID or NAME. A column name is spelled all-uppercase and may contain underscores but not spaces. The column name is used when generating the physical RDBMS table.
|
A column must be based on a domain. Some attribute settings of this domain will be used to determine datatype, length (if any) and decimal length (if any) for the column when the table is generated in the database. A column's domain determines or influences many other aspects of the column as well, most notably:
•Allowed values for the column, if values allowed in the column are a closed set. •Formats that determine how the value, eg. a date/time value, is presented to the end user. •The column's display type. •The default value displayed in the column when a new record is created. |
In generated forms with fields or spreadsheet columns for column values, users need a text string explaining to them what the field is for. Prompt is this text string. It is displayed:
•To the left of each non-checkbox field in a single-record form •To the right of each checkbox in a single-record form •At the top of spreadsheet-like displays by way of a column header. |
Each USoft table must have a primary key. A primary key is a column, or a combination of columns, that allows users to find and address individual records because the primary key value uniquely identifies each record. For example, numberplates could be a primary key of cars in a CAR table. The combination of Order ID and Line Number could be the primary key of order lines in an ORDER_LINE table.
Define a table's primary key by setting Key = 1 for the column or columns that make up the key.
Sometimes, in addition to the primary key column(s), other columns, or combinations of columns, also store values that uniquely identify each record: secondary keys. Define these by setting Key = 2, Key = 3... .
The remaining columns are non-key columns and have Key = No.
For each key in a table, USoft generates a database index when the table is generated.
|
If you set Mandatory = Yes, a value must be provided for the column for each record in the table. This attribute is passed to the RDBMS, where a NOT NULL column is created. By implication, the requirement that a mandatory column must have a value for each record is tested by the RDBMS rather than by USoft.
If you set Mandatory = No, the column is allowed to be NULL.
USoft Definer enforces that Mandatory = Yes for key columns (= columns that do not have Key = No).
|
In generated forms with fields or spreadsheet columns for column values, Position determines in what order the fields or spreadsheet columns appear.
|
If you set Input Allowed = Yes (the default), end users are allowed to edit fields and spreadsheet columns based on the column.
If you set Input Allowed = No, end users are not allowed to edit these fields and spreadsheet columns. In certain displays, this is marked by a greyed-out background. Use this option if the column value is determined by a corrective constraint.
|
Special column attributes
This section discusses column attributes that are only important in special cases.
Use this column attribute to decide which columns are shown in lookup windows defined on the table in the default application. Only columns that have a sequence number as a value for In Display Selection are shown in lookup windows. The sequence number determines in what order these columns are shown.
If you leave In Display Selection empty for all columns, USoft applies its own default for columns in lookup windows.
|
CAUTION: Setting Updatable to a different value than Yes introduces major inflexibility in data import situations. If possible, it is better to achieve non-updatability of a column by choosing a GUI implementation.
If you set Updatable = Yes (the default), fields and spreadsheet columns for the column are normally updatable (editable) by end users.
If you set Updatable = No, the value for the column that was introduced when the record was inserted can never be changed.
If you set Updatable = Only if Null, the value for the column that was introduced when the record was inserted can only be changed if that value is the NULL value. Once the change is committed, it cannot be rolled back.
Updatable = (null) is obsolete and only provided for backward compatibility.
|
If you set Query Allowed = Yes (the default), users can use a field or spreadsheet column for the column to enter query conditions in Query Mode.
If you set Query Allowed = No, this possibility is blocked.
|
If you set Type = Database (the default), the column is implemented as a database column in the RDBMS table.
If you set Type = Virtual, the column is implemented as a virtual column (or: joined column).
|
If you set Displayed = Yes (the default), controls or slots for the column will appear in defaul windows and web pages.
If you set Displayed = No, the column will be hidden from users of the default applications.
|
If you set Default Value for a column, this is the value shown for the column in new records. If the user does not edit the value, this is also the value that will be stored in the database record.
You can define a Default Value for a column in the same way you define a Default Value for the underlying domain.
Always consider defining the default value for the underlying domain, rather than for the column itself. If you set Default Value for a column, any Default Value specified at domain level will be overwritten (ignored). Use this option only if it is essential that a column shares a domain with other columns, but must still have its own default value.
|
If you use Oracle, this is where you type a number to indicate the estimated degree to which this column will be filled. USoft uses this percentage to estimate required table space.
|
If you use Oracle, this is where you type a number to indicate the estimated degree to which this column will be empty. USoft uses this percentage to estimate required table space.
|
Help Text entered here will be displayed to the user of the default applications when the user puts input focus on a field or spreadsheet column defined for the column.
If you leave Help Text empty, then Help Text for the underlying domain (if any) will be displayed.
|
If the column being defined is part of an application that you expose to other applications as a module, you can set Interface = Yes to signify that the column must be made accessible to the consumer application. You can set Interface = No (the default) to signify that the column must be hidden from, not exposed to consumers.
|
See also
Columns
How to add columns to a table
Joined Columns
|