johnuk — 2013-12-10T04:38:24-05:00 — #1
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:-
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,
guido2004 — 2013-12-10T04:46:04-05:00 — #2
What do those tables contain? What is the link between them?
johnuk — 2013-12-10T04:52:44-05:00 — #3
Just the names of the alpacas, its basically a family tree...
guido2004 — 2013-12-10T08:50:59-05:00 — #4
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
johnuk — 2013-12-10T11:41:43-05:00 — #5
Yes just that, parent- child connections