Databases Reference
In-Depth Information
We enter our field names under the
Field
column. Each field has a type, the
VARCHAR
type (variable character) being the default since it is the most
commonly used.
The
VARCHAR
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 short
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 we select
Primary
for the
isbn
field. As
$cfg['PropertiesIconic']
is set to
TRUE
by default, we see icons indicating the various index possibilities. Moving the mouse
over them, or over the radio buttons, reveals
Primary
,
Index
,
Unique
, and
Full text
.
Index management (also referred to as
Key
management) can be done at
initial table creation, or later in the
Structure
sub-page of Table view.
Search WWH ::
Custom Search