Should i use one data base per user on AWS RDS for MySQL?

0

I'm creating an application where each business will have;

  1. owner which is a user at some-business-name,
  2. Some information about the business (This part will actually change my app's UI)
  3. employees(Also users same as owner)
  4. permissions (for employees. Permissions for owner can't changed)
  5. customers
  6. ...

These are all unique to every business!

There is no limit on the number of businesses

I think i need a new database for each business with a unique business name (some_business_name). There is no limit on AWS RDS for MySQL based on https://aws.amazon.com/rds/faqs/ - "How many databases or schemas can I run within a DB instance?". So this should work right?

My question is:

  • Is this solution suitable for such an application?
  • What are the pros and cons?
  • Should i use DynamoDB instead?
  • Are there any articles I can use?

I'm new to MySQL, I think every answer will help me a lot. thank you 🙏

NOTE: I have to create this application using aws

profile picture
Arshia
asked 2 years ago795 views
2 Answers
1

What you are trying to build is essentially a multi-tenant solution on AWS. Although you could have a separate database per tenant, you don't necessarily need to have a separate database per tenant, as that will be very expensive.

Here are some good blogs that talk about building multi-tenant solutions, that you can use as guidance for building what you are trying to build

  1. https://aws.amazon.com/blogs/apn/building-a-multi-tenant-saas-solution-using-aws-serverless-services/

  2. https://aws.amazon.com/blogs/database/build-and-load-test-a-multi-tenant-saas-database-proxy-solution-with-amazon-rds-proxy/

  3. https://aws.amazon.com/blogs/database/multi-tenant-data-isolation-with-postgresql-row-level-security/

profile pictureAWS
EXPERT
answered 2 years ago
0

There is not enough information here to give a straight answer, but probably you do not want multiple schemas. If your application is expected to connect to multiple 'businesses' then you probably want a single schema. If you instead use 'per business' databases, your application will need to change the database context for each query.

AWS
MODERATOR
philaws
answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions