Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Re: Using the catalogue

Re: Using the catalogue

From: Mikito Harakiri <mikharakiri_nospaum_at_yahoo.com>
Date: 16 Nov 2005 14:01:23 -0800
Message-ID: <1132178483.143692.143120@f14g2000cwb.googlegroups.com>

amado.alves_at_netcabo.pt wrote:
> > > 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"
>
> > It seems that two relational operators would be sufficient. One to
> > return the catalogue and one to "evaluate" a union based on some
> > restriction of a catalogue relvar. A D language assumes an open ended
> > set of user-defined operators and types so I don't see why this should
> > be forbidden in Tutorial D for example.
> >
> > SQL has the catalogue but the "evaluation" part isn't in standard SQL
> > AFAIK. However, all SQL products that I'm familiar with implement some
> > form of dynamic SQL as an extension - that should be up to the task.
>
> I see.
>
> And the easiest way I envisage to endow a traditional language with the
> capability is to extend the language with two things
>
> (1) means to create strings by concatenating any part of the result of
> any query
>
> (2) an interpreter function
>
> I think many SQLs already have (1), and as for (2) clearly the DBMS has
> an SQL interpreter inside so it is just a matter of making it available
> in the language (as some programming languages do e.g. Clipper,
> Snobol).
>
> Ok, so I guess my question is not one of possible vs. impossible
> anymore but of "how well"---which is a very much harder question to
> answer altogether, so let me start again:
>
> (a) is this an interesting problem at all?
>
> (b) does it occur in the real world?

How about looking into the problem from the other end? Wouldn't having a single EAV table as RDBMS physical implementation make it easier? The catalog queries:

select distinct tableName from EAV -- get all the tables

select distinct tableName, columnName from EAV where tableName = 'Employees' -- get the Employees table schema

select distinct tableName, columnName from EAV where value = 'King' -- accomodates blind search easily

The tricky part is allowing (composite) indexes and materialized views on (pivoted) relations. Received on Wed Nov 16 2005 - 16:01:23 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US