Re: [GENERAL] using ID as a key

From: Marc Tardif <admin(at)wtbwts(dot)com>
To: sheila bel <sheilabel(at)hotmail(dot)com>
Cc: pgsql-general(at)postgreSQL(dot)org
Subject: Re: [GENERAL] using ID as a key
Date: 2000-02-04 13:00:03
Message-ID: Pine.BSF.4.10.10002041222510.73844-100000@server.b0x.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I recommend you read Momjian's online book, very informative and provides
all the necessary information about using various kinds of id's:
http://www.postgresql.org/docs/aw_pgsql_book/index.html

As for referential integrity using foreign keys, you can add this
functionality to postgresql using triggers. An example of this is
available in the contrib/spi directory, look for refint.*

Marc

On Fri, 4 Feb 2000, sheila bel wrote:

> Hi,
>
> I'm new to data base design so please bare with me if my
> question is so basic..
> I'm designing a database, two of the tables are EMPLOYEES and
> AGENCIES. I need an ID for each of them. I would also need to
> have the agencyID in the EMPLOYEES table so that I can identify
> which agency they belong to something like a foreign key. I know
> postgreSQL does not support it so how do I implement this ?
> What kind of data type should I use for the ID ? In general I
> do not know how to implement IDs and use them as keys.
> I've read the user manual and a bit of the programmer's
> manual several times but haven't found anything that will
> apply to this situation.
>
> Please Help. Thank You.
>
> -Sheila
>
>
>
>
> ************
>
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jose Soares 2000-02-04 13:33:24 Re: [GENERAL] Need help creating a function
Previous Message dean browett 2000-02-04 12:40:30 max query length