Re: tables in tables - Mailing list pgsql-general

From Allan Engelhardt
Subject Re: tables in tables
Date
Msg-id 3B6F003F.D36D439A@cybaea.com
Whole thread Raw
In response to tables in tables  (Fernando Benites <fbenites@TechFak.Uni-Bielefeld.DE>)
List pgsql-general
Fernando Benites wrote:

> I want to create a table in a table, that means, if i have a row, in that row are many columns, where one column is a
table(with should we say 20 rows) 
> it is important that the table in the table hsa 20 rows, and new inserting would be the first row in this table, and
thalast one would be deleted. 
> and with each new row of the mother table, it would be create a new child table for this new row.
> How can i do that?

The closest is probably to use arrays in PostgreSQL.  See file:///usr/share/doc/postgresql-7.1.2/html/arrays.html or
similarlocation on your system. 

Plain SQL doesn't support tables as data types.

Often, there is a better way to model the data; one which does not require nested tables.

If not, consider an object oriented database....


Allan.


pgsql-general by date:

Previous
From: Allan Engelhardt
Date:
Subject: Re: Would a PostgreSQL database on a DVD be usable?
Next
From: "P. Dwayne Miller"
Date:
Subject: Re: database does not exist in system catalog