Database Reference
In-Depth Information
The VARCHAR (variable character) type is widely used when the field content is
alphanumeric, because the contents will occupy only the space needed for it. This
type requires a maximum length, which we specify. If we forget to do so, a small
pop-up message reminds us later when we save. For the page count and the
author identification, we have chosen INT type (integer), as depicted in the
following screenshot:
There are other attributes for fields, but we will leave them empty in this example.
You might notice the Add 1 Field(s) dialog at the bottom of the screen. We can use
it to add some fields to this table creation panel by entering the appropriate value
and hitting Go . The number of rows would change according to the new number
of fields, leaving intact the information already entered about the first four fields.
Before saving the page, let's define some keys.
Choosing keys
A table should normally have a primary key (a field with unique content that
represents each row). Having a primary key is recommended for row identification,
better performance, and possible cross-table relations. A good value here is the ISBN;
so, in the Index dialog we select PRIMARY for the isbn field. Other possibilities for
index type include INDEX , UNIQUE , and FULLTEXT (more on this in Chapter 6).
Index management (also referred to as Key management) can be done at
initial table creation, or later in the Structure subpage of Table view.
 
Search WWH ::




Custom Search