| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: OODB
"Scotty" <invallid_at_invalid.spam> schrieb im Newsbeitrag
news:noaotu066nbjo304t5qbvrr74gfencntcv_at_4ax.com...
> Do they exist or are they a figment of a college lecturers
> imagination?
They do exist!
But, do REAL relational databases exist ?
Problem:
Consider the following families: Family Miller has kids John and Steve, Family Jones has kid Tom and Family Smith has no kids.
So you can design these two relations:
FAMILY (ID, NAME)
1 Miller
2 Jones
3 Smith
and KID(ID, NAME)
1 John
1 Steve
2 Tom
How do you get all the families with their kids ?
Solution a) the natural join:
select * from family f, kids k where f.id=k.id
gives you the result:
1 Miller 1 John
1 Miller 1 Steve
2 Jones 2 Tom
how can we interpret the result:
so far so good. But then, the following statements may also be true:
Solution b) ok, ok try a non relational workaround - the outer join: select * from family f left outer join kids k on f.id=k.id
1 Miller 1 John
1 Miller 1 Steve
2 Jones 2 Tom
3 Smith <NULL> <NULL>
At the first sight, the result looks slightly better:
but:
Solution c) ?
-- It looks like, that a "relational" database needs a non relational operation, which, in return, gives you a invalid relation ! And as a result we have to live with these <NULL>s Problem: What is: "Relational Database" left outer join "Relational Algebra" ? a) Relational <NULL> b) <NULL> Database c) both a) and b) d) ? Welcome to the real world ;-) cheers, Adrian.Received on Fri Nov 29 2002 - 04:45:45 CST
![]() |
![]() |