Mapping Oracle Data Types to EDM Types
The ODP.NET manifest file describes the primitive types, such as VARCHAR2 and Number, and the Entity Data Model (EDM) types, such as string and Int32, that they map to. It also includes the facets for each EDM type.
ODP.NET does not support Time literals and canonical functions related to the Time type.
Oracle considers both NULL and empty strings to be NULL strings and are considered to be equal. Operations, such as Equals(), Length(), and Trim() on such strings will result in a NULL string.
Table 4-1 maps the Oracle data types to their corresponding EDM types. The table also includes details about provider type attributes and the EDM type facets associated with each Oracle data type.
Table 1 Mapping of Oracle Data Types and EDM Types
| Oracle Data Types | EDM Types(Primitive-TypeKind) | Provider Type Attributes: Name and Value | EDM Type Facets |
|---|---|---|---|
Bfile |
Binary |
|
EDM Type Facets for Bfile |
Binary_Double |
Double |
|
Not Applicable |
Binary_Float |
Single |
|
Not Applicable |
Binary_Integer |
Int32 |
|
Not Applicable |
Blob |
Binary |
|
EDM Type Facets for Blob |
Boolean |
Boolean |
|
Not Applicable |
Char |
String |
|
EDM Type Facets for Char |
Clob |
String |
|
EDM Type Facets for Clob |
Date |
DateTime |
|
EDM Type Facets for Date |
Float |
Decimal |
|
EDM Type Facets for Float |
Int |
Int32 |
|
Not Applicable |
Interval Day To Second |
Decimal |
|
EDM Type Facets for Interval Day To Second |
Interval Year To Month |
Decimal |
|
EDM Type Facets for Interval Year To Month |
Long |
String |
|
EDM Type Facets for Long |
Json |
String |
|
EDM Types Facets for JSON |
Long Raw |
Binary |
|
EDM Type Facets for Long Raw |
NChar |
String |
|
EDM Type Facets for NChar |
NClob |
String |
|
EDM Type Facets for NClob |
Nested Table |
Not Applicable | Not Applicable and Not Supported | |
|
Int16 |
|
Not Applicable |
|
Int32 |
|
Not Applicable |
|
Int64 |
|
Not Applicable |
(all other cases) |
Decimal |
|
EDM Type Facets for Number |
NVarchar2 |
String |
|
EDM Type Facets for NVarchar2 |
Object |
Not Applicable | Not Applicable and Not Supported | |
Raw |
Binary |
|
EDM Type Facets for Raw |
Raw(16) |
Guid |
|
Not Applicable |
Ref |
Not Applicable | Not Applicable and Not Supported | |
ROWID |
String |
|
EDM Type Facets for ROWID |
Smallint |
Int16 |
|
Not Applicable |
Timestamp |
DateTime |
|
EDM Type Facets for Timestamp |
|
DateTime |
|
EDM Type Facets for Timestamp with Local Time Zone |
|
DateTimeOffset |
|
EDM Type Facets for Timestamp with Time Zone |
(size) |
Binary |
|
EDM Type Facets for UROWID |
Varchar2 |
String |
|
EDM Type Facets for Varchar2 |
VArray |
Not Applicable | Not Applicable and Not Supported | |
XMLType |
String |
|
EDM Type Facets for XMLType |
EDM Type Facets
The following sections enumerate the EDM type facets for the preceding Oracle data types. The first column of each table displays the EDM type facet names for the Oracle data type. Subsequent columns list the facet attribute names and displays their respective values.
EDM Type Facets for Bfile
Table 2 EDM Type Facets for Bfile
| Facet name | Attributes Name and Value |
|---|---|
MaxLength |
|
FixedLength |
|
EDM Type Facets for Blob
Table 3 EDM Type Facets for Blob
| Facet name | Attributes Name and Value |
|---|---|
MaxLength |
|
FixedLength |
|
EDM Type Facets for Char
Table 4 EDM Type Facets for Char
| Facet Name | Attributes Name and Value |
|---|---|
MaxLength |
|
Unicode |
|
FixedLength |
|
EDM Type Facets for Clob
Table 5 EDM Type Facets for Clob
| Facet Name | Attributes Name and Value |
|---|---|
MaxLength |
|
Unicode |
|
FixedLength |
|
EDM Type Facets for Date
Table 6 EDM Type Facets for Date
| Facet Name | Attributes Name and Value |
|---|---|
Precision |
|
EDM Type Facets for Float
Table 7 EDM Type Facets for Float
| Facet name | Attributes Name and Value |
|---|---|
Precision |
|
Scale |
|
EDM Type Facets for Interval Day To Second
Table 8 EDM Type Facets for Interval Day To Second
| Facet name | Attributes Name and Value |
|---|---|
Precision |
|
Scale |
|
Note:
EDM types do not support TimeSpan.
Use Decimal to represent the total number of seconds. An application can obtain a TimeSpan by using the TimeSpan.FromSeconds static method.
EDM Type Facets for Interval Year To Month
Table 9 EDM Type Facets for Interval Year To Month
| Facet name | Attributes Name and Value |
|---|---|
Precision |
|
Scale |
|
EDM Type Facets for JSON
Table 10 EDM Type Facets for Json
| Facet name | Attributes Name and Value |
|---|---|
MaxLength |
|
Unicode |
|
FixedLength |
|
EDM Type Facets for Long
Table 11 EDM Type Facets for Long
| Facet name | Attributes Name and Value |
|---|---|
MaxLength |
|
Unicode |
|
FixedLength |
|
EDM Type Facets for Long Raw
Table 12 EDM Type Facets for Long Raw
| Facet name | Attributes Name and Value |
|---|---|
MaxLength |
|
FixedLength |
|
EDM Type Facets for NChar
Table 13 EDM Type Facets for NChar
| Facet name | Attributes Name and Value |
|---|---|
MaxLength |
|
Unicode |
|
FixedLength |
|
Note:
For NChar, the actual data is subject to the maximum byte limit of
2000.
The value of 1000 for Maximum and DefaultValue allows the EDM wizard to display columns of NCHAR(1000), where 1000 is the maximum number of characters allowed in DDL.
EDM Type Facets for NClob
Table 14 EDM Type Facets for NClob
| Facet name | Attributes Name and Value |
|---|---|
MaxLength |
|
Unicode |
|
FixedLength |
|
EDM Type Facets for Number
Table 15 EDM Type Facets for Number
| Facet name | Attributes Name and Value |
|---|---|
Precision |
|
Scale |
|
EDM Type Facets for NVarchar2
Table 16 EDM Type Facets for NVarchar2
| Facet name | Attributes Name and Value |
|---|---|
MaxLength |
|
Unicode |
|
FixedLength |
|
<div class="infoboxnote" markdown="1">
**Note:**
For `NVARCHAR2,` the actual data is subject to the maximum byte limit of 4000.
The value of 2000 for `Maximum` and `DefaultValue` allows the EDM wizard to display columns of `NVARCHAR2(2000)`, where 2000 is the maximum number of characters allowed in DDL.
</div>
EDM Type Facets for Raw
Table 17 EDM Type Facets for Raw
| Facet name | Attributes Name and Value |
|---|---|
MaxLength |
|
FixedLength |
|
EDM Type Facets for ROWID
Table 18 EDM Type Facets for ROWID
| Facet name | Attributes Name and Value |
|---|---|
MaxLength |
|
Unicode |
|
FixedLength |
|
EDM Type Facets for Timestamp
Table 19 EDM Type Facets for Timestamp
| Facet name | Attributes Name and Value |
|---|---|
Precision |
|
EDM Type Facets for Timestamp with Local Time Zone
Table 20 EDM Type Facets for Timestamp with Local Time Zone
| Facet name | Attributes Name and Value |
|---|---|
Precision |
|
EDM Type Facets for Timestamp with Time Zone
Table 21 EDM Type Facets for Timestamp with Time Zone
| Facet name | Attributes Name and Value |
|---|---|
Precision |
|
EDM Type Facets for UROWID
Table 22 EDM Type Facets for UROWID
| Facet name | Attributes Name and Value |
|---|---|
MaxLength |
|
FixedLength |
|
EDM Type Facets for Varchar2
Table 23 EDM Type Facets for Varchar2
| Facet name | Attributes Name and Value |
|---|---|
MaxLength |
|
Unicode |
|
FixedLength |
|
EDM Type Facets for XMLType
Table 24 EDM Type Facets for XMLType
| Facet name | Attributes Name and Value |
|---|---|
MaxLength |
|
Unicode |
|
FixedLength |
|