I have four tables: Disks, Folders, Files and Links. It is four types of entities, and they can not be merged into one type (e.g. into one table) because they have different number and types of attributes. And there are relationships:
- Disks can contain Folders, Files and Links;
- Folders can contain Folders, Files and Links too;
- Files and Links can't contain anything.
In addition, all entities have order in which they are displayed (e.g. "user defined", not alphabetical or something else). It is a simplified example of the actual problem, in real there are much more entities and relationships are more complicated.
So, what is the proposed structure of tables?
Thanks everyone who answer the question