pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: elein <elein@varlena.com>
To: Josh Berkus <josh@agliodbs.com>
Cc: elein <elein@varlena.com>
Cc: postgresql advocacy <pgsql-advocacy@postgresql.org>
Subject: Re: [SQL] SQL Spec Compliance Questions
Date: Fri, 4 Jun 2004 11:33:16 -0700
Message-ID: <20040604113316.K11485@cookie.varlena.com> (raw)
In-Reply-To: <200406031609.51415.josh@agliodbs.com>
References: <200403302050.12415.josh@agliodbs.com>
	<20040603184526.GK32598@nibiru.metux.de>
	<20040603134144.X11485@cookie.varlena.com>
	<200406031609.51415.josh@agliodbs.com>

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



view thread (19+ messages)  latest in thread

Message-ID: <20040604113316.K11485@cookie.varlena.com>
Permalink:  ../20040604113316.K11485@cookie.varlena.com/
Also on:    postgresql.org/message-id/20040604113316.K11485@cookie.varlena.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: elein@varlena.com, josh@agliodbs.com, pgsql-advocacy@postgresql.org
  Subject: Re: [SQL] SQL Spec Compliance Questions
  In-Reply-To: <20040604113316.K11485@cookie.varlena.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox