S# ('S1')
The S# selector might be regarded, loosely, as a type
conversion operator that converts character strings to
supplier numbers.
For example:
…..WHERE P# = P1
• The comparison should fail on a type error
…..WHERE P# = P# (‘P2”)
• Invoking a conversion operator implicitly in this way is
known as coercion. However, it is well known in practice
that coercion can lead to program bugs.
• In particular, we will insist that:
• The comparands for "=", "<", and ">" must be on the same
type;
• The comparands for "=", "<", and ">" must be on the same
type;
Concluding Remarks
The values m and n are called the cardinality and the degree,
respectively, of relation r. Points arising from the definition:
{S# : S# ,
SNAME : NAME ,
STATUS : STATUS,
CITY : CITY }
(S1, SMITH, 20, LONDON)
{S# : S# (‘S1’) ,
SNAME : NAME (‘SMITH’),
STATUS : 20 ,
CITY : LONDON }
PROPERTY RELATION
Relations possess certain properties, all of them immediate
consequences of the definition of relation given in the
previous subsection. The following are the properties within
any given relation:
Instead of
DEPT# EMP#
D1 E1
.. ..