Using the catalogue

From: <amado.alves_at_netcabo.pt>
Date: 16 Nov 2005 03:06:51 -0800
Message-ID: <1132139211.367148.71740_at_g47g2000cwa.googlegroups.com>



Suppose a RDBMS has a catalogue with schema

Relations (Name) with key (Name)
Fields (RelationName,FieldName,FieldType) with key (RelationName,FieldName)

The catalogue is reflexive i.e.

relation Relations contains { (Relations), (Fields) }

relation Fields contains

  { (Relations, Name, Symbol),

(Fields, RelationName, Symbol),
(Fields, FieldName, Symbol),
(Fields, FieldType, Symbol) }

Suppose a database instance, and a query like

all triplets (field name, value, relation), from any relation, such that field name is in {Name, Designation}, field type is String, and field value = "King"

Please confirm that this query is impossible to express in SQL, and suggest other relational languages where it is possible. Tutorial D, Alaphor, the original relational calculus or algebra?

Note that what is at stake is the capability of the language to transfer from field values to relation and field names. RDF has the corresponding capability in its data model. XQuery?

Thanks a lot,
Marius A. Alves
PhD student, University of Porto Received on Wed Nov 16 2005 - 12:06:51 CET

Original text of this message