即席查询/更新是否开始影响您使用 MongoDB 的工作效率?

发布于 2024-12-03 10:38:12 字数 433 浏览 0 评论 0原文

我开发一个 ASP MVC 网站已经快一年了,现在完全在 mongodb 上。我大部分时间都喜欢它。使用 C# mongodb 驱动程序和 mongovue 等工具,开发效率非常高。

然而,我已经开始达到这样一个地步:有些事情我真的希望我有一个 SQL Server 数据库。更新数据库中的记录等简单任务以及仅生成某种类型的报告的稍微复杂的查询正在变得很痛苦。

我在某处读到一篇文章,为了让 NOSSQL 取得成功,需要有一个标准的查询语言,以及围绕它开发的工具。我猜这还很遥远,所以现在我正努力处理这些事情。

我想最终我将不得不拥有 monogDB 和 sql server 的双重解决方案。我认为我永远不会像使用 sql server 那样高效地更新和编写 mongoDB 查询。

当使用像 mongodb 这样的 NOSQL 时,你们是如何处理这个问题的?你面临着和我一样的问题吗?

i've been developing a asp mvc website for almost a year now exclusively on mongodb. i've loved it for the most part. development productivity has been great using a C# mongodb driver and tools like mongovue.

however, i've started to reach a point where there are things i really wish i had a SQL server database for. simple tasks like updating a record in the DB and only mildly complex queries to generate some type of report are becoming a pain.

i read an article somewhere that in order for NOSSQL to succeed there needs to be a standard query language for it, and tools developed around it. i'm guessing this is far far away, so right now i'm stuck trying to deal with these things.

i think eventually i will have to have a dual solution with monogDB and sql server. i don't think i will ever get to the point where i am as productive updating and writing queries for mongoDB as i was with sql server.

how are you guys dealing with this when using NOSQL like mongodb? are you facing the same issues as me?

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

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

发布评论

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

评论(3

骄傲 2024-12-10 10:38:12

您可以考虑的一种解决方案是 LINQPad。您可以设置一个引用 10Gen 驱动程序的模板,并像在代码中一样编写临时的 C# MongoDB 查询。我和我的团队使用这种方法来解决您提到的问题。

尝试一下(它是免费的),看看它是否可以帮助您解决简单的日常查询。

编辑 我也支持 Chris 熟悉原生 JSON 查询语言的建议。如果您了解语法,那么就速度而言,没有什么比快速控制台窗口更好的了。

One solution you may consider is LINQPad. You can set up a template with a reference to 10Gen's drivers and write ad-hoc, C# MongoDB queries like you would in your code. My team and I use this method to address the very problem you mention.

Try it out (it's free) and see if it can help with the simple, day-to-day queries you come up with.

Edit I also support Chris's suggestion of familiarizing yourself with the native JSON query language. Nothing beats a quick console window for speed, if you know the syntax.

倾城花音 2024-12-10 10:38:12

官方的 C# 驱动程序可能会在未来某个时间获得 LINQ 提供程序,因此这将为 .NET 开发人员提供熟悉的查询语法,并可能有助于提高初始生产力。还有一些不错的文档可以帮助将 MongoDB 查询与 SQL 关联起来:

这些非常适合学习,但要获得为了充分利用 Mongo,非常值得投入时间来习惯本机 JSON 查询语法和 Mongo 特定的概念(例如 map-reduce)。

The official C# driver will probably get a LINQ provider some time in the future, so that'd give .NET devs a familiar syntax for querying and maybe help with initial productivity. There're also some nice docs that help relate MongoDB queries back to SQL:

These are great for learning, but to get the most out of Mongo it's well worth investing time getting used to the native JSON query syntax and Mongo-specific concepts like map-reduce.

随波逐流 2024-12-10 10:38:12

既然你提出了问题,

你们在使用 NOSQL 比如 mongodb 时如何处理这个问题?

我想我应该插话一下。当我使用另一个 NOSQL 数据库 RavenDB 时,我感受到了你的痛苦。

我专门为与 RavenDB 的临时交互编写了一个 Linqpad 驱动程序。

https://github.com/ronnieoverby/RavenDB-Linqpad-Driver

Since your questions asks,

how are you guys dealing with this when using NOSQL like mongodb?

I thought I'd chime in. I felt your pain when working with another NOSQL database, RavenDB.

I wrote a Linqpad driver specifically for ad hoc interactions with RavenDB.

https://github.com/ronnieoverby/RavenDB-Linqpad-Driver

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