Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??
I think there is an easier way to visualize it. Tables don't contain other tables. A table is like a piece of paper. If you were to manually write out what a relational database does, you would be looking at three pieces of college ruled paper side by side.
band_members ############################################################# ID First Name Last Name ############################################################ 1. Paul McCartney 2. Ringo Starr 3. George Harrison 4. John Lennon band_members_and_Bands_linking_table ########################################################### band_members_id bands_id ########################################################### 1 1 2 1 3 1 4 1 3 2 4 3 1 4 1 5 4 5 3 5 Bands ######################################################### ID Band Name ######################################################## 1. Beatles 2. Traveling Wilburys 3. Plastic Ono Band 4. Wings 5. Solo
That is pretty much it. If this example is any good, you are already visualizing and tracing the relationships between the data.

SQL is fun to learn, because there are only three commands. select, delete, and insert. There is 'update' if you really want to get fancy and combine delete and insert into a single statement. I would not try to Perl and SQL at the same time. I recommend the Head First SQL book, that will probably teach you all you want to know, if you want to go further, I like the MySQL certification book. You could combine those three tables into one, but this style is preferred, because it makes it harder to learn and raises the barrier to entry for Database Administrators. enhances performance


In reply to Re: OT: SQL and me by trippledubs
in thread OT: SQL and me by Lady_Aleena

Title:
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!
  • 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
  • Outside of code tags, you may need to use entities for some characters:
            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?
    Username:
    Password:

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

    How do I use this? | Other CB clients
    Other Users?
    Others examining the Monastery: (9)
    As of 2014-12-23 03:26 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      Is guessing a good strategy for surviving in the IT business?





      Results (135 votes), past polls