I find myself faced with a problem that can be summarized as follows:
I have a class "box" which can contain 0-N "Crafts", "Subject" is a common interface to several other classes, with a single point in common is that they may be in the same box. Box may contain multiple instances of the same class, only one instance of several different classes or a mix of both.
This does not pose major problems as I manage it in my program, I'm against a little taken when designing the corresponding tables: How to translate this relationship knowing that I can not create a table with FK object_1 , object_2 ... knowing that I can not know how many there will be objects in each box, create a table join box_id => object_id, as each class will have its own table (they all have separate fields).
Bookmarks