Subject RE: [firebird-support] Design question for "attributed instances"
Author Noel Cosgrave
Although I am not usually one who is inclined to recommend anything by Joe
Celko, his book "Tree and Heirarchies in SQL" might prove valuable in this
instance.

Regards,

Noel

-----Original Message-----
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of tdtappe
Sent: 22 October 2005 09:21
To: firebird-support@yahoogroups.com
Subject: [firebird-support] Design question for "attributed instances"

Hi folks,
I would like to hear your opinion on the following problem/design.

Imagine there is a list of so called "categories".
Could be some table like (but could also be something completely
different)

CREATE TABLE CATEGORY (
ID INTEGER,
NAME VARCHAR(32));

Furthermore there is a list of "attributes" like

CREATE TABLE ATTRIBUTE (
ID INTEGER,
NAME VARCHAR(32));

Now I would like to store "instances" of categories, which have specific
values for each attribute.

Example: Imagine a category called "POSITION". Now I would like to create
"an instance" of "POSITION" with the values "HEIKO" for an attribute
"FIRSTNAME" and "PC1" for an attribute "COMPUTERNAME".

For each such instance of a category I would like to store a hierarchy of
keys and values. But that should not be the problem here. I just need to
know some kind of primary key (ID ?) of the category instance that stands
for a category with the specific values for each attribute.

Any thoughts?

--Heiko





------------------------ Yahoo! Groups Sponsor --------------------~--> Most
low income households are not online. Help bridge the digital divide today!
http://us.click.yahoo.com/cd_AJB/QnQLAA/TtwFAA/67folB/TM
--------------------------------------------------------------------~->

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Visit http://firebird.sourceforge.net and click the Resources item on the
main (top) menu. Try Knowledgebase and FAQ links !

Also search the knowledgebases at http://www.ibphoenix.com

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Yahoo! Groups Links