\subsection{Creating a new table}
Select the \emph{Tables} tab from the main window and then press then 
\emph{New} button. A form will be displayed allowing you to define a new table.

You should enter the table name and then to define the fields.
At this point you can define also a primary key for that table by checking the 
\emph{primary key} checkbox for the fields that will be included in the primary 
key. Fields selected for the primary key will be displayed with a * in the 
K column.

The \emph{size} entry is used in order to specify the dimension for those field 
types that have variable dimensions (varchar, char). Otherwise, it will be disabled.
The \emph{default value} entry can be used in order to specify the field's default
value that will be assigned if a value is not specified in the insert command.

The \emph{check} entry can be used in order to specify a boolean expression using
tables fields or defined functions that will
be checked on every insert or update command.

The \emph{constraint} entry is optional and it's just for naming purposes.

\textit{Example: }
\texttt{(price > 0) and (quantity > 0) and valid\_product(product\_id)}

In the above example, price and quantity are fields from the new table and
valid\_product(product\_id) is a SQL function that will return the boolean value true
if the product\_id was found in another table "products".

In the \emph{Inherits} field you can select one or more tables. They will be separated
with commas. The new table will inherit all the fields from the parent tables.
Read more about \htmlref{inheritance}{inheritance} here.

Select a field from the listbox and use the "Move up" and "Move down" buttons in order to rearrange the field order. At the end, press the "Create" button to define the table.

Read also about \htmlref{CREATE TABLE}{create_table} SQL command.
