The ExerTran Documentation | ||
---|---|---|
<<< Previous | XML Definition Files for Database Tables | Next >>> |
This is the major element in the table definition file and each one describes a column in the database table. It has several attributes:-
This assigns the column name and is required.
This needs to be assigned "true", null="true" if the value in this column can be null. The default value is "false" if the attribute is missing.
This defines the type of the column. The default is "VARCHAR", which defines the column data to be text.
This defines the size of the entry. The default is one, which if the type is the default value of "VARCHAR" sets the columnd to hold a maximum of 1 text character.
![]() | This should be set to a larger value, since otherwise input text to the column will be silently truncated. |
This needs to be assigned "true", primary_key="true" if the value in this column is the primary key for the table. The default value is "false" if the attribute is missing.
![]() | Only one column should be the primary key |
This needs to be assigned "true", if the value in this column is automatically incremented as new entries are inserted into the table.
The "Column" element can contain the following optional elements
Text describing the column.
This text is used to identify the column to the software. The value in here may be embedded in the text, so that this value allows the software to identify the column despite the name being user definable. It became apparent that the code would be improved if their was a mechanism to allow columns to be identified. This is what I cam up with.
This element allows the contents of the column to be specifed as one of several predefined values, e.g. "user", "lecturer" or "manager". Each value element defines one of the values, so several of these elements are expected. One of the defined value elements can have a "default" attribute set to "true" to define the corresponding value as the default value for a column entry.
This emtpy element defines the column content has being a number automatically defined by the database.
The presence of this empty element is used by the table editing software to identify that this column entries can be assigned values automatically in a sequential fashion. This is used to link table entries in the question list table automatically via the followingQu column.
<<< Previous | Home | Next >>> |
XML Definition Files for Database Tables | Up |