X-Original-To: pgsql-advocacy-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id A9E63D1B189 for ; Fri, 4 Jun 2004 15:37:05 -0300 (ADT) 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 59519-04 for ; Fri, 4 Jun 2004 18:37:04 +0000 (GMT) Received: from cookie.varlena.com (adsl-64-142-36-103.sonic.net [64.142.36.103]) by svr1.postgresql.org (Postfix) with ESMTP id B21E0D1B34E for ; Fri, 4 Jun 2004 15:37:01 -0300 (ADT) Received: by cookie.varlena.com (Postfix on SuSE Linux 7.3 (i386), from userid 500) id 4B419394B8; Fri, 4 Jun 2004 11:33:16 -0700 (PDT) Date: Fri, 4 Jun 2004 11:33:16 -0700 From: elein To: Josh Berkus Cc: elein , postgresql advocacy Subject: Re: [SQL] SQL Spec Compliance Questions Message-ID: <20040604113316.K11485@cookie.varlena.com> Mail-Followup-To: Josh Berkus , postgresql advocacy References: <200403302050.12415.josh@agliodbs.com> <20040603184526.GK32598@nibiru.metux.de> <20040603134144.X11485@cookie.varlena.com> <200406031609.51415.josh@agliodbs.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200406031609.51415.josh@agliodbs.com> User-Agent: Mutt/1.3.22.1i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200406/53 X-Sequence-Number: 4476 You would want a typed table if data particular to a row took that form. Where you would want something like a 2-D array which was *queryable*. You could achieve the same effect by using a foreign key. In postgres and Illustra, references were possible. That is, storing the OID (REF) of a table in a column of another table achieving the same effect. SQL syntax support was needed for the REF type. I believe this was removed or suppressed in PostgreSQL. It could be a violation of relational database design if used improperly. Codd's rules say nothing about nested structures. If the data in the column.table was not unique to the row in question, then it would violate the normalization rules. But this is true of any data. Data is data. An ORDBMS is type blind where ever possible. That means a table in a column is just data. The only thing that makes it different is the additional SQL syntax to support access. elein On Thu, Jun 03, 2004 at 04:09:51PM -0700, Josh Berkus wrote: > Elein, > > > A typed table is an type which happens to be > > a table. They are also known as composite types > > or row types. > > Well, Tom was working on this for spec compliance. I don't know if he > completed it. > > Of course, it doesn't answer the two corrolary questions: > > 1) Why would one want a typed table? > > 2) Aren't typed tables a big violation of relational database design? > > -- > Josh Berkus > Aglio Database Solutions > San Francisco