ARCHIBUS schema supports the following data types. These have different physical data types under Sybase, Microsoft SQL Server, and Oracle. ODBC also supplies type information in a different format. Internal to ARCHIBUS, the program stores these data items in memory objects of yet another type.
The type mappings are:
AfmType |
Sybase |
Oracle |
SQLServer |
Size Matters |
Decimals Matters |
SQL_CHAR | "CHAR(%d)" | "VARCHAR2(%d)" | "CHAR(%d)" | TRUE | FALSE |
|
|
|
|
|
|
SQL_NUMERIC |
"NUMERIC(%d,%d)" |
"NUMBER(%d,%d)" |
"NUMERIC(%d,%d)" |
TRUE |
TRUE |
SQL_DECIMAL |
"NUMERIC(%d,%d)" |
"NUMBER(%d,%d)" |
"NUMERIC(%d,%d)" |
TRUE |
TRUE |
SQL_INTEGER |
"INTEGER" |
"NUMBER(*,0)" |
"INTEGER" |
FALSE |
FALSE |
SQL_SMALLINT |
"SMALLINT" |
"NUMBER(*,0)" |
"SMALLINT" |
FALSE |
FALSE |
SQL_FLOAT |
"FLOAT" |
"FLOAT" |
"FLOAT(53)" |
FALSE |
FALSE |
SQL_REAL |
"REAL" |
"REAL" |
"REAL" |
FALSE |
FALSE |
SQL_DOUBLE |
"DOUBLE" |
"NUMBER(%d,%d)" |
"FLOAT(53)" |
FALSE |
FALSE |
SQL_DATE |
"DATE" |
"DATE" |
"DATETIME" |
FALSE |
FALSE |
SQL_TIME |
"TIME" |
"DATE" |
"DATETIME" |
FALSE |
FALSE |
SQL_TIMESTAMP |
"DATE" |
"DATE" |
"DATETIME" |
FALSE |
FALSE |
SQL_VARCHAR |
"VARCHAR(%d)" |
"VARCHAR2(%d)" |
"VARCHAR(%d)" |
TRUE |
FALSE |
SQL_LONGVARCHAR(-1) |
"VARCHAR(%d)" |
"VARCHAR2(%d)" |
"VARCHAR(%d)" |
TRUE |
FALSE |
Note the following about these data types:
The ARCHIBUS default schema uses only VARCHAR2 fields and avoids the Oracle LONG fields. This mapping works around several limitations of the LONG data type under Oracle.
For international versions, ARCHIBUS uses Unicode UTF-8 encoding so that the database can record strings from multiple languages in the same database.
For historical reasons, ARCHIBUS field widths (A/FM Fields, Size values) are in BYTEs rather than the number of Unicode CHARs. (The Oracle setting for this is the NLS_LENGTH_SEMANTICS with which the field was created.) Current databases keep this length, as the difference affects few sites and keeping the BYTE values allow users with V.17 and V.18 Windows client/server and client/server Overlay products to use the newer databases.
Sites who want to use the Unicode CHAR field width measurement can change this setting by using the Schema Change Wizard. The Smart Client, the Web Central Java routines, and the Web Central JavaScript forms all work with this setting. Using the Unicode CHAR field width measurement avoids any potential truncation of string values that users enter, since the size measurement on forms and in the databases are then identical.
Copyright © 1984-2014, ARCHIBUS, Inc. All rights reserved. |