InterBase / Firebird Data Types and Instant Objects

IB/Fb Data Type

RDB$FIELDS definition (1)

RDB$TYPES description (2)

IB 4

IB 5.x

IB 6.0

IB6.5

IB7.x

Fb2.0

Mapped to IO Data Type

SMALLINT

7

SHORT

Y

Y

Y

Y

Y

Y

Boolean

INTEGER

8

LONG

Y

Y

Y

Y

Y

Y

Integer

QUAD

9

QUAD

Y

Y

Y

Y

Y

Y

n/a

FLOAT

10

FLOAT

Y

Y

Y

Y

Y

Y

Float

D_FLOAT

11

-

Y

Y

Y

Y

Y

Y

n/a

DATE (3)

12

DATE

N

N

Y

Y

Y

Y

Date

TIME

13

TIME

N

N

Y

Y

Y

Y

Time

CHAR

14

TEXT

Y

Y

Y

Y

Y

Y

String

INT64 (4)

16

-

N

N

Y

Y

Y

Y

Currency

BOOLEAN

17

-

N

N

N

N

Y

Y

n/a

DOUBLE

27

DOUBLE

Y

Y

Y

Y

Y

Y

Float

TIMESTAMP (3)

35

TIMESTAMP

Y

Y

Y

Y

Y

Y

DateTime

VARCHAR

37

VARYING

Y

Y

Y

Y

Y

Y

String

CSTRING

40

CSTRING

N

N

Y

Y

Y

Y

n/a

BLOB_ID

45

BLOB_ID

N

N

N

Y

Y

Y

n/a

BLOB (4)

261

BLOB

Y

Y

Y

Y

Y

Y

Memo or Blob


Notes:

  1. Data Types used in RDB$FIELDS table to describe column data type

  2. Some Data Types described in RDB$TYPES table, Note there are no entries for data types 11,16,17 !

  3. Type 35 changed from DATE to TIMESTAMP in version 6.0

  4. Sub types defined for BLOB, CHAR, SMALLINT, INTEGER and INT64.

See language reference guide (System Tables chapter) for more information.



Mapping of Instant Attributes Types to IB/Fb Data Types (via the Instant Data Types)


TInstantAttributeType

TInstantDataType

Mapping to IB/Fb Data Type

atUnknown

dtString

VARCHAR

atInteger

dtInteger

INTEGER

atFloat

dtFloat

DOUBLE PRECISION

atCurrency

dtCurrency

DECIMAL(14,4)

atBoolean

dtBoolean

SMALLINT'

atString

dtString

VARCHAR

atDateTime

dtDateTime

TIMESTAMP

atBlob

dtBlob

BLOB

atMemo

dtMemo

BLOB SUB_TYPE 1

atGraphic

dtBlob

BLOB

atPart (embedded only)

dtBlob

BLOB

atReference

n/a

n/a

atParts (embedded only)

dtBlob

BLOB

atReferences (embedded only)

dtBlob

BLOB

atDate

dtDate

DATE

atTime

dtTime

TIME'