5 ms·
Why wouldn't you always use something that is tried-and-true? MongoDB is relatively new compared to something like postgresql or even mysql.
by epmaybe 9y ago
Why wouldn't you always use something that is tried-and-true? MongoDB is relatively new compared to something like postgresql or even mysql.
- wmf 9y agoIf you think that every tried-and-true database is slower to develop against.
- klodolph 9y agoThe hope is that new technologies would provide some advantage, like prototyping speed. That was certainly true of Ruby on Rails, for example, back when it was the new kid on the block and the "tried and true" frameworks were stuff like Struts or Spring. Yes, that's not a database technology example.
- squeaky-clean 9y agoIf you actually need certain features like a document store, then Postgres is less mature than MongoDB in that regard.
- memracom 9y agoHave you actually studied the JSONB capabilities of PostgreSQL and related features such as partial indexes? These things can be used at scale and there is at least one company that has millions of partial indexes in production. And you might want to look at how SalesForce has implemented a highly scalable architecture on top of Oracle RDBMS servers. That includes a document store as well as a dynamic denormalized schema layer that works real well for reporting. Heck, I've implemented a persistent memcache server on top of SQLITE and it scaled pretty well because modern servers and network infrastructure just happen to do most of the work needed. It is not easy to learn PostgreSQL well enough to evaluate it, but more and more people are doing so and finding that it is the ideal open source persistence solution for the vast majority of business uses.
- squeaky-clean 9y agoHonestly you can say any of these things about MongoDB. Their marketing team sure does. Did you know MongoDB is web scale? I'm not insulting Postgres (actually a big fan), but Postgres added JSON support after. By that metric, document store in Postgres is less tried-and-true than MongoDB. Does that mean it's the wrong choice? No. Age of product is not always a good qualifier.
- rosser 9y agoI'll take "less mature" over "data loss" every day and twice on Sunday. Whatever else you might say about Postgres, that community cares about the integrity of its users data, over pretty much every other consideration. I don't think the same can be said of Mongo, or any other "NoSQL" anything.
- bdcravens 9y ago> I don't think the same can be said of Mongo, or any other "NoSQL" anything. I feel pretty good about DynamoDB, but the development model WRT to indexes and throughput is what keeps me away.
- squeaky-clean 9y agoThat's exactly my point. Postgres JSON support is "relatively new" (quoting OP) compared to Postgres. So clearly MongoDB is better right? Except it's not and age of the product is a bad qualifier. The MongoDB hate hype train is even worse than the MongoDB hype train ever was.
- bdcravens 9y agoThe problem most developers who think they do really don't need a document store. They're just storing data and fields and relationships.
- Daishiman 9y agoYou can reimplement 95% of the "document model" with a relational database just fine, and you'll actually come out ahead given all its advantages. Unstructured documents are very rare. Querying arbitrarily against them even more so. For the fields that do need querying in a document, put them apart and add a few indexes and you're good. That's been my experience and I've been around a while.
- memracom 9y agoNot only that but you can use PostgreSQL as a NoSQL and there are benchmarks showing that it outperforms MongoDB. And if you do not want to commit to either SQL or NoSQL, the PostgreSQL has you covered. You can put a JSONB column in any of your tables to handle the part of your data that is schemaless, and you can still index the data in that JSONB column. There are a very few applications that need distributed scalability beyond what Oracle or PostgreSQL can provide, and those ones need NoSQL. They also need highly skilled competent developers who are capable of reimplementing some needed functionality of RDBMSes at scale.
- klodolph 9y agoThese PostgreSQL features are relatively recent. The jsonb column type dates back to 9.4, which was released in Dec 2014, less than three years ago. MongoDB had been around for well over five years by that point. There are few applications that need distributed scalability beyond what PostgreSQL can provide, but I'd argue that it's not uncommon to have problems with Oracle scalability, if you don't have deep pockets for licensing.
- matthewrudy 9y agoPostgres had hstore for a few years before that which solved similar use cases, but was only key value (no nested objects)
- s_kilk 9y agoPlus, hstore can only handle strings, so it's actually pretty bad when weighed up against a json-store
- rhinoceraptor 9y agoYep, you can't do stuff like update JSON in place until PG 9.5 (without resorting to a crazy regex, that is). You also do have to think at least a little about your JSON structure given you can't really use an ORM to query JSONB, and the syntax for JSONB is a bit awkward at times.
- 9y ago
- rubyn00bie 9y agoMy guess... SQL is a lot for newcomers to grasp on top of learning the rest of their stack. The appeal of "no schema" is most likely what gets them as it seems easier than SQL. Simple things at first seem daunting like: constraints, joins, and indexes. What they fail to see is that doing these database level things in the application layer becomes the final level hell and you get to live it. People also undervalue their data and it's integrity. I personally do not like mongo and see zero reason for it except perhaps in some very niche use cases and even then, I'd still choose another document store over it.
- gautamdivgi 9y agoMaybe I'm too old now... but SQL is relational algebra translated into some sort of code/language. I did a lot of SQL & relational algebra for my undergrad databases class [which was about 20 years ago now]. Has SQL/DBs been phased out of CS education? Just genuinely curious...
- always_good 9y agoDoesn't really matter if it has or not given how many developers don't have a formal technical education.
- wmf 9y agoEven 20 years ago the database class was optional for us. I didn't take it because networking was more interesting.
- deleted 9y ago[deleted]
- bluedino 9y agoI have an intern who's bout to graduate from a state university and has taken 0 classes on the implementation of compilers or databases. Java, Java. Java.
- reitanqild 9y ago