From: | Oliver Elphick <olly(at)lfix(dot)co(dot)uk> |
---|---|
To: | "Arthur(at)LinkLine(dot)com" <arthur(at)linkline(dot)com> |
Cc: | PostGreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: mV database tools |
Date: | 2002-05-01 20:46:21 |
Message-ID: | 1020285981.16368.188.camel@linda |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, 2002-05-01 at 19:37, Arthur(at)LinkLine(dot)com wrote:
> I also did some internet research on the subject of "multi valued"
database theory. I know that this is the basis for the "Pick" database
system
For those who aren't familiar with PICK, it is an untyped database
(apart from weak types provided by a separate dictionary - advisory but
not enforced). All records must have a single key, by which the record
is retrieved. Database records are divided into "attributes" by
CHAR(254), fields are subdivided into "values" by CHAR(253) and values
can be further sub-divided into "subvalues" by CHAR(252). When records
are listed, second and subsequent values are presented on separate lines
within their columns.
In a PICK application, it would be common to have a set up such as:
CUSTOMERS file:
key=id
record=name|address1^address2^...|...|ordernumber1^ordernumber2^...
(using | for CHAR(254) and ^ for CHAR(253))
where the whole address is in one field, with each address line in a
separate value, and there is another field listing the order numbers
(record keys in CUST_ORDERS) of all outstanding orders, again as
separate values.
Then you could use the following commands (this is not SQL, of course):
SELECT CUSTOMERS WITH ID = "C23" SAVING ORDNOS
SORT CUST_ORDERS
to list all the outstanding orders for custoemr C23.
The advantages of Pick are that it is very easy to program; the
corresponding disadvantage is that it is a very undisciplined
environment. It is necessary for the programmer to remember to update
that list of order keys whenever an order is created or deleted. (Some
recent implementations now support triggers, I think.)
I suppose arrays are PostgreSQL's equivalent of multi-valued data (is it
possible to have arrays of arrays?) So it could be argued that
PostgreSQL already provides part of what Arthur wants.
--
Oliver Elphick Oliver(dot)Elphick(at)lfix(dot)co(dot)uk
Isle of Wight http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C
"For if ye forgive men their trespasses, your heavenly
Father will also forgive you; But if ye forgive not
men their trespasses, neither will your Father forgive
your trespasses." Matthew 6:14,15
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Bierman | 2002-05-01 21:51:52 | Re: Mac OS X: system shutdown prevents checkpoint |
Previous Message | Umang Patel | 2002-05-01 20:16:32 |