Why not many2one with pk array type

From: <Sandy.Pittendrigh_at_gmail.com>
Date: 28 Jan 2006 08:25:47 -0800
Message-ID: <1138465547.070806.316900_at_z14g2000cwz.googlegroups.com>



This leads to a question.
One way to model many to one is for the attacher table to hold a foreign key to the attachee table.

Why couldn't some relational database support a new data type, which would be an array of numerical foreign keys?

If you wanted to associate 6 separate specimen table instances to an experiment table, for instance, the specimen table might hold a foreign key pointing back to the experiment table.
Or you might use a junction link table, where the experiment and specimen tables remain completely independent, and the schema makes use an 'specimen_list' table that holds foreign keys to both the experiment table and the specimen table.

Or, and this is my question, why couldn't the experiment table hold an array of ints, that are foreign keys pointing to the specimen table?

Why do that? Automated mapping of GUI components to schema is easier when the schema is tree-like....where a program can start at the top of a structure and follow downward links to all the related data. That tree-like organization can't model everything, but it can model most data problems, and it is a hell of a lot easier to deal with GUI-wise. So what am I missing? Is there some catch22 logical error in the foreign key array idea? It would make relations look more like XML. Received on Sat Jan 28 2006 - 17:25:47 CET

Original text of this message