1

Creating a web application for companies to use. Now lets say for each company they need user logins etc...

How do i go about the structure of the web application in terms of database.

Do i create a database for company 1 then new database for company 2?
Or do i have 1 database that holds the information for every single company using the web application?
Matthew Smart
  • 1,301
  • 4
  • 21
  • 37
  • Option 2 is the normal way to proceed. – 3-14159265358979323846264 Jul 14 '15 at 13:32
  • Unless you have a compelling reason to create separate databases (such as contractual requirements or regulatory compliance requirements) then why wouldn't you just keep your data in a single database? – David Jul 14 '15 at 13:32
  • The term you're looking for is 'multi-tenant' databases; and there are reasons to keep it separated and similar: http://stackoverflow.com/questions/25670545/multi-tenancy-application-one-database-or-multiple-copies-of-same-database http://stackoverflow.com/questions/2213006/how-to-create-a-multi-tenant-database-with-shared-table-structures http://stackoverflow.com/questions/14569158/multi-tenant-database-architecture http://stackoverflow.com/questions/5570102/how-to-design-a-multi-tenant-mysql-database – George Stocker Jul 14 '15 at 13:39

0 Answers0