I'm about to start a Database Design that will simply manage users under companies.
- Each company will have a admin area that can manage users
- Each company will have around 25.000 users
- Client believes to have around 50 companies to start
My main question is
Should I create tables based on Companies? like
users_company_0001
users_company_0002
users_company_0003
...
as each company will never use "other" users and nothing will need to sum/count different tables in all user_company (a simple JOIN
will do the trick, though it's more expensive (time) it will work as having the main picture, this will never be needed.
or should I just create a users
table to have (50 x 25000) 1 250 000 users (and growing).
I'm thinking about the first option, though, I'm not sure how would I use Entity Framework on such layout... I would probably need to go back to the 90's and generate my Data Logic Layer by hand.
has it will be a simple call to Store Procedures containing the Company Id
What will you suggest?
The system application will be ASP.NET (probably MVC, I'm still trying to figure this out as all my knowledge is on webforms, though I saw Scott Hanselman MVC videos - seams easy - but I know it will not be that easy as problems will come and I will take more time to fix them), plus Microsoft SQL.