Database Design – Choosing Between Multiple Databases or a Single Database

data structuresdatabasedatabase-designsql

I've seen a few answers on this already but nothing that really applies to my particular situation.

I'm going to be building a mobile application, so primarily phones, tablets etc. Probably using Amazon Web Services, and I plan on having large amount of user data among other things, like statistics, images and so on.

So I'm curious what would work better in terms of what will scale better, and will be more efficient in its queries, separating all the different types of data into databases or just have one massive one.
The way I'm thinking now if I were to do them separately I would have about 3 databases based on the cloud.

Any thoughts on this would be appreciated, thanks

Best Answer

Relational databases are for structured data with a meaning; images or large texts should better go to a file storage (or a database suitable for this, like key value store).

While relational DBs can store large, unstructured data and texts (BLOB/VARBINARY(MAX) or NCLOB/NVARCHAR(MAX)), it's not their primary purpose, and they may be wasteful with this.

Different databases / polyglot persistence have the problem of synchronizing transactions across multiple systems. So how much structured data do you have? This is important on whether you need a relational DB at all.

Related Topic