These data types can be specified within the R:BASE command syntax using the SET VARIABLE command.
BIGINT
•Holds a 64-bit integer value
•Offers a range of ±999,999,999,999,999,999
•Delimiters (such as commas) cannot be used in entry
•No length is needed
BIGNUM
•Holds decimal numbers whose precision and scale can be set
•When specifying BIGNUM, specify a precision (the total number of digits) from 1 to 38 (default 18) and a scale (the number of decimal places) from zero to any positive integer up to the precision value (default 0)
•R:BASE reserves a minimum of forty bytes of internal storage
•BIGNUM numbers are stored as DECIMAL
BIT
•Holds binary data
•The default length is 1 bit
•The fixed length is 1 to 1,500 bytes
BIT VARYING
Maps to VARBIT
BITNOTE
•Holds binary data
•No length is needed
•The variable length is 0 to 4,088 bytes of binary data
BOOLEAN
•Hold true/false values
•Internally stored as 0 for false and 1 for true
•Accepted values for false include: 0, false, 'false', f
•Accepted values for true include: 1, true, 'true', t
Notes:
oFor multilingual applications, the values of 0 and 1 are recommended.
oThe BOOLEAN operating condition setting specifies that constants (e.g. TRUE, FALSE) in expressions will be treated as type BOOLEAN values. The default is OFF.
BSTR
•Holds binary string data
•String data type that is used by COM (Component Object Model), Automation, and Interop functions
•Used to support Unicode in table data
•Composite data type that consists of a length prefix, a data string, and a terminator
Length Prefix
•Consists of a four-byte integer
•Occurs immediately before the first character of the data string
•Contains the number of bytes in the following data string
•Does not include the terminator
Data String
•Consists of a string of Unicode characters (wide or double-byte characters)
•May contain multiple embedded null characters
Terminator
•Consists of two null characters (0x00)
CHAR VARYING
Maps to VARCHAR
CHARACTER
Maps to TEXT
CURRENCY
•Holds monetary values of up to 23 digits represented in the currency format, established using SET CURRENCY
•Dollar amounts are in the range ±$99,999,999,999,999.99
•Commas or the current delimiter can be used. If no decimal point is included, .00 is assumed
•Data is stored as two long integer values, reserving four bytes of internal storage
•The negative currency format with parenthesis around the negative value e.g. ($500.00), is not recognized
DATE
•Holds dates in a 1- to 30-character format based on month, day, and year as established using SET DATE
•The minimum and default format to display month, day, and year is MM/DD/YY
•The allowable date range is January 1, 3999 BC to December 31, 9999 AD
•R:BASE reserves four bytes of internal storage
DATETIME
•A concatenation of the DATE and TIME data types, resulting in a sequence and display format as set by DATE and TIME
•DATETIME cannot be SET directly, but does permit extraction of its value by the DATETIME functions into a DATETIME variable
•For example: SET VAR vdatetime = (DATETIME(06/12/93, 12:15:30.123)), results in vdatetime = '06/12/93', 12:15:30.123'
•For identification purposes, DATETIME values are automatically stamped into R:BASE databases, also known as the timestamp
•DATETIME occupies 8 bytes of internal storage
•The time portion of the value does not have to be specified in a DATETIME data type. If omitted, it defaults to 0:0:0
DECIMAL
Maps to NUMERIC
DOUBLE
•Holds double-precision real numbers in the range ±1.7E308 with a precision of up to 15 digits
•DOUBLE numbers longer than 15 digits are stored as scientific notation
•R:BASE reserves eight bytes of internal storage
•Because DOUBLE numbers are stored in a binary form, the displayed value may not be the stored value
•Calculations are performed on the stored values
•Among numeric data types, DOUBLE provides the greatest range of values
GUID
•Holds a 128-bit value
•Binary global unique identifier, which is represented as a 32 hexadecimal digits
•Listed as a group of 8 digits, followed by three groups of 4 digits, followed by a group of 12 digits, for a total of 32 digits, separated by hyphens
•As the GUID data type is a binary unique value, it will increase retrieval of data from tables for indexed columns
An example of a GUID value is: 8C20005C-0E2A-47E0-B2BE-57E67961628B
INTEGER
•Holds whole numbers in the range of ±1,999,999,999
•Delimiters (such as commas) cannot be used in entry
•R:BASE reserves four bytes of internal storage space
LONG VARBINARY
Maps to VARBIT
LONG VARBIT
Maps to VARBIT
LONG VARCHAR
Maps to VARCHAR
NOTE
•Holds alphanumeric data
•The default length is 0, where the length is determined by the data
•Holds variable length text of up to 10,000 characters
•Maximum length of a NOTE column can be set
•Indexes and constraints are allowed on NOTE data types
•R:BASE reserves a minimum of four bytes of internal storage space
NUMERIC
•Holds decimal numbers whose precision and scale can be set
•When specifying NUMERIC, specify a precision (the total number of digits) from 1 to 15 (default 9) and a scale (the number of decimal places) from zero to any positive integer up to the precision value (default 0)
•R:BASE reserves a minimum of eight bytes of internal storage
•NUMERIC numbers are stored as DOUBLE
REAL
•Holds real number amounts in the range of ±1E38 with six-digit accuracy
•Real numbers with up to seven digits are displayed as decimal numbers; for example, 321.414
•Real numbers with more than seven digits are represented in scientific notation; for example, 9.8E32
•R:BASE reserves four bytes of internal storage space
•REAL numbers are stored in a binary form; therefore, the displayed value may not be the actual stored value
•Calculations are performed on the stored values
SMALLINT
•Holds a 16-bit integer value
•Offers a range of ±32767
•Delimiters (such as commas) cannot be used in entry
•No length is needed
TEXT
•Holds alphanumeric data
•The default length is eight characters
•The maximum is 1,500 characters
•Maximum length of a TEXT column can be set
•R:BASE reserves a minimum of four bytes of internal storage space
TIME
•Holds time values in a 1- to 20-character format based on hours, minutes, and seconds, established using SET TIME
•The minimum format to display hours, minutes, and seconds is HH:MM:SS
•TIME can be specified up to thousandths of a second
•Time can be displayed or entered as a 12- or 24-hour clock
•R:BASE reserves four bytes of internal storage
VARBINARY
Maps to VARBIT
VARBIT
•Holds binary data
•No length is needed
•Is ideal for storing external files, like images, PDF files, etc.
VARCHAR
•Holds alphanumeric data
•No length is needed
•Is ideal for storing large text data
WIDENOTE
•Holds Unicode data
•The default length is 0, where the length is determined by the data
•Holds variable length text of up to 4,092 characters
•Maximum length of a WIDENOTE column can be set
•Indexes and constraints are allowed on WIDENOTE data types
•R:BASE reserves a minimum of four bytes of internal storage space, with 2 bytes per character
WIDETEXT
•Holds Unicode data
•The default length is eight characters
•The maximum is 1,500 characters
•Maximum length of a WIDETEXT column can be set
•R:BASE reserves a minimum of four bytes of internal storage space, with 2 bytes per character