I've got an issue modelling a database to store some Java Objects (classical problem of mapping objects to a relational database). A example beeing far better than a long description, here's the stuff.
List of avaliable classes :
- Class A contains an array of doubles
- Class B contains an array of A
- Class C contains an array of B and an array of A (it can go on like that...)
All the objects implements the same parent (let's say StorableObject). There can be as many combinaisons as possible.
How can I store all theses values, and moreover, how can I create a model using some FK that deletes all its child when a parent object is deleted. I mean, since the childs can be stored in various tables, there's no way I can put a simple FK on the parent's field.
Thanks ;)