O'Reilly logo

The New Relational Database Dictionary by C.J. Date

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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.

image

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required