Database Differences (Oracle)
Database Differences (Oracle)
Note the following points when using Oracle databases.
Zero Divisors
Databases differ in their behavior when an SQL expression encounters a zero divisor. Oracle generates a divide by zero error.
This behavior has a consequence for some analysis calculations and views that present partial information--the divisor for certain rows is complete but is zero for other rows.
Since it is very useful to be able to review partial information during data development, when presenting information, the Archibus schema replaces any zero divisors with a very large value. The rows that have undefined values will return very small values for their results, which when displayed are rounded to zero.
The ArCb.abs file, which calculates All Room chargeback, is an example f a calculation that uses this strategy. The Basic script makes use of the SqlFunc_Replace0WithHuge() function defined in SqlFunc.abs. The "Group Chargeback-- Detailed Analysis" view is an example of an Archibus view that depends on an SQL view using the SqlFunc_Replace0WithHuge() function.
Memo Field Length
Under Oracle, Archibus uses the VARCHAR2 data type for memo fields, and these VARCHAR2 field are limited by Oracle to 4000 characters.
For example, users who are developing Building Operations domain data using other database servers, with the thought of later moving the data to an Oracle server, may wish to change the limit for memo field size in the Archibus Fields table from 5000 to 2000 characters. This will ensure that no data will be lost during this conversion to an Oracle server.
ANSI Behavior of Trailing Blanks
Oracle ignores trailing blanks in VARCHAR2 fields but not for CHAR fields. For example, a Department Code of "FINANCE" is not equal to a Department Code of "FINANCE ".
One result of this difference is that project data developed with other servers may not obey the validation constraints if you import this data into Oracle without using the Archibus Database Update Wizard.