Re: Storing query language in relations

From: Mikito Harakiri <mikharakiri_at_yahoo.com>
Date: 25 Sep 2002 12:32:18 -0700
Message-ID: <bdf69bdf.0209251132.9d2da14_at_posting.google.com>


pbrazier_at_cosmos-uk.co.uk (Paul) wrote in message news:<51d64140.0209230146.320e13b2_at_posting.google.com>...  

> If we accept that a relational database is the most logical way to
> hold structured data, why not go a step further and store the actual
> queries in relational format? I know some DBMSs store the text of
> queries, view definitions, stored procedures etc. in tables but not in
> a normalised fashion.

It is difficult to define what normalized SQL query is.

For example, would you consider

select ename from emp where empno = 1000

and

select ename from emp where empno + 1 = 1001

as "equivalent" queries (then, you normalize them into identical representation)?

If you have an answer for simple predicates, then how about nested subqueries? Would query transformation that unnests subquery still give you an "equivalent" query? Received on Wed Sep 25 2002 - 21:32:18 CEST

Original text of this message