r/mysql • u/gidorah5 • Nov 08 '24
question Multiple databases VS table nightmare
Hello there,
I've been working on a project that requires to store a lot of data (as per usual), and I'm confused about which solution I should chose (I'm using typescript for my BackEnd).
On one side, I want to have a database dedicated to my users, another for the books/authors...
But it is then impossible to have foreign keys between the databases (unless I am using InnoDB), and it also stops me from using an ORM.
On the other side, I could have one big database with the tables having names to refer to their data (user_data, book_author, book_data...) but I'll end up with a database that might exceed 100 or 200 tables, that will make it quite hard to maintain. The good side will be that foreign keys won't be a problem, and I unlock the possiility to use ORM (not that I need to use one, a query builder like Kysely is more than enough)
Does anyone who knows more than me on this topic could help me on this matter ?
View all comments
Show parent comment
2
u/squadette23 Nov 08 '24
If you split those tables among several databases, you will still have the same number of tables, and also you will have several databases to manage.
How many people are going to work on that project?