Try OpenEdge Now
skip to main content
Database Essentials
Administrative Planning : Data layout : Calculating database storage requirements : Formulas for calculating field storage
 
Formulas for calculating field storage
The following table lists the formulas for calculating the field storage values (in bytes) for different data types.
Table 13. Formulas for calculating field storage
ABL Data type (SQL equivalent)
Value
Field storage in bytes
CHARACTER (VARCHAR)
Character string
1 + number of characters,
excluding trailing blanks. If the number of characters is greater than 240, add 3 to the number of characters instead of 1.
DECIMAL (DECIMALor NUMERIC)
Zero
1
Nonzero
2+(# significant digits + 1)/2
INTEGER (INTEGER)
1 to 127
1
128 to 32,511
2
32,512 to 8,323,071
3
8,323,072 to 2,147,483,647
4
INT64 (BIGINT)
1 to 127
1
128 to 32,511
2
32,512 to 8,323,071
3
8,323,072 to 2,147,483,647
4
2,147,483,648 to 545,460,846,591
5
545,460,846,592 to ~139,636,000,000,000
6
~139,636,000,000,000 to ~35,750,000,000,000,000
7
Greater than ~35,750,000,000,000,000
8
DATE (DATE)
Date
Same as INTEGER.
Dates are stored as an INTEGER representing the number of days since a base date, defined as the origin of the ABL DATE data type.
DATE-TIME
Date and time
DATE + 4
DATE-TIME-TZ
Date, time, and time zone
DATE + 8
LOGICAL (BIT)
False
1
True
2