Template:Documentation/NeedsRework
Variable Types for Embedded Base Database
Numeric Types
Name
|
Data type
|
No. of Bytes
|
Signed
|
Range
|
BOOLEAN
|
boolean
|
1
|
no
|
0 or 1
|
TINYINT
|
integer
|
1
|
no
|
0 to 255
|
SMALLINT
|
integer
|
2
|
yes
|
-215 to 215-1
|
INTEGER
|
integer
|
4
|
yes
|
-231 to 231-1
|
BIGINT
|
integer
|
8
|
yes
|
-263 to 263-1
|
NUMERIC
|
number
|
no limit
|
yes
|
(Max Scale, Max Precision )
Max Scale = unlimited
Max Precision = e(+/-)231
|
DECIMAL
|
decimal
|
no limit
|
yes
|
(Max Scale, Max Precision )
Max Scale = unlimited
Max Precision = e(+/-)231
|
REAL
|
real
|
4
|
yes
|
2-1074 to (2-2-52)* 21023
|
FLOAT
|
float
|
4
|
yes
|
2-1074 to (2-2-52)* 21023
|
DOUBLE
|
double
|
4
|
yes
|
2-1074 to (2-2-52)* 21023
|
2-1074 to (2-2-52)* 21023 could also be stated as 5e-324 to 1.7976931348623157e+308
Alphanumeric Types
Name
|
Data type
|
Max length
|
Description
|
LONGVARCHAR
|
text
|
2GB for 32 bit OS
|
Stores up to the max number of characters indicated by user. It accepts any UTF 8 character.
|
CHAR
|
text(fix)
|
2GB for 32 bit OS
|
Stores exactly the number of characters specified by user. Pads with trailing spaces for shorter strings. Accepts any UTF 8 character.
|
VARCHAR
|
text
|
2GB for 32 bit OS
|
Stores up to the specified number of characters. No padding (Same as long var char).
|
VARCHAR_IGNORECASE
|
text
|
2GB for 32 bit OS
|
Stores up the the specified number of characters. Comparisons are not case sensitive but stores capitals as you type them.
|
Binary Types
Name
|
Data type
|
Max length
|
Description
|
LONGVARBINARY
|
image
|
2GB for 32 bit OS
|
Stores any array of bytes (images, sounds, etc). No validation required.
|
BINARY
|
binary (fix)
|
2GB for 32 bit OS
|
Stores any array of bytes. No validation required.
|
VARBINARY
|
binary
|
2GB for 32 bit OS
|
Stores any array of bytes. No validation required.
|
Date time
Name
|
Description
|
Format
|
Date
|
Stores month, day and year information
|
1/1/99 to 1/1/9999
|
Time
|
Stores hour, minute and second info
|
Seconds since 1/1/1970
|
Timestamp
|
Stores date and time information
|
|
Other Variable types
Name
|
Description
|
Other
|
Stores serialized Java objects. User application must supply serialization routines.
|
Object
|
Same
|