Download Informix Guide to SQL: Tutorial, Version 6.0
Transcript
Creating the Database • ANSI-compliant logging. This is the same as regular logging, but the ANSI rules for transaction processing are also enabled. (See the discussion of ANSI-compliant databases in Chapter 1 of the Informix Guide to SQL: Reference.) CREATE DATABASE std_rules_db WITH LOG IN 'a-log-file' MODE ANSI You can add a transaction log to a nonlogged database later using the START DATABASE statement. Using CREATE TABLE Use the CREATE TABLE statement to create each table you designed in the data model. This statement has a complicated form, but it is basically a list of the columns of the table. For each column, you supply the following information: • • • • • The name of the column The data type (from the domain list you made) If the column (or columns) is a primary key, the constraint PRIMARY KEY If the column (or columns) is a foreign key, the constraint FOREIGN KEY If the column is not a primary key and should not allow nulls, the constraint NOT NULL • If the column is not a primary key and should not allow duplicates, the constraint UNIQUE • If the column has a default value, the constraint DEFAULT • If the column has a check constraint, the constraint CHECK In short, the CREATE TABLE statement is an image in words of the table as you drew it in the data model diagram. Figure 9-5 shows the statements for the telephone-directory model whose diagram is shown in Figure 8-16 on page 8-31. 9-24 Implementing Your Data Model
Related documents
IBM Informix Guide to SQL: Tutorial, Version 5.2
Installation Guide and User`s Manual
Model 2100 Conductivity Meter Instruction Manual
Performance Guide for Informix Dynamic Server, Version 7.3
M@C IIA_Handbuch_V0_90
Method and apparatus for computing device with status display
Informix Guide to SQL: Tutorial
Informix 4GL By Example, Version 4.1
addendum 3
FLUKE 192 Datasheet - Buy Used Test Equipment
Informix Guide to SQL: Syntax, Version 6.0
Supplementary User`s Manual
LT-657 FX-2000 Installation and Operation Manual
Cub Cadet Tank S S7232D Operator`s manual
STAR USER MANUAL
IBM Informix Guide to SQL Reference
3 - Service Software Instructions
Quantum Pathlight VX User's Guide