Lets say I created a webapp that I want to make it more scaleable.
How it would work now
If I want to "sell" the webapp I have to do the following:
- Rent a new hosting
- Copy the code to the hosting
- Create a DB and the tables and change the names in the db
The users table will be used to check the user that wants to log in and the other data tables just store data and work together (joins and so on)
This is not really scalable... you have to do allot of manual things to set up
How I want it to work
A platform (so automate most of the setting up). This will make it easier to maintain the code (centeralized codebase) and there is no hassle with creating tables/db's.
Here is where I lack overview/knowledge...
- Do I generate new tables for each client that this client's users will use ?
- Or do I generate new DB's each time with same name-tables ? But if some user logs in then I have to switch to another DB. (how would i check that)
- Or can I dump all in 1 db and the same tables and create an extra column to reference which company they belong to ? The problem with this it can have performance issues over time. Count around 7800 rows for each client, each year.....
Tbh I dont expect to get allot out of it but I was always really interested how to make scaleable platforms instead of copy/pasting code to other hostings. (what I generally do)
The question is how to do this ? Its not a discussion what is the best way but more just how you can do this or how most companies do this