Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^2: access array of values without a loop

by sundialsvc4 (Abbot)
on Feb 20, 2015 at 00:52 UTC ( [id://1117291]=note: print w/replies, xml ) Need Help??


in reply to Re: access array of values without a loop
in thread access array of values without a loop

I suspect you hit the central problem square on the head.   And, just for completeness:   you can also represent many-to-many relationships in an SQL database ... this requires three tables.   For example:
INVOICE <-> INVOICE_LINEITEMS <-> ITEMS.

Replies are listed 'Best First'.
Re^3: access array of values without a loop
by CountZero (Bishop) on Feb 20, 2015 at 09:46 UTC
    Yes and that is even the better solution in case (returning to my example) one has authors which have authored multiple books.

    CountZero

    A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

    My blog: Imperial Deltronics

      You probably know this but I want to clarify for other readers. Many to many works, and is a more flexible idea, but only necessarily applies when a book has more than one author (and an author has more than one book of course). One author has many books v many books have many authors.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1117291]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (1)
As of 2024-04-25 00:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found