Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UcK2X-0002tb-7g for pgsql-sql@arkaria.postgresql.org; Tue, 14 May 2013 18:33:33 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UcK2W-0000e5-Ns for pgsql-sql@arkaria.postgresql.org; Tue, 14 May 2013 18:33:32 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UcK2V-0000dz-Q7 for pgsql-sql@postgresql.org; Tue, 14 May 2013 18:33:31 +0000 Received: from mout.gmx.net ([212.227.17.21]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UcK2O-0003Ls-D2 for pgsql-sql@postgresql.org; Tue, 14 May 2013 18:33:31 +0000 Received: from mailout-de.gmx.net ([10.1.76.20]) by mrigmx.server.lan (mrigmx001) with ESMTP (Nemesis) id 0MQsuO-1V5aG51E58-00UNiz for ; Tue, 14 May 2013 20:33:23 +0200 Received: (qmail invoked by alias); 14 May 2013 18:33:23 -0000 Received: from p5082F193.dip0.t-ipconnect.de (EHLO GK1C11) [80.130.241.147] by mail.gmx.net (mp020) with SMTP; 14 May 2013 20:33:23 +0200 X-Authenticated: #41312857 X-Provags-ID: V01U2FsdGVkX19KNxNWLoxKm+YqR88TePRajgF1LS9hqUnIsTXCLd W/FFe8j0VmMhFM Date: Tue, 14 May 2013 20:33:26 +0200 From: Wolfgang Keller To: pgsql-sql@postgresql.org Subject: Re: Correct implementation of 1:n relationship with n>0? Message-Id: <20130514203326.5b7d2b667c67f60a6708ade2@gmx.net> In-Reply-To: <5661746.f8cZtjsOM5@smadev.internal.net> References: <20130430163905.77d43412c0176c3d9ebd8d90@gmx.net> <3724312.iEkiItIUeG@smadev.internal.net> <20130430202542.a68c8042be92943866afa16c@gmx.net> <5661746.f8cZtjsOM5@smadev.internal.net> X-Mailer: Sylpheed 3.3.0 (GTK+ 2.10.14; i686-pc-mingw32) Mail-Copies-To: never Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Pg-Spam-Score: -2.5 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-sql Precedence: bulk Sender: pgsql-sql-owner@postgresql.org > > The point is that I would have expected that problem to be solved > > within the past four decades since relational databases have been > > invented. Or at least in the past two decades since PostgreSQL has > > been developed. > > Then what about n>1, n>2, n>k where k an arbitrarily large positive > integer? isn't it the same problem class actually? Not quite. In conceptual modeling, relationships between entities aren't directed. And there's no reason to not have a "not null" constraint on any of the two sides of a one-to-many (or many-to-many) relationship from the conceptual point of view. The way relationships are implemented in physical database schemas, by foreign key constraints, just makes it non-trivial to implement such a "not null" constraint on the "wrong" end of a one-to-many relationship. But this a technical issue with the implementation of databases at the physical level, not a conceptual issue. > Is there any serious database vendor who provides out of the box > support for 1:n, n>0 ? Or is it an "unusual" user requirement in the > first place. It definitely is not, since conceptual diagrams I have seen are full of such relationships. They're just never correctly implemented at the physical level. > Ever thought why not so many people have asked for this? Having quite some professional experience in companies, I don't doubt for a second that the very only reason is simply total absence of care for scientific correctness of database at the level of the physical implementation. Sincerely, Wolfgang -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql