On Wed, 2002-05-01 at 19:37, [EMAIL PROTECTED] 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 [EMAIL PROTECTED] 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
signature.asc
Description: This is a digitally signed message part