Explanation: Given the sample value for relvar P shown in Fig. 1, the RANK invocation returns a relation looking like this—

┌─────┬───────┬───────┬────────┬────────┬────┐ PNO PNAME COLOR WEIGHT CITY    N2 ├═════┼───────┼───────┼────────┼────────┼────┤ P6   Cog    Red     19.0   London   1 P2   Bolt   Green   17.0   Paris    2 P3   Screw Blue    17.0   Oslo     2 P4   Screw Red     14.0   London   4 P1   Nut    Red     12.0   London   6 P5   Cam    Blue    12.0   Paris    6 └─────┴───────┴───────┴────────┴────────┴────┘

—and the overall result thus looks like this:

┌─────┬───────┬───────┬────────┬──────── PNO PNAME COLOR WEIGHT CITY   ├═════┼───────┼───────┼────────┼──────── P6   Cog    Red     19.0   London P2   Bolt   Green   17.0   Paris   P3   Screw Blue    17.0   Oslo   └─────┴───────┴───────┴────────┴────────

Note that the cardinality of the result of a given quota query might not be exactly equal to the specified quota; in fact, it might be either less than or greater than that specified quota, depending on the query itself, and depending also on the current values of whatever relvars are involved in that query.


R-table Term used in Codd’s later writings to mean either a relation or a relvar or both, as the context demanded. The “R-” prefix was intended to stress the point that certain ...

Get The New Relational Database Dictionary now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.