http://www.perlmonks.org?node_id=379347


in reply to OO concepts and relational databases

Getting back to the OO concepts (and btw answering the quiz I proposed here), you have 3 available ways of modeling your data relations:

Aggregation: aka "is part of"
The datas are modeled as highlevel objects containing sub objects of lower level on the divide to conquer priciple.

Association: aka "is linked to"
This relation maintains the relationships between the different parts of the objects model constituted with the datas.

Heritage: aka "is a"
The most famous concept of OO culture (perhaps because of its specificity), and certainly the badly used. A very common mistake of OO beginners consists in believing that everything should herit from something else without asking themself before all if this object is really a kind of that object or not.

The only real common data relation shared between OO and relationnal data model is the association. The two other one may be more or less emulated with frustrating results and poor performance as other monks have already pointed out in this thread.

So, why not try to use a OODBMS instead of a RDBMS? In other terms, something more dedicated to the way datas is described as objects. Despite they are still less known and used than RDBMS*, some engines are up and ready, waiting you to try them, even with perl (look for Pogo)!

____
* Sorry to say that, but my signature first favorite citation totally applies here... ,)

____
HTH, Dominique
My two favorites:
If the only tool you have is a hammer, you will see every problem as a nail. --Abraham Maslow
Bien faire, et le faire savoir...