Search code examples
databasedatabase-designdata-structuresinventory-management

Designing inventory management database?


I am designing data base for inventory management system which is used by nearly 10 to 15 companies. This database contains nearly 25 tables.

Is it reliable to use a shared schema architecture, with each schema corresponding to a company and all schemas in a single database?


Solution

  • If I read your question, you are suggesting that each company has its own schema. This means two things:

    1. If you decide to implement a basic change in the schema (ie not a change that one company requests), then you will have to implement this change in all the schemae.
    2. You will probably have to implement different logic in your front end program for each company.

    Better you should develop one schema for the entire database; each table would have a field called 'CompanyID' which naturally would define to which company each row belongs. This field would be a foreign key to the Companies table.