Oracle实体框架兼容供应商的比较? [英] Comparison of Entity Framework compatible providers for Oracle?

查看:204
本文介绍了Oracle实体框架兼容供应商的比较?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经看过类似的问题和答案,但是似乎没有处理这个确切的问题,除了一个是过时的(从2009年到EF4之前)。


$ b $有没有人对Oracle的EF提供商有任何积极或消极的经验,如果你的经历是什么?



类似的问题:

实体框架和Oracle _
可以使用Microsoft Entity Framework与Oracle吗?
使用oracle数据库的实体框架
如何为.Net应用程序选择Oracle提供程序?



提供商我知道:

Oracle的ODP.NET: http://www.oracle.com/technetwork /topics/dotnet/index-085163.html _
Devart的DotConnect: http://www.devart.com/dotconnect/entityframework.html _
DataDirect的进度: http://www.datadirect.com/products/net/release-history.html

OPENLINK: http://uda.openlinksw.com/dotnet/



我知道Oracle的提供商目前是beta(3),并没有完全管理 - 32位vs 64位的独立二进制文件。



其他的都是稳定的?

有没有我错过的???
哪些已经在你的项目中成功使用?

解决方案

我对不同提供商进行了一个快速比较:


  1. 安装体验。

  2. 连接。

  3. 服务器资源管理器的体验。

  4. 从数据库更新

  5. 数据类型映射(数据库第一)。






以下是结论:



1。安装经验



Oracle的ODP.NET(beta 3):
复杂安装单独的x86和x64版本,不适用于Windows的安装程序。
填写系统路径(危险地接近最大长度),不安装到标准文件夹(程序文件+ appdata)。



Devart的DotConnect:



DataDirect的进度:
平滑的安装,提供者DLL已完全管理。



OPENLINK:
似乎需要服务器端安装,没有进一步测试。



2。连接性



Oracle的ODP.NET(beta 3):
复杂配置,需要在客户端机器上安装Oracle, Oracle安装或一个长而复杂的连接字符串,看起来像LISP / Scheme。

更新:在文档中找不到这个连接字符串,但连接字符串也可以包含简单的数据源定义例如serverName:port / serviceName。



Devart的DotConnect:
简单连接字符串+向导。



DataDirect的进度:
简单连接字符串+向导。



3。服务器资源管理器的经验。



Oracle的ODP.NET(beta 3):
这三个功能最强大,可以轻松编辑,查看密钥和索引。



Devart的DotConnect:
查看表和字段。



DataDirect的进度:
启用简单的编辑,查看按键和索引。



4。从数据库体验(数据库第一)更新。



Oracle的ODP.NET(beta 3):
简单。



Devart的DotConnect:
显示所有模式的表,没有选项可以过滤 - 使查找表枯竭。



DataDirect的进度:
直截了当。



5。数据类型映射(数据库第一)。



Oracle的ODP.NET(beta 3):
数字(1,0)的默认映射,数字(2,0)和数字(3,0)是错误的*。
可以手动覆盖数字(2,0)和数字(3,0)。修正号码(1,0)不起作用(至少不在beta 3 - 可能在beta 2中有效)。



更新: b> 现在发布版本(112030)已经被修复了。
可以通过 app.config文件中的部分进行某些映射。



Devart的DotConnect:
显示所有模式的表,无需过滤的选项 - 使查找表枯燥。
二进制浮点数,二进制双倍,带有时区的时间戳,数字(2,0),数字(3,0)和数字(4,0)的默认映射都是错误的*。手动覆盖应该工作 - 没有检查。



DataDirect的进度:
默认映射是OK *。



类型.NET数据类型
整数小数
int十进制
smallint十进制
长字符串
十进制小数
rowid字符串
float十进制
double Decimal
binary float Single
binary double Double
char [40] String
charvar [40] String
natchar [40] String
natcharvar [ 40] String
natcharacter [40] String
natcharactervar [40] String
number Decimal
numeric十进制
nvarchar2 [40] String
real Decimal
date DateTime
timestamp DateTime
timestamplocal DateTime
timestampzone DateTimeOffset
xml String
raw15 Binary
raw16 Guid
raw17 Int64
号(1,0) Boolean
数字(2,0)字节或SByte
数字(3,0)字节或SByte(接受Int16也可以)
数字(4,0)Int16
数字(5,0)Int16(接受Int32也可以)
数字(6,0)Int32
数字(7,0)Int32
数字(8,0)Int32
数字(9,0)Int32
数字(10,0)Int32(接受Int64也可以)
数字(11,0)Int64
数字(15,0)Int64
number(16,0)Int64
number(17,0)Int64
number(18,0)Int64
number(19,0)Int64(接受的十进制也可以)
number(20,0)Decimal(将接受Int64也可以)
number(21 +,0)十进制

如果您希望数据库类型能够在.NET类型范围内存储任何数字,则
IntX需要一个数字(N,0),其中Ceil(log10(2 ^ X) )= N存储**。

  Bool(Int1)==> number(1,0)
字节(Int8)==> number(3,0)
Int16,UInt16 ==> number(5,0)
Int32,UInt32 ==> number(10,0)
Int64 ==> number(19,0)
UInt64 ==>数字(20,0)

