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?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With