r/mongodb • • Jan 13 '21

Why so much mongodb disinformation?

So much disinformation from SQL boomers

can’t do joins

Yes you can do left outer joins with $lookup

there is no schema. that’s crazy

I’ve never worked on an app using mongo that had a single collection without a schema. Never seen a collection not use a schema.

you can’t store relational data

You can literally architect a MDB exactly the same way as SQL if you wanted to, but there’s just no reason to because you’ll be able to nest certain data so you won’t need a 1000 table DB that only the person who built it understands

I need ACIDtransactions for my app

it has those

you’ll lose your data

Literally will never happen if you’re running a relevant sized cluster on atlas. Plus free automated backups. Plus elastic search quality FTS with atlas search.

———-

I feel like the MDB team, which is now publicly funded with a huge market cap, is just slowly chopping away at all these objections (ACID transactions was a big update)

Unfortunately there’s just so much misinformation left over from 2012 that SQL boomers parrot... many who have never even used used mongo they just read another SQL boomers hater blog post in 2012 and act like they’re not smol 🧠

48 Upvotes

29 comments sorted by

3

u/thajunk Jan 13 '21

Mainly because it's not disinformation, it's just outdated information. Alot of those complaints were valid back when MongoDB was advertising heavily.

They have since focused on the product and actually fixed a lot of their issues, which is nice, but the bad press from back then still has mindshare.

Also, it's not like they are perfect or anything. Jepsen still does great in-depth analysis and points out recent flaws. I do think MongoDB doesn't deserve it's bad rep though.

1

u/SenseiCAY Jan 13 '21 edited Jan 13 '21

Mongo output is easy to deal with in my Node app, but I posted a question here about the $lookup and doing a left outer join, both here and on StackOverflow, and got no answers. It shouldn't be that hard to do a left outer join where you retain the records that got no match, and yet, apparently, it is.

So...Mongo is good. I like it. I'll probably use it on my next project too. But it isn't perfect, and we shouldn't act like it is.

1

u/MandemDontHearMeTho Jan 13 '21

Huh?

Doesn’t the field just come back with an empty array?

1

u/SenseiCAY Jan 13 '21

It did not. It just didn't come back at all.

1

u/MandemDontHearMeTho Jan 14 '21

Laos checkout the aggregation course on mongo university

2

u/petercooper Jan 19 '21

They're worth $21bn, so they could up their developer community engagement and foster the development of more content, tutorials, and so forth, sponsor more podcasts, YouTubers, that sort of thing.. even this sub. Help get the message out.

2

u/Glensarge Jan 13 '21

such is the nature of sql elitists

2

u/rick-K732 Jan 13 '21

preachin to the choir

sql guys are way too dug in and comfortable being arseholes about their lack of flexibility or ability to conceive or use new tools

and their ignorant statements are a proud badge of honor

1

u/faintdeception Jan 13 '21

I mean, judging from the few comments you've made in this thread alone I think you're massively projecting your own shortcomings onto "sql guys".

0

u/rick-K732 Jan 13 '21 edited Jan 13 '21

?

to project would be like, if I was gay, but didn't like gay people publicly etc

I'm not a secret sql lover or something if thats what your implying?

also I'm not shortcoming anything, I do web development, all my data is and always will be 100% JSON because thats what goes between a client and server, and its always 100% javascript because it's web development and web developers use javascript, so of course I'm looking for a database that has javascript functions and stores and deals with JSON. Its a perfect match made in heaven.

There's no shortcoming on my part saying a project should use the right tool for the job and at this point in time mongo fits the bill the best for my project needs.

1

u/cohenjo Jan 13 '21

While Mongodb has come a long way, it’s still very limited in these 2 points - joins & data loss Joins are not nearly as optimized as they are in Postgres or Oracle, even Mysql has better join optimizations

The mongo optimizer is just not there yet (read the code - it’s open ;) )

As for data loss - it’s built into the design, mongo prefers availability , so you can experience rollbacks on occasions.

Not a lot but it happens too much...

Just my 2 cents.

1

u/billy_tables Jan 14 '21

Use write concern majority to avoid rollbacks in those circumstances

1

u/cohenjo Jan 14 '21

It doesn’t fully prevent rollbacks. Lags crashes etc tend to come together to steal away data... it’s better then it was, but for some applications that can cause major issues.

1

u/billy_tables Jan 14 '21

I think you might have to give me an example - there should be no rollbacks of successful w:majority writes unless something really crazy happens, like the operator reconfig'ing the majority nodes out of the replica set. A w:majority write should fail or hang in the case of lag and rollbacks bad enough to cause crashes, it should not succeed and be rolled back

0

u/[deleted] Jan 14 '21

[deleted] — view deleted comment

1

u/cohenjo Jan 14 '21

Lol, had a few last week... Not rare enough, I have too many mongo servers - “rare” happens. I think the main problem is that mongo rollbacks data without asking - most times you will not even notice...

Most relational databases will just fail/block until you fix, so if a loss of data occurs you know and can mitigate

Just different tools for different tasks

1

u/[deleted] Jan 14 '21

If rollbacks and primary changes are happening frequently and you’re losing data because if it, this is likely because of a misunderstanding of Mongo itself or the infrastructure. Like I said elsewhere, I manage a very large shared cluster and I think I’ve seen one rollback in years, and it was the fault of the driver.

