HOPEX Information Architecture > Data Architecture > Attribute and Column Types > Mappings Between Pivot Types and Datatypes
Mappings Between Pivot Types and Datatypes
Pivot types establish correspondence between the logical datatypes to which they are connected and the datatypes for which they have an equivalent in each target DBMS.
The equivalence links carry conditions that enable them to be distinguished one from the other.
To visualize correspondences between pivot types and the different DBMS datatypes, see "Pivot Types and Datatypes Correspondence Tables", page 373.
Example of correspondence between pivot types and Oracle 8 datatypes
Pivot to Datatype
 
Pivot
Condition
Datatype
P-AutoIdentifier
 
NUMBER
P-Binary
 
RAW(@L)
P-Boolean
L=2 or L ø
RAW(1)
L>1
RAW(@L)
P-Byte
 
RAW(1)
P-Character
L=256 or L ø
CHAR(@L)
L>2000
LONG
255<L<2001
VARCHAR2(@L)
P-Currency
 
NUMBER(@L,@D)
P-Date
 
DATE
P-Datetime
 
DATE
P-Decimal
 
NUMBER(@L,@D)
P-Double
 
NUMBER(@L,@D)
P-Float
 
NUMBER(@L,@D)
P-Integer
 
NUMBER(@L)
P-Long Integer
 
NUMBER(@L)
P-Long Real
 
NUMBER(@L,@D)
P-Multimedia
 
LONG RAW
P-Numeric
L=0 or L ø
NUMBER
L>0 and D ø
NUMBER(@L)
L>0 and D not ø
NUMBER(@L,@D)
P-Real
 
NUMBER(@L,@D)
P-Smallint
 
NUMBER(@L)
P-String
 
LONG
P-Text
 
VARCHAR2(@L)
P-Time
 
DATE
P-Timestamp
 
ROWID
P-Tinyint
 
NUMBER(@L)
P-Varbinary
 
LONG RAW
P-Varchar
L>2000 or L=0 or L ø
LONG
0<L<2001
VARCHAR2(@L)
Datatype to Pivot
 
Datatype
Condition
Pivot
CHAR(L)
 
P-Character
DATE
 
P-Date
LONG
 
P-String
LONG RAW
 
P-Multimedia
NUMBER
 
P-Numeric
NUMBER(L)
 
P-Numeric
NUMBER(L,D)
 
P-Numeric
RAW(1)
 
P-Boolean
RAW(L)
 
P-Boolean
ROWID
 
P-Timestamp
VARCHAR2(L)
 
P-Varchar
In this table, we can see that the "P-Numeric" type has three correspondences for type classes using three different conditions on the equivalence links.
if P_Numeric is assigned to an attribute and the length of this attribute is 10, then the column justified by this attribute via the synchronization will give Number(10).
The condition is written in VB Script language. The main elements of the condition are:
Sub ConditionInvoke (Column, ByRef bValid): the first line constitutes the signature of the function.
Column: the column is given as an input parameter.
bValid : is the return parameter. Its value is "True" if the condition is verified, "False" if not.
Example:
Sub ConditionInvoke (Column, ByRef bValid)
bValid = False
If (IsNumeric(Column.Length)) Then bValid = True
End Sub
 
The following can be specified in the condition:
Presence of a number
Presence of a decimal
Range concerned (example: between 0 and 150 inclusive)