Re: [SQL] Use of reference table ('look-up-table') and FK constraint

2002-10-17 Thread Stephan Szabo
On 17 Oct 2002, Charles Hauser wrote: > Josh & Stephan, > > This helps a lot - thanks! > > Any idea what datatype 'Identifier_type IDENTITY' specifies? I don't > see this in the postgres documentation. I'll see what I can find in > sybase lingo. As a rough guess, I'd say probably a serial colu

Re: [SQL] Use of reference table ('look-up-table') and FK constraint

2002-10-17 Thread Charles Hauser
Josh & Stephan, This helps a lot - thanks! Any idea what datatype 'Identifier_type IDENTITY' specifies? I don't see this in the postgres documentation. I'll see what I can find in sybase lingo. CREATE TABLE phone ( phone_id Identifier_type IDENTITY, phone_number

Re: [SQL] Use of reference table ('look-up-table') and FK constraint

2002-10-16 Thread Josh Berkus
Charles, CREATE TABLE phone_types ( type VARCHAR(10) NOT NULL PRIMARY KEY ); INSERT INTO phone_types VALUE ( 'Work' ); INSERT INTO phone_types VALUE ( 'Home' ); etc ... CREATE TABLE phone ( phone_id Identifier_type IDENTITY, phone_number varchar(20

Re: [SQL] Use of reference table ('look-up-table') and FK constraint

2002-10-16 Thread Stephan Szabo
On 16 Oct 2002, Charles Hauser wrote: > In fits and starts I am working through converting a sybase schema -> > postgres and am hoping to gain some insight on the use of reference > tables ('look-up-table') and FK constraints. > > In the example below I believe the sybase RULE Phone_type_rule is

[SQL] Use of reference table ('look-up-table') and FK constraint

2002-10-16 Thread Charles Hauser
Hi, In fits and starts I am working through converting a sybase schema -> postgres and am hoping to gain some insight on the use of reference tables ('look-up-table') and FK constraints. In the example below I believe the sybase RULE Phone_type_rule is used to restrict input, so that the only v