18 ms·
Each has its place. Three years ago I started a new project and elected MariaDB. I was coming from a project that was using MongoDB. Because the new project se
by codazoda 6y ago
Each has its place.
Three years ago I started a new project and elected MariaDB. I was coming from a project that was using MongoDB. Because the new project seemed to have very structured data, mostly coming from third party systems, I opted for a structured solution.
Three years later and my structured database has tons of tables and requires lots of brain twisting joins. It slowly evolved this way, while our UI basically evolved to use a single React "state" to represent an "order".
It's tempting to consider what it might be like to store an order as a single Mongo document and forget all this structure.
- ramraj07 6y agoThis never made sense. How can you forget the structure? Either you code the Structure in the schema or in random places in your code as dictionary keys, which seems far more unwieldy.
- codazoda 6y agoI used to agree, but this project feels different. I don't think it would require much structure in my system. I just deal with a single order. Then, I take pieces of that and send it out to a couple 3rd party API's. Those API calls are structured, sure, but so is a document. I only load orders by their order number and then deal in the order as a whole. My joins are primarily to pull in all the pieces I need for an order. Maybe this is just my current, "the grass is greener" view, but I wonder.
- paulryanrogers 6y agoPostgresql has JSONB if the data isn't too dense. Then again there's also the file system.
- CharlesW 6y ago> Each has its place. NoSQL encompasses many, very different types of databases. Were you thinking about document-store DBs here?
- codazoda 6y agoYes, for sure. My NoSQL experience is primarily with MongoDB, which is a document store.
- nunodonato 6y agoI use mysql for all my pet projects...but thats just because it is what I have always done for years. Should I switch to Maria DB?why?
- codazoda 6y agoMariaDB was created by the same guy who created MySQL after MySQL was sold to Oracle. They have diverged now but MariaDB has great compatibility (it works out of the box with many tools). It's just my preference right now.
- nunodonato 6y agoYeah I was aware of its history and compatibility. Just never got into what made it worth to make the switch. Although ditching anything related with Oracle is always a good reason