Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

are adhoc queries/updates starting to kill your productivity with MongoDB?

Tags:

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?

like image 396
mdd Avatar asked Sep 05 '11 02:09

mdd


2 Answers

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.

like image 95
SethO Avatar answered Nov 16 '22 06:11

SethO


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:

  • SQL to Mongo Mapping Chart
  • SQL to MongoDB (PDF)

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.

like image 1
Chris Fulstow Avatar answered Nov 16 '22 07:11

Chris Fulstow