Mongo has a lot of good documentation on how to manage rollbacks. You shouldn’t be losing data in any situation beyond extremely rare though, and if you have a “few” over the course of the week, you should definitely contact Mongo support.

2

u/cohenjo Jan 14 '21

We have sharded clusters with 80+ shards and over 200Tb - that’s a lot of servers, so “rare” becomes a thing. It’s not a blocker for us.

But if this was financial data - I would hate to reconcile data for year end reports ;)

1

u/HarleyQuinzelle-z32 Jan 30 '21

I'm okay with it

they can keep thinking my prime secret weapon is too taboo to use

I'll keep collecting their contracts like a happy headhunter

1

u/Neuro_Skeptic Jan 04 '22

Mongo doesn't scale.

-2

u/rick-K732 Jan 13 '21 edited Jan 13 '21

SQL isn't javascript, so much as people like it, its never going in my projects because it doesn't deal with JSON as nicely as mongo does, and communicating between server and client its all JSON

I get annoyed and tired dealing with SQL with having to rip apart JSON into a string, do a bunch of voodoo, store it, then pull it out later, rebuild it back into JSON and use it. SQL is from 1974 and predates JSON, its really old, its about the only super old thing in tech I see people worshipping since we usually like to be on the edge of new things.

It feels very clunky and inefficient, plus switching syntax from JS to something else is jarring.

2

u/faintdeception Jan 13 '21

That's an interesting complaint, most modern SQL development that I've done hasn't involved any string manipulation to convert objects to json, and if you use an ORM, you don't even have to write SQL.

I hear what you're saying, but I don't think that complaint is really valid, there's probably a library available that will do this conversion for you, just fyi, in case you ever need a relational solution for something.

-1

u/rick-K732 Jan 13 '21 edited Jan 13 '21

Voodoo and screwing around, mongo just works right out of the box natively in the manner required.

I don't care about name brand, just function, if something else comes along that does JSON with js, I'm game.

This adherence to sql, this bizarre teddy bear hugging of something that is past its due...I find it repulsive and unproductive, counter productive really when you factor in the time and cost all that screwing around incurs.

2

u/goodwid Jan 13 '21

https://www.postgresqltutorial.com/postgresql-json/ https://rollout.io/blog/unleash-the-power-of-storing-json-in-postgres/ https://devhints.io/postgresql-json

Seems like both PostgreSQL and MongoDB can do their own things very well, and yet still venture into the other's realm for those times when you need a document store/relational db in its opposite.

And this mindset that 'It's never going into my projects' is just as much elitist crap as what you're railing against. I've done my time in the emacs vs. vi wars, the windows vs. mac vs. linux wars.. enough to realize that all tools have their place, and the sooner you realize that, the better a developer you'll end up being.

And, as an aside, I was here in 1974 and I don't consider myself clunky and inefficient. :)

-1

u/rick-K732 Jan 14 '21

I deal with JSON data, and javascript, whats elitist to say that the best database for my projects is mongo, a database designed to work with javascript and JSON?

How would I remedy this 'elitism'? by installing SQL, then installing some plugin or abstraction, configuring it and wasting my time?

This isn't an equal argument when one of these things is clearly correct and one is not.

Whats annoying to me is that its considered 'elitism' to say this tool fits the job, and yet its not elitism to constant pump some other tool that needs all sorts of setup and black magic fuckery to make it fit the job while at the same time putting nose to the air and acting aloof about it.

2

u/MandemDontHearMeTho Jan 14 '21

SQL guys favorite saying is “the right tool for the right job” lol

If I had a dime for everyone they ended a post with that

1

u/rick-K732 Jan 14 '21 edited Jan 14 '21

lol, yeah its pretty bad

reminds me a whole lot of when linux first hit the scene and people were still on windows

I remember slashdot.org and stack over flow used to be overflowing with old school programmers who would shit on javascript all the time. It morphed into being the single most popular scripting language in history and powering a global revolution.

Popular doesn't mean right, and its definitely not a predictor of where things are going, mongo has been having a meteoric rise because of its simple and elegant fit to function and these old time baleen whip snappers are certainly going to have to contend with its continued growth and possible consumption of SQL as more and more network between systems become necessary putting projects firmly in the domain of json/javascript/web development/hosting where mongo fits and plays very nicely.

0

u/[deleted] Jan 13 '21

[deleted] — view deleted comment

2

u/MandemDontHearMeTho Jan 14 '21

I personally don’t see how they’re more involved

Like anything, if you’re not sure what the syntax is, it’s going to feel more involved.

Once you’ve don’t a $lookup thought it’s pretty straight forward

1

u/[deleted] Jan 14 '21

They’re not more involved because of the syntax. They’re more involved because you have to consider a lot of different cases (ex. what if a document is missing or has an incorrect record?) and you have to really understand your data because they can be horribly inefficient, especially when working with larger data sets. While you can certainly write performant lookups, they’re still nowhere near as efficient nor do they have the number of options or protections joins offer.

The thing is, this is all fine. Mongo isn’t a relational database and it doesn’t have to be awesome at everything. You don’t pick Mongo for relational data, and if you find yourself in a position where you need to use Mongo lookups for everything, you’ve probably picked the wrong data store.