简体   繁体   English

设计库存管理数据库?

[英]Designing inventory management database?

I am designing data base for inventory management system which is used by nearly 10 to 15 companies. 我正在为库存管理系统设计数据库,该系统已被近10到15家公司使用。 This database contains nearly 25 tables.For designing database i'm planning to use shared schema architecture (ie each schema corresponding to a company and these all schemas are to be placed in a single database). 这个数据库包含近25个表。为了设计数据库,我计划使用共享模式体系结构 (即每个模式对应一个公司,这些模式都放在一个数据库中)。

i want to know whether it is reliable to use shared schema architecture . 我想知道使用共享架构架构是否可靠。

can any one please tell me is it correct decision to use above mentioned architecture. 任何人都可以告诉我使用上述架构是否正确。

Thanks in advance.. 提前致谢..

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. 每个表都有一个名为“CompanyID”的字段,该字段自然会定义每行所属的公司。 This field would be a foreign key to the Companies table. 该字段将是Companies表的外键。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM