寻找有关嵌入式 .NET 数据库(例如 db4o、NHibernate 或 RavenDB)的指南

发布于 2024-09-16 08:21:55 字数 258 浏览 4 评论 0原文

我有一个想要使用嵌入式数据库存储的对象模型。到目前为止,我一直在研究 db4o、NHibernate 到 SQLCE(带 linq)和 RavenDB。这将在桌面 C# 应用程序中使用。

我希望利用的关键功能是:Linq 或类似的查询功能(无 SQL 或 HQL)、嵌入式数据引擎、pocos、poco 第一个模型、无需安装(无注册表或类似功能)

有人能推荐一个吗?我正在考虑的三个是最佳选择吗?还有其他选择吗?在这三者中,有人可以推荐其中之一吗?

谢谢

I have an object model that I want to store using an embedded database. I have so far been looking at db4o, NHibernate to SQLCE (w/ linq), and RavenDB. This would be used in a desktop C# application.

The key features I am looking to leverage are: Linq or similar for queries (no SQL or HQL), Embedded data engine, pocos, poco first model, no install (no registry or similar)

Can any one suggest one? Are the three I am looking at the best choices? Are there other options? Of the three, can anyone recommend one over the other?

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

岁吢 2024-09-23 08:21:55

嗯,这三个建议的数据库本质上非常不同。 SQLCE 与 Hibernate 作为带有 ORM 的 RDBMS,db4o 作为对象数据库,RavenDB 作为文档数据库。他们每个人都有自己的优势。

SQL CE 和 SQL CE NHibernate-Combo
优点:

  • 在工具、知识和大社区方面有非常好的支持
  • 易于升级到 MS SQL 服务器
  • 极好的报告支持
  • SQL 的强大功能

缺点:

  • 需要映射
  • OO 和关系世界之间的映射并不容易,而且可以导致复杂模型的问题。

RavenDB

优点:

  • 不需要任何映射
  • 易于使用
  • 强大的索引
  • JSON 和索引HTTP 访问

坏处:

  • 如果您的域不适合面向文档的方法,那将会非常痛苦
  • 它不支持 .NET Framework Client Profile(这一点特别重要,因为 OP 的问题涉及嵌入式数据库)

< db4o 的

优点:

  • 不需要任何映射
  • 易于使用
  • 存储模型接近于对象模型。这也适用于非常复杂的模型。
  • -

缺点:

  • 工具支持薄弱。

Afaik 这三个都支持 LINQ 和 POCO-first 方法。然而自从NHibernate & SQL CE 仍然需要大量的映射,但它并没有尽可能地无摩擦。

我认为如果您首先关注的是 POCO、LINQ 支持、嵌入用法和易于使用,我会尝试 RaveDB 或 db4o。
如果您的重点是“安全”、社区知识、工具支持和报告,我会选择 NHibernate 和 SQL CE。

Well the three suggested databases are very different in their nature. SQLCE with Hibernate as RDBMS with a ORM, db4o as object database and RavenDB as document database. Each of them has its strengths.

SQL CE & NHibernate-Combo
The good:

  • Extremely good support in tooling, the knowledge and a big community is there
  • Easy to upgrage to MS SQL servers
  • Extrem good reporting support
  • The power of SQL

The bad:

  • Needs mapping
  • The mapping between the OO and relational world is not easy and can lead to issues with complex models.

RavenDB

The good:

  • Doesn't need any mapping
  • Easy to use
  • Powerful indexing
  • JSON & HTTP access

The bad:

  • If your domain doesn't fit to a document-oriented approach, it will be quite painful
  • It does not support the .NET Framework Client Profile (which is of particular importance as the OP's question is concerning embedded databases)

db4o

The good:

  • Doesn't need any mapping
  • Easy to use
  • The storage model is close the object-model. This also works for very complex models.
  • -

The bad:

  • Tooling support is weak.

Afaik all three support LINQ and POCO-first approach. However since NHibernate & SQL CE still need tons of mapping its not as friction free as it could be.

I think if your focus is on POCO first, LINQ-support, ebedded usage and easy to use, I would try RaveDB or db4o.
If your focus is on 'safety', community-knowledge, tool-support and reporting I would go with NHibernate and SQL CE.

时光磨忆 2024-09-23 08:21:55

Firebird 是一个出色的嵌入式数据库,长期以来一直支持企业数据库的所有现代功能:

  • ANSI SQL
  • ACID
  • 存储过程
  • 触发器

您可以获取 .NET 提供程序(根据该网站,最后更新时间为 5 月 24 日)它支持实体框架和Linq。

Firebird is a terrific embedded database which has long supported all the modern features of an enterprise database:

  • ANSI SQL
  • ACID
  • Stored procedures
  • Triggers

You can get the .NET provider (last updated May 24th according to the site) and it supports Entity Framework and Linq.

穿越时光隧道 2024-09-23 08:21:55

请参阅此问题。对于 LINQ 支持,请查看 DbLinq,或者由于您已经打算使用 NHibernate,因此可以使用 NHibernate自己的 LINQ 提供商。

See this question. For LINQ support, check out DbLinq, or since you already intend to use NHibernate you can use NHibernate's own LINQ provider.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文