X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 230A7D1B58A for ; Tue, 19 Aug 2003 00:59:59 -0300 (ADT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 52683-06 for ; Tue, 19 Aug 2003 00:59:47 -0300 (ADT) Received: from lycos.com (www1.mail.lycos.com [209.202.220.140]) by svr1.postgresql.org (Postfix) with SMTP id 83E1BD1B8A1 for ; Tue, 19 Aug 2003 00:59:46 -0300 (ADT) Received: from Unknown/Local ([?.?.?.?]) by mailcity.com; Tue, 19 Aug 2003 03:59:34 -0000 To: pgsql-sql@postgresql.org Date: Mon, 18 Aug 2003 23:59:34 -0400 From: "Vernon Smith" Message-ID: Mime-Version: 1.0 X-Sent-Mail: off Reply-To: vwu98034@lycos.com X-Mailer: MailCity Service X-Priority: 3 Subject: Inheritance or no inheritance, there is a question X-Sender-Ip: 24.87.63.31 Organization: Lycos Mail (http://www.mail.lycos.com:80) Content-Type: text/plain; charset=us-ascii Content-Language: en Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=3.1 tagged_above=0.0 required=5.0 tests=BAYES_30, FROM_ENDS_IN_NUMS, RCVD_FAKE_HELO_DOTCOM X-Spam-Level: *** X-Archive-Number: 200308/211 X-Sequence-Number: 14827 I am working on an application system refinement. There is a user profile table in the current system. After the refinement, there are new separated roles, A and B, of the users. The role A only has a few valid fields of the original profile table while the role B still has the whole profile table. In regarding of the DB scheme design, that should be an ideal case of using inheritance. I can have something like table PROFILE_A ( ID int – PK, ... ): table PROFILE_B { ... inherits (A) ); However, there is a problem. There are some multi-valued field tables, such as languages the person can speak, associated with the profile table referred by ID in the profile table. These tables are still needed for the A and B. But, the ID is not accessible from the PROFILE_B. What is the best solution for this DB scheme problem? p.s. I can't use array data type for the multi-valued fields since they need to be workable with a selection statement, nor xml or comma separated format for maintainablity concern. Thanks, v. ____________________________________________________________ Get advanced SPAM filtering on Webmail or POP Mail ... Get Lycos Mail! http://login.mail.lycos.com/r/referral?aid=27005