Re: BCNF and relational algebra

From: Perception <perceptionist2000_at_yahoo.com>
Date: Sun, 22 Feb 2004 23:10:02 +0000 (UTC)
Message-ID: <c1bcs9$89q$1_at_hercules.btinternet.com>


"Bob Badour" <bbadour_at_golden.net> wrote in message news:NY2dnV0uDtJmkKTdRVn-uw_at_golden.net...
> What do you suppose the unary relation of dates means?
>
>

Thanks for the reply.

To answer your question: the unary relation means that every date is associated with more than one value for every other attribute (that is, Date only determines itself).

Could you perhaps have hinted that I should do a cartesian/cross product of Date with my other two normalised relations and then join them? More specifically, if I were to call my relations A, B and C where

A:Patient Identifier -> Patient Name, Ward
B:Date
C:Doctor -> Clinic

And if I wanted to achieve the example query I mentioned before, namely list all patient identifiers and names for all patients attending a certain clinic and having not been seen by a certain doctor, would the following be legal:

First, AxB and BxC (where x means 'cross'). Then join the new relations over 'Date'. Then select over the condition Doctor/='certain doctor' and Clinic='certain clinic'. And finally project over patient identifier and patient name.

Would that give me the correct answer? The reason I ask is because first I wasn't sure if my relations were in BCNF because there were no common attributes among them (although every determinant was a candidate key) and second whether I can cross two relations with no common attributes (although I think I can). If the answer to those two questions is yes then will I have computed what I was looking for? If I have gone on a completely wrong tangent please let me know, I'm pretty new to this database stuff!

Thanks again. Received on Mon Feb 23 2004 - 00:10:02 CET

Original text of this message