[offtopic] How do you name a table...

Поиск
Список
Период
Сортировка
Искать

[offtopic] How do you name a table...

От:
Ognjen Blagojevic <ognjen@etf.bg.ac.rs>
Дата:
Hi,

How do you name a table which sole purpose is to store a list of values? 
E.g.

Table: sex
id name
-------
1 male
2 female

Table: day
id name
-------
1 Sunday
2 Monday
3 Tuesday
4 Wednesday
5 Thursday
6 Friday
7 Saturday

Is this:
a. Lookup table
b. Classifier
c. Cypher(er)?

I'm looking for the appropriate term in English.

Regards,
Ognjen

Re: [offtopic] How do you name a table...

От:
Ian Barwick <barwick@gmail.com>
Дата:
2010/4/8 Ognjen Blagojevic :
> Hi,
>
> How do you name a table which sole purpose is to store a list of values?
(...)
> Is this:
> a. Lookup table
> b. Classifier
> c. Cypher(er)?
>
> I'm looking for the appropriate term in English.

I'd call it a lookup-table.


Ian Barwick

Re: [offtopic] How do you name a table...

От:
Yeb Havinga <yebhavinga@gmail.com>
Дата:
Ognjen Blagojevic wrote:
> Hi,
>
> How do you name a table which sole purpose is to store a list of 
> values? E.g.
>
> Is this:
> a. Lookup table
> b. Classifier
> c. Cypher(er)?
d. valueset?

regards,
Yeb Havinga

Re: [offtopic] How do you name a table...

От:
Karsten Hilbert <Karsten.Hilbert@gmx.net>
Дата:
On Thu, Apr 08, 2010 at 10:16:57PM +0900, Ian Barwick wrote:

> > How do you name a table which sole purpose is to store a list of values?
> (...)
> > Is this:
> > a. Lookup table
> > b. Classifier
> > c. Cypher(er)?

lookup (*_lu, lu_*) or enum or just what it is (gender,
document_type, ...)

Karsten
-- 
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346

Re: [offtopic] How do you name a table...

От:
Bill Moran <wmoran@potentialtech.com>
Дата:
In response to Ognjen Blagojevic :

> Hi,
> 
> How do you name a table which sole purpose is to store a list of values? 
> E.g.
> 
> Table: sex
> id name
> -------
> 1 male
> 2 female
> 
> Table: day
> id name
> -------
> 1 Sunday
> 2 Monday
> 3 Tuesday
> 4 Wednesday
> 5 Thursday
> 6 Friday
> 7 Saturday
> 
> Is this:
> a. Lookup table
> b. Classifier
> c. Cypher(er)?
> 
> I'm looking for the appropriate term in English.

I try to make it an ENUM when it's very unlikely to change, i.e. day of
the week is a good candidate for an enum ... when's the last time that
changed?

For lookup tables that aren't static enough to be an enum, it usually
ends up appended with _list (i.e. gender_list, county_list, etc)

-- 
Bill Moran
http://www.potentialtech.com
http://people.collaborativefusion.com/~wmoran/

Re: [offtopic] How do you name a table...

От:
Justin Graf <justin@magwerks.com>
Дата:
On 4/8/2010 9:30 AM, Bill Moran wrote:
> In response to Ognjen Blagojevic:
>    
>>
>> Is this:
>> a. Lookup table
>> b. Classifier
>> c. Cypher(er)?
>>
>> I'm looking for the appropriate term in English.
>>      
> I try to make it an ENUM when it's very unlikely to change, i.e. day of
> the week is a good candidate for an enum ... when's the last time that
> changed?
>
> For lookup tables that aren't static enough to be an enum, it usually
> ends up appended with _list (i.e. gender_list, county_list, etc)
>
>    
As  others have said enum for things that are static like day, week, 
month etc..
For things that are not static and change like system/application 
settings  i do something like this

CREATE TABLE syssettings
(
   sys_id serial primary key,
   sys_group text,
   sys_value text,
   sys_displayvalue text,
   sys_datatype text DEFAULT 'text'
)

This allows for easy grouping values together and assigning the data 
type for casting, along with how the information is to be displayed in 
the user interface.

example what the data looks like:  the below data is used to create 
FAQ