SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    38911 Basic Bytes Free johnuk's Avatar
    Join Date
    Jul 2008
    Location
    Somerset, England
    Posts
    458
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    'Alpaca Pedigree' SQL Entities

    Hello all,


    I am building a "Smart" image gallery for my clients and one of the things they want to do is display the pedigree relationships between their alpacas. You can see the Pedigree ER diagram here:- db.jpg

    They basically want to show that table structure on the website, but obviously formatted nicely in HTML. So my question is, what would be the best approach to get that data in the least queries? Im concerned this could be quite expensive in terms of how many queries are used if im not careful!

    I really hope that made sense! Any questions please just ask


    Kind regards and thanks,

  2. #2
    From Italy with love silver trophybronze trophy
    guido2004's Avatar
    Join Date
    Sep 2004
    Posts
    9,496
    Mentioned
    163 Post(s)
    Tagged
    4 Thread(s)
    What do those tables contain? What is the link between them?

  3. #3
    38911 Basic Bytes Free johnuk's Avatar
    Join Date
    Jul 2008
    Location
    Somerset, England
    Posts
    458
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just the names of the alpacas, its basically a family tree...

  4. #4
    From Italy with love silver trophybronze trophy
    guido2004's Avatar
    Join Date
    Sep 2004
    Posts
    9,496
    Mentioned
    163 Post(s)
    Tagged
    4 Thread(s)
    Like parent-child connections? Maybe this article written by r937 might be of help to you (it talks about categories and subcategories, but in both cases we're talking adjacency I think): http://sqllessons.com/categories.html

  5. #5
    38911 Basic Bytes Free johnuk's Avatar
    Join Date
    Jul 2008
    Location
    Somerset, England
    Posts
    458
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by guido2004 View Post
    Like parent-child connections? [/url]
    Yes just that, parent- child connections


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •