Hi all.
I've got a question:
I am designing a database for musical instruments. In this dbase there are going to be instruments of different sorts/types/categories and so forth.
The amount of layers wil be variant.
eg: guitars wil have electrical/non-electrical, but saxophones would have alt/soprano/tenor, each with their own subclasses.
I was thinking of doing this as follows:
Make 1 table with ALL the categories. Every category will have one field "ParentID" which contains the primary key field of the category that is this one's parent.
So this will be a field containing a primary key from the same table...
This gives me great flexibility concerning the multi-layered separation in classes, but I wil have to do a recursive sort after retrieving the informartion from the database.
Is this wise? Or are there better ways do do this?
Thanx in advance for your advice,
Anton de Wit.
I've got a question:
I am designing a database for musical instruments. In this dbase there are going to be instruments of different sorts/types/categories and so forth.
The amount of layers wil be variant.
eg: guitars wil have electrical/non-electrical, but saxophones would have alt/soprano/tenor, each with their own subclasses.
I was thinking of doing this as follows:
Make 1 table with ALL the categories. Every category will have one field "ParentID" which contains the primary key field of the category that is this one's parent.
So this will be a field containing a primary key from the same table...
This gives me great flexibility concerning the multi-layered separation in classes, but I wil have to do a recursive sort after retrieving the informartion from the database.
Is this wise? Or are there better ways do do this?
Thanx in advance for your advice,
Anton de Wit.