I am working on one document system and got some logic/architectual problems. In this system will be many types of documents – incoming, outgoing, etc. Every document type have its own number of cols whitch must be filled. On the paper all is easy, but in software – I need some advice 🙂
For example:
incoming document type 1 have 16 cols,
outgoing document type 1 have 15cols,
inner document have 9 cols,
etc...
At first I thought, that I will make one table, named “Categories” where will be stored (in tree) document types (incoming, outgoing, etc) and one generic table “Documents” with maximum of possible rows (for example 25) where would be stored all documents and if not used some cell, then ignored it.
After I thougth that I can make a much simpler – for every type of document – own table, but after some thinking is seemed to be worst solution.
So I want the best possible solution for this.
Maybe you can help me?
Thanks!
This is a typical example for table inheritance. You’d do something like this: