logoalt Hacker News

zemtoday at 12:54 AM5 repliesview on HN

I would love to read more about the pros and cons of using a single database, if anyone has pointers to articles


Replies

rawgabbittoday at 3:46 AM

The things that impact the most are locking/blocking, data duplication (ghosting due to race conditions), and poor performance. The best advice is RTFM the documentation for your database; yes, it is a lot to digest that is why DBAs exist. Most of these foot guns are due to poor architecture. You have to imagine multiple users/processes are literally trying to write to the same record at the same time; when you realize this, a single table with simple key-values is completely inadequate.

stackskiptontoday at 1:35 AM

SRE here who has dealt with this before.

Everything in article is excellent point but other big point is schema changes become extremely difficult because you have unknown applications possibly relying on that schema.

It's also at certain point, the database becomes absolutely massive and you will need teams of DBAs care and feeding it.

show 1 reply
sgarlandtoday at 3:36 AM

Pro: every team probably needs user information, so don’t duplicate it in weird ways with uncertain consistency.

Con: it’s sadly likely that no one on your staff knows a damn thing about how an RDBMS works, and is seemingly incapable of reading documentation, so you’re gonna run into footguns faster. To be fair, this will also happen with isolated DBs, and will then be much more effort to rein in.

brandmeyertoday at 4:27 AM

They are very similar to the pros and cons of having a monorepo. It encourages information sharing and cross-linkage between related teams. This is simultaneously its biggest pro and its biggest con.