Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 41781632FDD for ; Wed, 3 Mar 2010 11:29:35 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 38765-01 for ; Wed, 3 Mar 2010 15:29:23 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-gw0-f46.google.com (mail-gw0-f46.google.com [74.125.83.46]) by mail.postgresql.org (Postfix) with ESMTP id 47860632CB9 for ; Wed, 3 Mar 2010 11:29:24 -0400 (AST) Received: by gwb15 with SMTP id 15so734060gwb.19 for ; Wed, 03 Mar 2010 07:29:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=F3c7EyCdgJlLY/ZLX6gGH7tSROhYwsFaYHj+MT2jhLQ=; b=wRNk8gldPx9cDsrMaJaKCbw/Sn1mhludvaimbofrSu1MVnFY8nQyPBUA0OERNcavvr TxzMQW5Xr6JmCZMyGGwI/Pe3wSi+DvKiyGoWLPbzf70hsMNR2Z9N86Kp+sCv3M6CFA1T oxt40krjSpSe4+8ZZ2QdfuHnhAGoRcAKNYf4o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=ubugXWmYE8hNZFj4BV06MilCW0rF9h5DHIuSeXBn+MIvozT2fLeN3ZuZe1a01pb+Ur kxSobRtCnaY9yU3vZ6uXUBZ8vhFBgoGTxAHLYoTLkQ6ngUw3ZUd6dS2hyqb9S4FOQCom qung3i3eL6QCtyv+omW9LK3gu7L5R3XgQbb/I= MIME-Version: 1.0 Received: by 10.101.129.1 with SMTP id g1mr2491113ann.156.1267630162451; Wed, 03 Mar 2010 07:29:22 -0800 (PST) In-Reply-To: <20100303151900.GA19735@apartia.fr> References: <20100303150227.GA18661@apartia.fr> <396486431003030714s48b239e2ub8b58a49b9aa29e4@mail.gmail.com> <20100303151900.GA19735@apartia.fr> Date: Wed, 3 Mar 2010 07:29:22 -0800 Message-ID: <396486431003030729x17f921bcr7ff439113a5644ab@mail.gmail.com> Subject: Re: check constraint on multiple tables? From: Richard Broersma To: pgsql-sql@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.185 tagged_above=-10 required=5 tests=BAYES_40=-0.185 X-Spam-Level: X-Archive-Number: 201003/15 X-Sequence-Number: 33722 On Wed, Mar 3, 2010 at 7:19 AM, Louis-David Mitterrand wrote: > CREATE TABLE cabin_type ( > CREATE TABLE cabin_category ( > CREATE TABLE cabin ( I'm just curious about a few things. 1) What is the difference between a cabin_type and a cabin_category. 2) Does each ship have an exclusive set of cabin_types that no other ship can have? The table definitions imply that this is so. I'm just guessing here since I don't really understand the relationships involved in a ship's cabins. However, I would expect that a cabin should be directly related to a ship. Each cabin is defined by a category according the set in the cabin_category table. -- Regards, Richard Broersma Jr. Visit the Los Angeles PostgreSQL Users Group (LAPUG) http://pugs.postgresql.org/lapug