Re: [SQL] ENUM vs DOMAIN vs FKyed loookup table

2009-04-15 Thread Chris Browne
ja...@xnet.co.nz (Jasen Betts) writes: > On 2009-04-12, Dirk Jagdmann wrote: >>> When you need to choose between enum types, domain types or lookup >>> tables with foreign keys, what do you usualy choose? >> >> When I have a column with valid values that I know when writing my >> tables and that w

Re: [SQL] ENUM vs DOMAIN vs FKyed loookup table

2009-04-15 Thread Jasen Betts
On 2009-04-12, Dirk Jagdmann wrote: >> When you need to choose between enum types, domain types or lookup tables >> with foreign keys, what do you usualy choose? > > When I have a column with valid values that I know when writing my > tables and that will *never* change I use an enum. For example

Re: [SQL] ENUM vs DOMAIN vs FKyed loookup table

2009-04-14 Thread Mario Splivalo
Dirk Jagdmann wrote: When you need to choose between enum types, domain types or lookup tables with foreign keys, what do you usualy choose? When I have a column with valid values that I know when writing my tables and that will *never* change I use an enum. For example a human gender type (and

Re: [SQL] ENUM vs DOMAIN vs FKyed loookup table

2009-04-12 Thread Dirk Jagdmann
> When you need to choose between enum types, domain types or lookup tables > with foreign keys, what do you usualy choose? When I have a column with valid values that I know when writing my tables and that will *never* change I use an enum. For example a human gender type (and remember that there

Re: [SQL] ENUM vs DOMAIN vs FKyed loookup table

2009-04-08 Thread Peter Eisentraut
On Wednesday 08 April 2009 20:08:55 Mario Splivalo wrote: > What are your practices, when do you use ENUMs and when Domains? When given the choice, pretty much ENUMs. Domains weren't really conceived for this sort of thing in the first place, so it's good to move away from them. -- Sent via p

[SQL] ENUM vs DOMAIN vs FKyed loookup table

2009-04-08 Thread Mario Splivalo
When you need to choose between enum types, domain types or lookup tables with foreign keys, what do you usualy choose? Only recently I started using domains, but that seems to be painful, as Joshua Drake explains here: http://www.commandprompt.com/blogs/joshua_drake/2009/01/fk_check_enum_or_