4. CREATE AND RESTRUCTURE A TABLE

(1) Defining Database Structure

To create a new database choose F10 Create type name of new database and press <Enter>. This will bring you into the database Design screen. For each field you need to define the Field Name, Type and Size. Key fields can also be set at this stage.

a. Field Names

Paradox fieldnames can be up to 25 Characters long, must be unique and try to make the names relevant to the information they hold.

b. Field Types

Paradox has five different types. Each has its own rules about the type and amount of data that can be entered.:

Type What can be entered Width
AAny character typed from the keyboard1 to 255
NNumeric digits including a decimal point1 to 20
$Currency amounts, Similar to Numeric except the field is automatically set to two decimal places and comma delimited1 to 20
DAny valid date8
M Memo field. Unlimited number of characters can be entered 1 to 240

The majority of fields in a database are either Character or Numeric. For some types it can be difficult to decide between the two. Telephone Numbers are a classic example. Although the information is numeric, telephone numbers should be held as Character. This is because a telephone number is usually separated by spaces which wouldn't be allowed if the field was numeric. Basically follow the rule, only make fields numeric if they are or could be used for calculations.

c. Key Fields

To create a key field on any of the fields in the database; make the field the first field in the database then place a * after the size.

(2) Restructuring a Database

To make changes to an existing database choose F10 Modify Restructure and then type the required database name, press <Enter>.

a. Insert or Delete a Field

To Insert a field press insert and a blank field will appear above the cursor position. To Delete a field, highlight the field and press delete.

b. Change field types or names

Make the required changes but do not change field names and field types in the same session. Make changes separately and save between times.

Next Page You've got to hand it to him