HACKER Q&A
📣 cranberryturkey

Which database should I use?


I've been using surrealdb 1.x for the past 2 years or so. I love it. However there are some fundamental problems with it, and with 2.x they switched from string ids to object ids, which makes upgrading my 20 or so applications that have been using it a nightmare. I'm going to keep all those projects on surreal 1.x and will pick a new database. Problem is I'm not sure which one.

I'm not a huge fan on SQL because the more relations you have the more complex your JOINs become. It becomes a nightmare. I don't want to go down that path.

I've used mongodb before I switched to surrealdb, and it was pretty good for simple stuff, but for more complex queries it also becomes difficult. Also scaling it requires knowledge I currently don't have nor do I care to learn.

I'm looking at edgedb, cockroachdb and possible just got old fashioned mysql again if I have to do sql all over.

Are there any new dbs that have re-invented SQL at all besides surrealdb?


  👤 stately-bhollis Accepted Answer ✓
If you're interested in a MongoDB style document database, but don't like the fact that Mongo doesn't give you any tools around modeling your data, we're building a new database that takes a schema-first approach to NoSQL: https://stately.cloud/blog/developers-should-be-able-to-chan...

The main motivation for building StatelyDB was exactly what you describe in your first paragraph - the difficulty of migrating data and changing your mind once you've already got data in the database. We're building an elastic schema that you can easily migrate, with automatic backwards compatibility so you don't have to update your applications all at once. Take a look, we'd love feedback.


👤 bob1029
Have you looked into SQL features such as views and common table expressions? You can make the joins a lot easier with these tools.

No technology can reduce the inherent complexity of your problem space. If you are serious about whatever it is you are building, consider that using bespoke or atypical database solutions may reduce your chances of success by several orders of magnitude.


👤 xlinux
Both MySQL and Postgress support JSON datatype just in case you dont know

👤 redwood
Why not mongodb?