I'm trying to move my office into a database application. Here is what I got:
(source: phunkei.de )
companies and individuals inherit (1:1 relation) from clients . That is because both of them can be a "client" and receive a bill and I would like to reference to a single table in orders . There is another relationship between companies and clients: a many to many. I hope you guys have some ideas for improvements, because I'm not really sure of this.
edit: companies and individuals will have some different fields ...
I consider myself to be a database newbie, so take this suggestion with a grain of salt. I would personally be tempted to set this up as a star schema. Here is an example from:
Microsoft Technology: BI Dimensional Model - Star Schema
This should allow for quick query speeds (if everything is indexed correctly) and should allow you to easily add on more attributes to query. One trade-off for quick queries is updating the Fact table. This will be slower due to indexing.
This has worked well for me in past projects but, again, I am by no means a qualified database professional.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.