From: | "sheila bel" <sheilabel(at)hotmail(dot)com> |
---|---|
To: | davidb(at)vectormath(dot)com, sheilabel(at)hotmail(dot)com, pgsql-general(at)postgreSQL(dot)org |
Subject: | Re: [GENERAL] using ID as a key |
Date: | 2000-02-05 04:59:28 |
Message-ID: | 20000205045928.97998.qmail@hotmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi David,
I like your example below since it is simple enough for
someone who is new to this to implement, but I'm wondering
how the IDs are maintained ? Will it be auto incremented
this way ? Or would I need to write a function to do that ?
Would I be able to view the ID numbers ? I guess since you've
declared it as an integer it is readable by humans.
I want this ID to act like a social insurance number but it
will not be seen or used by anyone except the developer (me).
My database is going to be fairly small ( very unlikely to
ever exceed more than 2000 records ).
-Sheila
>
>For what it's worth . . . I would do it as follows:
>
>CREATE TABLE tbl_agency
>(
> nagencyid INT NOT NULL,
> szotherdata VARCHAR(30)
>);
>CREATE UNIQUE INDEX tbl_agency_pk ON tbl_agency (nagencyid);
>
>CREATE TABLE tbl_employee
>(
> nemployeeid INT NOT NULL,
> nagencyid INT,
> szotherdata VARCHAR(30)
>);
>CREATE UNIQUE INDEX tbl_employee_pk ON tbl_employee (nemployeeid)
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
From | Date | Subject | |
---|---|---|---|
Next Message | Ed Loehr | 2000-02-05 05:46:01 | [GENERAL] Troubles with PL/pgSQL trigger/function drop/create scripts |
Previous Message | Ed Loehr | 2000-02-05 02:41:03 | Re: [GENERAL] using ID as a key |