Re: Database design?

From: Andrew Gould <andrewgould(at)yahoo(dot)com>
To: johnny(at)halfahead(dot)dk, pgsql-general(at)postgresql(dot)org
Subject: Re: Database design?
Date: 2001-10-23 12:10:33
Message-ID: 20011023121033.7222.qmail@web13406.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

If your books, ebooks, etc are in one table, why can't
the descriptions be in one table? The primary key
would be the unique item id from your original table.
You could have a columns for item id (the primary
key), item type (book, ebook, etc) and a separate
description column for each language. Would this work
for you?

Best of luck,

Andrew

--- "Johnny_Jrgensen" <johnny(at)halfahead(dot)dk> wrote:
> This may be slightly off topic, as it probably isnt
> all that rdbm specific. If so, holler at me, and
> I'll learn..
>
> I have a bunch of entities
> (book,e-book,author,country,cd,publisher) which are
> quite different in relational nature, and therefore
> can't easily be squeezed into the same table.
>
> Common for all of them, however, is the need for a
> description. Thing is, there needs to be
> descriptions in (currently) 4 different languages,
> and the count may rise.
>
> This relation is of a 1-N nature for each entity,
> and so, i've figured out, I use the unique id from
> the (book, e-book, author etc) tables as a foreign
> key in the description table, thus forging a
> relation.
>
> The question (at last) is, how to have a foreign key
> reference more than one table? Obviously a
> description won't belong to an e-book, a country and
> a publisher at the same time, but only one of them.
>
> Is my design fundamentally unsound, should there be
> a description table for each of the listed entities,
> or what am I to do?
>
> In hope of helpful guidance,
>
> Johnny Jrgensen
>
>

__________________________________________________
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Roderick A. Anderson 2001-10-23 12:15:50 Re: Table and Fields comment
Previous Message Tille, Andreas 2001-10-23 11:56:43 Re: Snapshot is not working