Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^2: Tree Structure and Db

by simonm (Vicar)
on Jul 06, 2005 at 16:26 UTC ( #472867=note: print w/replies, xml ) Need Help??


in reply to Re: Tree Structure and Db
in thread Tree Structure and Db

In a tree-wise data structure, with only one parent per child, what is the perceived advantage of using this linking table rather than just adding the parent ID to the main table?

Replies are listed 'Best First'.
Re^3: Tree Structure and Db
by SimonClinch (Deacon) on Jul 07, 2005 at 11:18 UTC
    A link table is the normal way to enforce referential integrity in many to many relationships (0 or 1 counts as many for these purposes) and in this case prevents orphans; it also enables you to define different types of relationship without putting more illegal or awkwardly-implemented constraints (and adding maybe-null foreign keys for them) on the master table.

    One world, one people

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://472867]
help
Chatterbox?
[karlgoethebier]: Discipulus: No. See https://en. wikipedia.org/ wiki/Tribe_( Native_American)
[karlgoethebier]: They took Unix from some aliens
[marioroy]: Perl is so powerful that it can poll 40 metrics from 20 million devices in 40 minutes using 4 nodes only.
[karlgoethebier]: http://www. uncoveror.com/ aliens.htm
[Lady_Aleena]: marioroy, I can't decide whether or not to move my RolePlaying:: Random:: modules to just Random::. I'm not as sophisticated as most here.
[marioroy]: Naming things can be difficult, sometimes more so that the actual code :)
[karlgoethebier]: Lady_Aleena: You need to jump to some conclusion
[Lady_Aleena]: And what would I rename RolePlaying/Random .pm to if I move all the RolePlaying/Random modules to just Random? Random/Util.pm Random/Base.pm, maybe lowercase the file name to indicate it is a bit different? I don't know yet.
[marioroy]: What does Random do?
[karlgoethebier]: https://www. youtube.com/watch? v=42WNHGr1jGI

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (9)
As of 2017-05-29 08:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?