From: | Miguel Vaz <pagongski(at)gmail(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | problem with table structure |
Date: | 2010-07-09 01:41:08 |
Message-ID: | AANLkTikOmfpOphzhysCD1OYM40pJwb922bCZbG9oSATD@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi,
I am having some uncertainty while designing the following structure:
I have two sets of data:
* arqueology sites (can be natural):
id
name
description
id_category
id_period
x
y
* natural sites (can be arqueological also - bear with me -, so there will
be duplicate records in the above table and this):
id
name
description
altitude
x
y
and i would like to put these two "sites" in the same data set and maybe add
a new table called "site types" to categorize each record (maybe a relation
table to allow many to many): how can i go about doing it? is this solution
decent enough:
* sites (generic):
id_site
name
description
x
y
* site_natural
id
id_site
altitude
* site_arqueology
id
id_site
id_category
id_period
But i seem to be missing something. How can i have this in a way that its
easy to list only "arqueology sites" for example. I feel the solution is
simple enough, even for me, but its eluding me. Any help in the right
direction would be very appreciated.
Thanks
Pag
From | Date | Subject | |
---|---|---|---|
Next Message | Craig Ringer | 2010-07-09 02:53:39 | Re: JDBC Postgres problem |
Previous Message | Kenichiro Tanaka | 2010-07-09 01:09:57 | Re: getting the last N tuples of a query |