Earlier quoted context omitted.
I’m a big fan of Mongo for the use case you described - searching by ID and all information in one document. But people don’t seem to understand that there are plenty of scenarios where you really either don’t know the schemes in advance and/or the “schema” is defined by an external source. I worked for a company that sold software that allowed users to create forms that could be filled out either on the web or via a…
PostgreSQL's JSON columns are pretty powerful
Was MongoDB Ever the Right Choice?
91–100 of 224 posts
Re: Was MongoDB Ever the Right Choice?
#92It is still in production as the main database in a startup I joined in 2010 and kicked off their software's development. I've been through smaller ups and downs, but we never lost data. The reason why I loved it back then and still do today (I'm using mongodb in my own little webapp) is the speed of development. The few data migrations that I had to write in over eight years where nothing compared to what you'd have…
The product I work on has ~400 tables active at the moment, and ~800 that have ever existed in it over the last 6 years. We depend on the database schema to reduce complexity at the application level.
I don’t think the complexity would be manageable at the application level if we couldn’t do this. At least not with the ~6 engineers working on it.
Re: Was MongoDB Ever the Right Choice?
#93While I think MongoDB is deserving of a lot of the criticism it receives I think the bigger issue is with those who adopt it without a full understanding of their data and the use cases they might need to implement. There are countless stories now from people who assumed their data wasn't relational only to discover much later on that the opposite was true. There are cases where a document oriented datastore could be…
There's no reason you can't use MongoDB with relational data. Foreign references? They've got them. https://docs.mongodb.com/manual/reference/database-reference... ACID transactions? They've got them. https://www.mongodb.com/transactions
Re: Was MongoDB Ever the Right Choice?
#94MongoDB was great to me for prototyping, either manually or with tools like Meteor.
Re: Was MongoDB Ever the Right Choice?
#95Since everyone is sharing their opinion and experience with mongodb I think I’ll share mine. As an appeal to authority I would like to mention that I have relevant vocational qualifications on the subject (more geared towards scalability and operations). Although I don’t believe it really matters - it will to those who assume I don’t understand best practice. MongoDB itself is not /really/ a valid choice in many scen…
I work a lot with documents in my current role which includes a lot of JSON structures as well.
MongoDB has been immensely useful for a team with limited scope (and requisitional abilities within the organization) to get up and running and store backups of documents that have been processed and JSON API responses.
I definitely wouldn’t apply it as a panacea, either.
Like any tool, it has it’s place in the belt for me. It’s no universal hammer, though.
Re: Was MongoDB Ever the Right Choice?
#96Re: Was MongoDB Ever the Right Choice?
#97Earlier quoted context omitted.
PostgreSQL's JSON columns are pretty powerful
And the tooling around it? For instance the Mongo C# Linq driver can translate LINQ to MongoQuery.
Re: Was MongoDB Ever the Right Choice?
#98Earlier quoted context omitted.
There's no reason you can't use MongoDB with relational data. Foreign references? They've got them. https://docs.mongodb.com/manual/reference/database-reference... ACID transactions? They've got them. https://www.mongodb.com/transactions
But why wouldn't I just use Postgres instead?
Re: Was MongoDB Ever the Right Choice?
#99These "caveats" are mostly false, or outdated. > Loss of transactions MongoDB 4.0 supports ACID transactions: https://www.mongodb.com/transactions > Loss of relational integrity (foreign keys) > Having a database enforce these relationships can offload a lot of work from your application, and therefore from your engineers. I've never seen anyone use MongoDB without also using something like Mongoose where you get all…
The problem with thinking a library like Mongoose satisfies those constraints is that it only works with a single application. Every database I've worked with that made it beyond a prototype outlived the original application. So you either end up building an RDBMS app/api in front of mongo for every new application to use or you have to translate those constraints to every client. I'm of the opinion to let the "aweso…
I may have misread your comment but rarely do more than one client application access a database. Especially in today's often Microservices architecture. So using a library as mentioned is fine. And as the app evolves/gets rewritten you can keep the library or replace it with a similar one.
Over 10+ years ago I did join a few projects with existing architecture that had evolved to multiple applications accessing the same database. And they were a nightmare but that is rare to encounter these days as most people have learned that one app = one DB. (Data warehousing is a possible exception, but mostly those datasets are exported instead as well as streams for machine learning).
Probably preaching to the choir but multiple clients mean feature freeze/deadlock, no DB refactoring and spaghetti architecture.
Re: Was MongoDB Ever the Right Choice?
#100Since everyone is sharing their opinion and experience with mongodb I think I’ll share mine. As an appeal to authority I would like to mention that I have relevant vocational qualifications on the subject (more geared towards scalability and operations). Although I don’t believe it really matters - it will to those who assume I don’t understand best practice. MongoDB itself is not /really/ a valid choice in many scen…
I’m a big fan of Mongo for the use case you described - searching by ID and all information in one document. But people don’t seem to understand that there are plenty of scenarios where you really either don’t know the schemes in advance and/or the “schema” is defined by an external source. I worked for a company that sold software that allowed users to create forms that could be filled out either on the web or via a…
This would fit in a single SQL query which is expected to perform reasonably well, with an unstructured database optimizing this query will take months of work.