**计算假定无符号数字,签名数字ceil(log(2 ^(X-1))。



数据类型假设的引用:_
TECH在网上 _
Devart

Oracle


I have read similar questions and their answers, however, it seems none deal with this exact question except for one, which is out of date (from 2009 - pre EF4).

Does anyone have any positive or negative experience with EF providers for Oracle, if so what is your experience?

Similar questions:
Entity Framework and Oracle
Can you use Microsoft Entity Framework with Oracle?
Entity framework with oracle database
How to choose an Oracle provider for .Net application?

Providers I know of:
Oracle's ODP.NET: http://www.oracle.com/technetwork/topics/dotnet/index-085163.html
Devart's DotConnect: http://www.devart.com/dotconnect/entityframework.html
DataDirect's Progress: http://www.datadirect.com/products/net/release-history.html
OPENLINK: http://uda.openlinksw.com/dotnet/

I know that Oracle's provider is currently beta (3) and is not fully managed - separate binaries for 32bit vs 64bit.

Are any of the others stable?
Are there any that I have missed?
Which have been successfully used in your projects?

解决方案

I ran a quick comparison of the different providers consisting of:

  1. Installation experience.
  2. Connectivity.
  3. Server Explorer experience.
  4. Updating from database experience (database first).
  5. Data type mappings (database first).


Here are the conclusions:

1. Installation experience.

Oracle's ODP.NET (beta 3): Complex installation of separate x86 and x64 versions, installers not designed for Windows. Fills system path (dangerously close to max length), does not install to standard folders (program files + appdata).

Devart's DotConnect: Smooth installation, provider DLL is fully managed.

DataDirect's Progress: Smooth installation, provider DLL is fully managed.

OPENLINK: Seems to require server side installation, did not test further.

2. Connectivity.

Oracle's ODP.NET (beta 3): Complicated to configure, requires Oracle installation on client machine and either additional TSN file in Oracle installation or a long and complex connection string that looks like LISP/Scheme.
Update: Couldn't find this in the documentation, however, connection string can also contain simple data source definition e.g. serverName:port/serviceName.

Devart's DotConnect: Simple connection string + wizard.

DataDirect's Progress: Simple connection string + wizard.

3. Server Explorer experience.

Oracle's ODP.NET (beta 3): Most powerful of the three, enables easy editing, viewing of keys and indexes.

Devart's DotConnect: Viewing of tables and fields.

DataDirect's Progress: Enables easy editing, viewing of keys and indexes.

4. Updating from database experience (database first).

Oracle's ODP.NET (beta 3): Straightforward.

Devart's DotConnect: Shows tables from all schemas, no option to filter - makes finding tables exhausting.

DataDirect's Progress: Straightforward.

5. Data type mappings (database first).

Oracle's ODP.NET (beta 3): Default mapping for number(1,0), number(2,0) and number(3,0) are wrong*. Can manually override for number(2,0) and number(3,0). Fixing for number(1,0) doesn't work (at least not on beta 3 - may have worked in beta 2).

Update: Now that the release version is out (112030) this has been fixed. Some mappings are possible via section in app.config file.

Devart's DotConnect: Shows tables from all schemas, no option to filter - makes finding tables exhausting. Default mapping for binary float, binary double, timestamp with time zone, number(2,0), number(3,0) and number(4,0) are wrong*. Manual override should work - didn't check.

DataDirect's Progress: Default mappings are OK*.

(*) Mappings I expected:

DB Data Type    .NET Data Type
integer     Decimal
int         Decimal
smallint        Decimal
long        String
decimal     Decimal
rowid       String
float       Decimal
double      Decimal
binary float    Single
binary double   Double
char[40]        String
charvar[40]     String
natchar[40]     String
natcharvar[40]  String
natcharacter[40]    String
natcharactervar[40] String
number      Decimal
numeric     Decimal
nvarchar2[40]   String
real        Decimal
date        DateTime
timestamp       DateTime
timestamplocal  DateTime
timestampzone   DateTimeOffset
xml String
raw15       Binary
raw16       Guid
raw17       Int64
number(1,0)     Boolean
number(2,0)     Byte or SByte
number(3,0)     Byte or SByte (accepted Int16 as OK too)
number(4,0)     Int16
number(5,0)     Int16 (accepted Int32 as OK too)
number(6,0)     Int32
number(7,0)     Int32
number(8,0)     Int32
number(9,0)     Int32
number(10,0)    Int32 (accepted Int64 as OK too)
number(11,0)    Int64
number(15,0)    Int64
number(16,0)    Int64
number(17,0)    Int64
number(18,0)    Int64
number(19,0)    Int64 (accepted Decimal as OK too)
number(20,0)    Decimal (would accept Int64 as OK too)
number(21+,0)   Decimal

If you want the database type to be able to store any number in the .NET type range then IntX requires a number(N,0) where Ceil(log10(2^X)) = N for storage**.

Bool (Int1) ==> number(1,0)
Byte (Int8) ==> number(3,0)
Int16, UInt16 ==> number(5,0)
Int32, UInt32 ==> number(10,0)
Int64 ==> number(19,0)
UInt64 ==> number(20,0)

** Calculation assumes unsigned numbers, for signed numbers ceil(log(2^(X-1)).

References for data type assumptions:
TECH on the Net
Devart
Oracle

这篇关于Oracle实体框架兼容供应商的比较?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