Chapter 6 Generating from a Conceptual Data Model


Converting conceptual data types

The following table lists the conceptual data types to which the DBMS assigns conversions:

Numeric data types

Conceptual data type Code in DBMS
What it stores
Conversion example for SQL Anywhere
Integer I 32-bit integer integer
Short Integer SI 16-bit integer smallint
Long Integer LI 32-bit integer integer
Byte BT 256 values smallint
Number N Numbers with a fixed decimal point numeric
Decimal DC Numbers with a fixed decimal point decimal
Float F 32-bit floating point decimal numbers float
Short Float SF Less than 32-bit floating point decimal number real
Long Float LF 64-bit floating point decimal numbers double
Money MN Numbers with a fixed decimal point numeric
Serial NO Automatically incremented numbers numeric
Boolean BL Two opposing values (true/false; yes/no; 1/0) numeric(1)

Character data types

Conceptual data type
DBMS

What it stores
Conversion example for SQL Anywhere
Characters A Character strings char
Variable Characters VA Character strings varchar
Long Characters LA Character strings varchar
Long Var Characters LVA Character strings long varchar
Text TXT Character strings long varchar
Multibyte MB Multibyte character strings char
Variable Multibyte VMB Multibyte character strings varchar

Time data types

Conceptual data type
DBMS

What it stores
Conversion example for SQL Anywhere
Date D Day, month, year date
Time T Hour, minute, and second time
Date & Time DT Date and time timestamp
Timestamp TS System date and time timestamp

Other data types

Conceptual data type
DBMS

What it stores
Conversion example for SQL Anywhere
Binary BIN Binary strings binary
Long Binary LBIN Binary strings long binary
Image PIC Images long binary
Bitmap BMP Images in bitmap format (BMP) long binary
OLE OLE OLE links long binary
Other * User-defined data type char(10)
Undefined <UNDEF> Not yet defined data type <undefined>

 


Copyright (C) 2005. Sybase Inc. All rights reserved.