Re: db design question
От
Vijay Deval
Тема
Re: db design question
Дата
Msg-id
3DB2B3B5.4E8CA02A@giaspn01.vsnl.net.in
Список
Дерево обсуждения
Re: db design question Vijay Deval <deval@giaspn01.vsnl.net.in>
Re: db design question "Jules Alberts" <jules.alberts@arbodienst-limburg.nl>
Re: db design question "Josh Berkus" <josh@agliodbs.com>
Re: db design question "Jules Alberts" <jules.alberts@arbodienst-limburg.nl>
Re: db design question Andrew McMillan <andrew@catalyst.net.nz>
arc relationship [was: db design question] "Jules Alberts" <jules.alberts@arbodienst-limburg.nl>
Re: arc relationship [was: db design question] Andrew McMillan <andrew@catalyst.net.nz>
Re: arc relationship [was: db design question] "Josh Berkus" <josh@agliodbs.com>
Re: arc relationship [was: db design question] "Jules Alberts" <jules.alberts@arbodienst-limburg.nl>
Re: arc relationship [was: db design question] "Josh Berkus" <josh@agliodbs.com>
Re: arc relationship [was: db design question] "Jules Alberts" <jules.alberts@arbodienst-limburg.nl>
Hi Jules What will happen to oid if you dump the table, upgrade PostgreSQL and recreate tables? In case a company has more than one consultent, company is going to feature in more than one tuples with different oid's. It might be a better idea to have two tables. One table assigns serial id number to company. Other table could have this serial id as one attribute , along with other things like consultant name etc. This should avert problem of repeating data. It is quite possible that one consultant gives consultations to more than one companies. In that case the data needs to be stored in three tables. Vijay Jules Alberts wrote: > > Hello everyone, > > The colums street and state (and a lot more in real life) are the same. > My idea for the new db was someting like this: > > company(name varchar(100)) > employee(code int) > consultant(name varchar(50)) > address(ref_oid OID, street varchar(100), state varchar(100)) > > In this way, I can store all the addresses together and find them with. > SELECT * WHERE addres.ref_oid = company.oid;
В списке pgsql-novice по дате отправления