eric256 has asked for the wisdom of the Perl Monks concerning the following question:
I am working on a node based web management system where each node is comprised entirely of meta data (no set parameters are required per node. I have two tables, one to hold each nodes (id) to link meta data to it, and for inheritance reasons. Then I have the meta data table which holds (nodeid, meta data name, meta data). So for each node there are several nodes in the meta data table containing the name of the data "color" and the data itself. So the table might be something like
Nodes id 1 2 3 Meta Data NodeID Name Value 1 color red 1 name george 2 color green 2 size 5 3 name fred 3 title test
Now my problem/question is how to query this data for mutiple meta attributes. Like how to find all nodes who's 'color' attribute = 'green'. Obviously standard queries wont work because the data is spread threwout multiple records.
I have only realy come up with one option, Loading the nodes data into a hash and then looping threw the hash finding all nodes that match the criteria...This is kind of a bad solution if you have very many nodes at all.
So i am hoping that somewhere here might have a brilliant idea about how to query the data, or even some way maybe using temperary tables.
Any and all help/thoughts/opinions are welcome.
___________
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Querying Meta Data
by dragonchild (Archbishop) on Jul 24, 2003 at 18:24 UTC | |
by simonm (Vicar) on Jul 24, 2003 at 18:58 UTC | |
by eric256 (Parson) on Jul 24, 2003 at 20:07 UTC | |
by simonm (Vicar) on Jul 24, 2003 at 23:39 UTC | |
by eric256 (Parson) on Jul 24, 2003 at 23:53 UTC | |
|
Re: Querying Meta Data
by valdez (Monsignor) on Jul 24, 2003 at 20:55 UTC | |
by eric256 (Parson) on Jul 24, 2003 at 23:18 UTC | |
by mpeppler (Vicar) on Jul 25, 2003 at 18:41 UTC | |
by valdez (Monsignor) on Jul 31, 2003 at 09:12 UTC |