Database structure

Hello everyone,
Iโ€™m making an app for 3 different customers, they all have languages centers. I have many tables: Languages, Groups, Teachers, Classrooms, Students, Parents, Attendances, โ€ฆ etc

My first try: I made the app and itโ€™s worked, and then I made 3 copies, one for each center, and then I thought if I will get more customers, do I need to make a copy each time ? and if I want to update the app, do I need to do it separately for each customer ? โ€ฆ itโ€™s not a good idea at all.

My second try which is more better than the first one: I have added a column โ€œCenter IDโ€ in every single table of the app and added for each table โ€œSecurity Filtersโ€ to filter the tables by โ€œCenter IDโ€ so each customer sees only his data, and then I got scared when I saw this:

The question is: am I doing right with adding the column โ€œCenter IDโ€ in every single table ? or there is a better way to do it to achieve the same result โ€œevery customer sees only his dataโ€.

I appreciate your help, thank you.

0 2 282
2 REPLIES 2

Steve
Platinum 4
Platinum 4

Itโ€™s a good approach. You might also try partitioning:

Thank you @Steve, so I will continue with my approach.
The partitioning needs the Business plan and I want to stay in Pro plan for the moment.
Thanks again

Top Labels in this Space