3

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

  • 2
    I think you're overthinking this. It's probably worth storing the images outside your DB (e.g. put them in S3 if you're using Amazon services), but for the rest I'd wait until there was a good reason (measurable performance issue, for example) to do anything other than use one database. – jonrsharpe Jan 15 '17 at 11:42
  • You may be right, I think ill follow what you're saying, thank you! – QConscious Jan 15 '17 at 11:53
  • 2
    Don't give too much on buzzwords like scalability, distribution and alleged performance bottlenecks to be countered by redundancy! Not every startup is Google or Facebook. For a relational database, correct design is most important, such as normalization and indexing. That it's according to relational rules, not like a kid playing around with SQL Server Management Studio, or somebody creating Excel tables. Then, if necessary, fast query and analysis functionality may be built on top of that. – Erik Hart Jan 15 '17 at 14:44
1

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.

|improve this answer|||||
  • Basically all of it is going to be structured, and I plan on using SQL for it. I think I may just be overthinking it like the person who commented suggested. I was thinking it would be more efficient to have 3 sql databases with less tables int hem all. But there doesn't seem to be much of a reason for that – QConscious Jan 15 '17 at 11:53
  • Splitting relational databases is a really difficult topic and should really not be done just for alleged performance gains - which will in part be spoiled by synchronization efforts. And it's completely useless on the floating mainframe in the sky (aka cloud), where there is no actual control over the physical locations. – Erik Hart Jan 15 '17 at 14:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.