On 21/04/04 14:40 +0530, H S Rai wrote:
> For database design, which of the following two options, will be
> better? What will be pros and cons?
> 
> 1) For a field like 'Designation' using varchar(), and giving actual
> values like, Driver, Mechanic and Electrican.
> 
> or
> 
> 2) Using integer say, 1 for Driver, 2 for Mechanic and 3 for
> Electrician.
I would do it like this in Pg
create table job (
        id              serial  unique,
        name            varchar unique,
        description     text,
        minimum_req     text
);

create table worker (
        id              serial unique,
        job_id          integer references job(id),
        department_id   integer references department(id),
        ...
);

Devdas Bhagat


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
linux-india-help mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/linux-india-help

Reply via email to