Home | Previous Page | Next Page   Basics of Database Design and Implementation >

Choosing Data Types

In This Chapter
Defining the Domains
Data Types
Choosing a Data Type
Numeric Types
Counters and Codes: INTEGER, SMALLINT, and INT8
Automatic Sequences: SERIAL and SERIAL8
Approximate Numbers: FLOAT and SMALLFLOAT
Adjustable-Precision Floating Point: DECIMAL(p)
Fixed-Precision Numbers: DECIMAL and MONEY
Chronological Data Types
Calendar Dates: DATE
Exact Points in Time: DATETIME
Choosing a DATETIME Format (GLS)
BOOLEAN Data Type (IDS)
Character Data Types (GLS)
Character Data: CHAR(n) and NCHAR(n)
Variable-Length Strings: CHARACTER VARYING(m,r), VARCHAR(m,r), NVARCHAR(m,r), and LVARCHAR
Variable-Length Execution Time
Large Character Objects: TEXT
Binary Objects: BYTE
Using TEXT and BYTE Data Types
Changing the Data Type
Null Values
Default Values
Check Constraints
Referential Constraints
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]