Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

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...

In reply to Re: OO concepts and relational databases by dfaure
in thread OO concepts and relational databases by dragonchild

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others taking refuge in the Monastery: (4)
    As of 2021-01-23 11:03 GMT
    Find Nodes?
      Voting Booth?