pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alex Pilosov <alex@pilosoft.com>
To: pierre@kahuna.versions.com
Cc: pgsql-sql@postgresql.org
Subject: Re: Table design issue....
Date: Mon, 11 Jun 2001 13:25:51 -0400 (EDT)
Message-ID: <Pine.BSO.4.10.10106111323560.16686-100000@spider.pilosoft.com> (raw)
In-Reply-To: <20010611143846.31514.qmail@kahuna.versions.com>

Yes, this seems like a bad design. If you feel you need to join
potentially unlimited number of tables, that means all of those tables
really belong in one table. If you can explain why do you think you need
separate tables...?



On 11 Jun 2001 pierre@kahuna.versions.com wrote:

> Hi all,
> 
>   I've got a situation where I need to be able to query for the
> same sort of data across multiple tables. Let me give some example
> tables then explain.
> 
> create table t1 (
>   t_attr1 text[],
>   t_attr2 text[]
> );
> create table a1 (
>   a_attr1 text[],
>   a_attr2 text[]
> );
> create table c1 (
>   c_attr1 text[],
>   c_attr2 text[],
>   c_attr3 text[]
> );
> 
> In each of the above tables *_attr*[1] contains a flag that determines
> what type of attribute it is. 
> t1.t_attr1[1] == a1.a_attr2[1] == c1_.c_attr3[1] == FLAG
> In otherwords, the attribute with the specific flag in quesiton is not 
> known at runtime, unless I keep a table with the column names and table
> names setup. Also, new *1 tables could be created dynamically with new attr*'s, 
> and the number of columns within the tables isn't going to be the same.
> 
> What I need to be able to do is say something like:
> "For ALL *1 tables with *_attr*[1] == FLAG return rows with
> VALUE"
> 
> Ideas? Comments? Suggestions? Am I being crazy?
> 
> Pierre
> 
> 




view thread (5+ messages)  latest in thread

Message-ID: <Pine.BSO.4.10.10106111323560.16686-100000@spider.pilosoft.com>
Permalink:  ../Pine.BSO.4.10.10106111323560.16686-100000@spider.pilosoft.com/
Also on:    postgresql.org/message-id/Pine.BSO.4.10.10106111323560.16686-100000@spider.pilosoft.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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: alex@pilosoft.com, pierre@kahuna.versions.com
  Subject: Re: Table design issue....
  In-Reply-To: <Pine.BSO.4.10.10106111323560.16686-100000@spider.pilosoft.com>
  References: <20010611143846.31514.qmail@kahuna.versions.com> <Pine.BSO.4.10.10106111323560.16686-100000@spider.pilosoft.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