Joining data tables and system tables

From: Paul <pbrazier_at_cosmos-uk.co.uk>
Date: 27 Dec 2002 07:50:29 -0800
Message-ID: <51d64140.0212270750.236c1839_at_posting.google.com>



Can I express this using purely relational operators?:

I want to list all relations (tables) in my database, together with the total number of tuples (rows) in each relation.

I can get the list of relations from the system catalog. I can use an COUNT aggregate to count the numnber of rows in a given relation.

But how do I link the two so the DBMS does the hard work of counting each table for me? I know how to use procedural code, "dynamic SQL" or other tricks for specific DBMSs; I'm more interested from a theoretical viewpoint.

I don't think it's possible in SQL.
Is it possible in general relational algebra? Is it possible in Dataphor or other "next generation" RDBMSs?

It would seem quite a reasonable thing to want to do.

Paul. Received on Fri Dec 27 2002 - 16:50:29 CET

Original text of this message