Oracle (through System.Data.Oracle)

Important!

LLBLGen Pro supports Oracle through two ADO.NET providers, ODP.NET and System.Data.Oracle. It's highly recommended you use the ODP.NET based Oracle driver and not the System.Data.Oracle based Oracle driver. System.Data.Oracle has been marked deprecated and the driver based on it is limited.

Requirements

Oracle through System.Data.Oracle support relies on the Oracle CLI client v9g or higher provided by Oracle through OTN. To be able to create a model from an existing Oracle schema, you have to have access to an Oracle instance, version 9i or higher.

Supported features

For supported features, see Oracle (ODP.NET). Microsoft's Oracle provider requires an Oracle client present on the system, please consult the Microsoft Oracle provider documentation in the .NET reference manual.

Restrictions in the Microsoft Oracle provider: - XMLType is not supported by LLBLGen Pro and the MS Oracle driver, as that type isn't supported by the Microsoft Oracle provider. If you need to use this type, use the ODP.NET version of the Oracle driver. - All NUMBER(x, y) types are seen as System.Decimal. This can be a huge disadvantage. In that case, consider using an ODP.NET based driver

Feature Supported
Minimal database version Oracle 9i
Database types All built-in types, except XMLType
User defined types No
Foreign key constraints Yes
Primary key constraints Yes
Unique constraints Yes
Check constraints No
Default values Yes
Unique indexes No
Tables Yes
Views Yes
Stored Procedures Yes, including REF CURSOR output parameters
Table Valued Functions Yes
(System versioned) Temporal tables No
Synonyms Yes
Cascade delete rules Yes
Cascade update rules No
Identity fields Yes (12g or higher)
System sequences Yes (12g or higher)
Schema based sequences Yes
Multiple catalogs per project No
Multiple schemas per catalog Yes
Linked servers No

Type mappings

Below you'll find the two type mapping tables used by the Oracle (ODP.NET) driver of LLBLGen Pro. One is used for Database First development, the other is used for Model First development. In case of Model First development, you can add your own type shortcuts to define a different target database type, in case the default mappings aren't what you need in a particular case.

Global model-first type overruling

For Model first, there are often multiple database types defined per .NET Type and a given filter. To prefer one over the other on a global level, please look at the following settings in the Relational model data element construction section of the Project Settings:

  • Prefer natural character types
  • Prefer decimal over currency types
  • Prefer variable length types

Database first type mappings

You can control the .NET type during reverse engineering in database first development by defining Type Conversions in the Project Settings, which are based on Type Converters.

Database type .NET Type
BFile System. Byte[]
BinaryDouble System.Double
BinaryFloat System.Decimal
BinaryInteger System. Int32
Blob System. Byte[]
Boolean System. Byte
Character System. String
Char System. String
Clob System. String
Date System. DateTime
Decimal System. Decimal
Dec System. Decimal
DoublePrecision System. Double
Float4 System.Decimal
Float System. Decimal
Integer System. Int32
IntervalDayToSecond System. TimeSpan
IntervalYearToMonth System. Int64
Int System. Int32
LongRaw System. Byte[]
Long System. String
NChar System. String
NClob System. String
NVarChar2 System. String
NaturalN System. Int32
Natural System. Int32
Number System. Decimal
Numeric System. Decimal
PlsInteger System. Int32
PositiveN System. Int32
Positive System. Int32
Raw System. Byte[]
Real System. Single
RefCursor System. object
RowId System. String
SignType System. Int32
SmallInt System. Int16
String System. String
TimeStampWithLocalTimeZone System. DateTime
TimeStampWithTimeZone System. DateTime
TimeStamp System. DateTime
URowId System. String
VarChar2 System. String
VarChar System. String
XmlType System. String

Model first type mappings

If specified, the filter is combined with the .NET type to determine the database type. The elements length, precision and scale are the max. length, precision and scale of an entity field with the particular .NET Type. For instance a field with type System.String, max. length set to 50, will with all defaults enabled, a database type of NVarChar(50).

If a controlling setting is specified, that setting has to be set to the specified value (in the Relational model data element construction section of the Project Settings) to make the designer select that database type.

.NET Type Filter Database type Controlling setting and value
System.Byte[] 0 < length < 2000 Raw
System.Byte[] length==0 or length >= 2000 Blob
System.DateTime Date
System.Decimal Number(precision, scale)
System.Double BinaryDouble
System.Single BinaryFloat
System.String length==0 or length >= 4000 Clob
System.String 0 < length <= 2000 Char(length) Prefer natural character types set to false and Prefer variable length types set to false
System.String 0 < length <= 2000 NChar(length) Prefer natural character types set to true and Prefer variable length types set to false
System.String 0 < length <= 2000 VarChar2(length) Prefer natural character types set to false and Prefer variable length types set to true
System.String 0 < length <= 2000 NVarChar2(length) Prefer natural character types set to true and Prefer variable length types set to true
System.String 2000 < length < 4000 NChar(length) Prefer variable length types set to false
System.String 2000 < length < 4000 NVarChar2(length) Prefer variable length types set to true
System.TimeSpan IntervalDayToSecond
System.Int64 IntervalYearToMonth

Supported target frameworks

The following target frameworks are supported with SQL Server:

  • LLBLGen Pro Runtime Framework