DBISAM
is an embedded database engine which is available for programming languages
that can use ODBC for data access. DBISAM can be used as a single-user,
multi-user or client-server engine.
General Architecture
DBISAM is session based where each session is equivalent to
a virtual user. In a given application there can be many active sessions. The
sessions are of 2 types.
·
Local Session: A local session can
directly access the database tables via Windows or Linux APIs to the local
storage medium.
·
Remote Session: A remote session
uses sockets to communicate to a database server over a network using TCP/IP
protocol.
The main drawback of DBISAM is that it does not support
Referential Integrity.
Databases
DBISAM uses the physical directories in Operating System’s
file system to represent databases. The tables in DBISAM are represented by
three physical files in the database.
·
.dat (Data Files) which are the
actual tables in the Database that store records.
·
.idx (Index Files) which store index
definitions and pages.
·
.blb (BLOB Files) that store BLOB
blocks related to tables.
Data Types
The data types used in DBISAM are also supported by other
databases or relational databases, but with some exceptions. A comparison
between the data types of DBISAM and SQL Server is given below.
Listing 1
Data Type
|
Description
|
SQL Server Equivalent
|
String
|
Fixed length fields that can store up to 512 characters.
The trailing blank spaces are automatically trimmed from any strings entered
into string fields.
|
VARCHAR
|
FixedChar
|
Same as string fields with the exception that trailing
blank spaces are not automatically removed from any strings entered into
them.
|
CHAR or
CHARACTER
|
GUID
|
Same as string fields with the exception that they are
fixed at 38 bytes in length and are always used to store the string representation
of a GUID value.
|
UNIQUEIDENTIFIER
|
Bytes
|
Fixed in length and can store up to 512 bytes in a single
field.
|
BYTES
|
Blob
|
Variable in length and may contain up to 2 gigabytes of
data.
|
NTEXT or IMAGE
|
Memo
|
Variable in length and may contain up to 2 gigabytes of
data minus a NULL terminator.
|
TEXT or LONGVARCHAR
|
Graphic
|
Variable in length and may contain up to 2 gigabytes of
data.
|
IMAGE
|
Date
|
Date fields contain dates only.
|
DATETIME
|
Time
|
Time fields contain times only.
|
DATETIME
|
TimeStamp
|
Contain both a date and a time.
|
TIMESTAMP
|
Boolean
|
Contain logical True/False values.
|
BIT
|
SmallInt
|
Contain 16-bit, signed integers.
|
SMALLINT
|
Word
|
Contain 16-bit, unsigned integers.
|
|
Integer
|
Contain 32-bit, signed integers.
|
INTEGER or INT
|
AutoInc
|
Contain 32-bit, signed integers.
|
INT with Identity
|
LargeInt
|
Contain 64-bit, signed integers.
|
BIGINT
|
Float
|
Contain 64-bit floating-point numbers (doubles).
|
FLOAT
|
Currency
|
Currency fields are the same as Float fields.
|
MONEY
|
BCD
|
BCD fields contain a 34-byte TBcd type.
|
NUMERIC
|