Search Postgresql Archives

newbie db design question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hello!

really noob question here. i have this experimental database design:

create table products (
product_id serial primary key,
description text,
supplier_id????) ;

create table supplier (
supplier_id serial primary key,
description text) ;


the products table should be linked to the supplier table via "supplier_id" column. i can't find out what would be the data type of supplier_id in table products to do that. i tried

supplier_id serial primary key references supplier

but it won't allow multiple primary key.

how then to proceed? 


regards,





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux