Databases Reference
In-Depth Information
Changing Table Structures
This chapter explores editing table definitions and using special column types. When
developing an application, requirements often change because of new or modified
needs. Developers must accommodate these changes through judicious table-
structure editing.
Adding a Field
Suppose that we need a new field to store a book's language and, that by default, the
topics on which we keep data are written in English. We decide that the ield will be
called language and will contain a code composed of two characters ( en by default).
In the Structure sub-page of the Table view for the topics table, we can find the Add
field dialog. Here, we specify how many new fields we want and where they will go.
The positions of the new fields in the table only matter from a developer's point of
view; we usually group the fields logically so that we can find them more easily in
the list of fields. The exact position of the fields will not play a role in the intended
results (output from the queries), because these results can be adjusted regardless
of the table structure. Usually, the most important fields (including the keys) are
located at the beginning of the table, but this is a matter of personal preference.
We choose to put the new field At End of Table , so we check the corresponding
radio button and click on Go :
Other possible choices would be At Beginning of Table and After (where we would
have to choose from the drop-down menu the field after which the new field must go).
Search WWH ::




Custom Search