Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

On relational theory from "SQL and Relational Theory" by C. J. Date

I am stuck at one point of the book "SQL and Relational Theory", which pertains to the types that relational attributes can take. The question is this:

There are exceptions to the rule that relational attributes can be of any type whatsoever, of which one is that if a relation R is of type T, then attributes of R cannot themselves be of type T.

Why? Is it because the relation R will be of a type 'Relation [name]', and so attributes cannot be of this type?

like image 900
info_seekeR Avatar asked Jan 21 '26 12:01

info_seekeR


1 Answers

Consider something like this:

create table address {
    id int,
    name varchar(20),
    details address -- the address relation has an attribute that is another of itself
}

The definition would recurse infinitely.

like image 73
Bohemian Avatar answered Jan 25 '26 20:01

Bohemian



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!