Re: Code tables, conditional foreign keys? - Mailing list pgsql-general

From Alban Hertroys
Subject Re: Code tables, conditional foreign keys?
Date
Msg-id B3EC5FD6-ABD0-4724-AA9A-93858AF89969@solfertje.student.utwente.nl
Whole thread Raw
In response to Re: Code tables, conditional foreign keys?  (Conrad Lender <crlender@gmail.com>)
List pgsql-general
> Here's an example of the value groups that were contained in the
> table:
>
> fax status:
>  pending, active, sent, error
> department:
>  office, accounting, it, legal, experts
> deadline type:
>  official, unofficial
> ...

> Is it really advisable to put all these values into 70 separate tables
> with the exact same layout? I don't quite see the benefit.

You could use the ENUM type for that (http://www.postgresql.org/docs/current/static/datatype-enum.html
), although that works best if these values are really static. If
users should be able to edit them they're probably not the best choice.

Alban Hertroys

--
If you can't see the forest for the trees,
cut the trees and you'll see there is no forest.


!DSPAM:737,4a17ca8210091499713462!



pgsql-general by date:

Previous
From: Alban Hertroys
Date:
Subject: Re: performance tuning on Vista problem
Next
From: "Leif B. Kristensen"
Date:
Subject: Re: Asssociative Arrays: Best practices / snippets?