Type Inheritance and Relational Theory by C.J. Date

Type Inheritance and Relational Theory by C.J. Date

Author:C.J. Date
Language: eng
Format: epub
Publisher: O'Reilly Media
Published: 2016-03-13T16:00:00+00:00


E := CIRCLE ( LENGTH ( 5.0 ) , POINT ( 1.0 , 1.0 ) ) ;

XC := TREAT_AS_PTR_TO_CIRCLE ( PTR_TO ( E ) ) ;

THE_A ( E ) := LENGTH ( 6.0 ) ;

Ignoring irrelevant aspects, a relational analog of this example might involve relation variables (i.e., relvars) that look something like this:

VAR R1 BASE RELATION { K ELLIPSE , ... } KEY { K } ;

VAR R2 BASE RELATION { K CIRCLE , ... } KEY { ... }

FOREIGN KEY { K } REFERENCES R1 ;

For simplicity, assume no referential actions—cascade update, etc.—are specified (this simplifying assumption doesn’t affect the argument in any material respect). Assume also that both relvars are initially empty.

Observe now that every value of K in R1 that matches some value of K in R2 must be of type CIRCLE, not just of type ELLIPSE. So let’s insert a tuple into each of the two relvars:

INSERT R1 RELATION { TUPLE

{ K CIRCLE ( LENGTH ( 5.0 ) , POINT ( 1.0 , 1.0 ) ) } , ... } ;



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.