X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id E0FFB5E483B for ; Mon, 6 Sep 2004 10:33:14 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 35871-05 for ; Mon, 6 Sep 2004 09:33:11 +0000 (GMT) Received: from flock1.newmail.ru (morda.newmail.ru [212.48.140.150]) by svr1.postgresql.org (Postfix) with SMTP id 405AE5E4828 for ; Mon, 6 Sep 2004 10:33:07 +0100 (BST) Received: (qmail 17815 invoked from network); 6 Sep 2004 09:21:01 -0000 Received: from unknown (HELO ?192.168.0.133?) (xt@nm.ru@217.132.57.30) by smtpd.newmail.ru with SMTP; 6 Sep 2004 09:21:01 -0000 Message-ID: <413CBC77.7060806@nm.ru> Date: Mon, 06 Sep 2004 12:37:27 -0700 From: "Daniel M." Reply-To: xt@nm.ru User-Agent: Mozilla Thunderbird 0.7.3 (Windows/20040803) X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: Re: Storing properties in a logical way. References: <413BDCB7.10009@nm.ru> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=4.2 tagged_above=0.0 required=5.0 tests=DATE_IN_FUTURE_06_12, RCVD_IN_DSBL, RCVD_IN_NJABL_PROXY X-Spam-Level: **** X-Archive-Number: 200409/37 X-Sequence-Number: 18883 On Sun, 05 Sep 2004 19:51:44 +0200, Pierre-Frédéric Caillaud wrote: >> But after looking closely at the list of a possible properties, i found >> out that some of them depend on others. For example, if item is a >> PDF document, it can have an index. But a document can also have an >> index with links. Logically, a properties like 'index with links' >> don't belong to the verification table - they look like a kind of >> a composite field - 'index with links' is not a stand-alone property, >> but it also implies that an item also has an 'index' property. >> On the other hand, it is impossible to decouple 'index' from >> 'with links', because the second part won't have any meaning without >> the first part. > > You mean your properties would be better organized as a tree ? > Or is it even more complicated than that ? I never thought about that possibility - it is an interesting idea, and it solves the logical problem (though there is still a need to ensure that if child property is set, that the user won't be able to also set a parent property - which is probably implementable by using triggers). Though I would prefer, if it is possible, something much simpler, because there are only about 10 properties and 2 'composite' properties - it would probably be an overkill to create a tree for such a small table if a simpler solution exists. Daniel.