Thread: tables in tables

tables in tables

From
Fernando Benites
Date:
Hi!

I have a problem with tables, i think it is a problem for experienced newbies, so i thought it would not fit with the
newbiesmailing list, sorry if it was for the newbie mailing list: 

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?
Thanx a lot!

--
May the source be with thou!

Re: tables in tables

From
Allan Engelhardt
Date:
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.