array column -- do you really want this?

Поиск
Список
Период
Сортировка
От Oliver Seidel
Тема array column -- do you really want this?
Дата
Msg-id Pine.LNX.4.21.0009050930220.9722-100000@imr-int.intra.in-medias-res.com
обсуждение исходный текст
Список pgsql-sql
Hello Umashankar,

*warning* this doesn't answer the question you asked *warning*

you write that you are new to object databases.  The problem that you
describe sounds like it might much more completely be solved by not using
the object features and avoiding an array alltogether.

If you simply wish to solve the problem, then I can recommend some reading
on normal forms, which goes into all the problems that can occur in
databases without consideration for storage anomalities.  You can find a
good article here:
http://home.earthlink.net/~billkent/Doc/simple5.htm

Your database would then be in "first normal form" and not contain lists
inside a field any more.  You simply create two columns, the first listing
the patient ID and the second listing the illness.  Patient IDs are
allowed to occur repeatedly.  You could retrieve all illnesses for a
particular patient by the use of:
select illness from patient_illness where patient_id=1434;

or you may retrieve all patients' illnesses by querying:
select * from patient_illness order by patient_id,illness;

I hope that helps,

Oliver



В списке pgsql-sql по дате отправления:

Предыдущее
От: Timothy Covell
Дата:
Сообщение: HELP pg_proc is corrupted!
Следующее
От: Dana Hudes
Дата:
Сообщение: Re: [ADMIN] 7.0.2 questions on encoding and compilation