Re: practise test.. Does This Look Right?

From: Jan Hidders <hidders_at_REMOVE.THIS.win.tue.nl>
Date: 14 Mar 2001 09:01:37 GMT
Message-ID: <98nc1h$68c$1_at_news.tue.nl>


MadG wrote:
>
> However, I am not at all sure about the Supplement entity. I don't
> like the feel of it and don't know what other options I have. The
> supplement is not required, and there may be many to each ISBN.

Exactly the reason why the way you modeled it is the right way. So, I am afraid you will have to try to get used to 'the feel of it'. :-)  

> EVALUATE ( ISBN, BOOKNAME, SUBJECT[FK TO WEIGHT], CONTENT, EASE_READ,
> EXERCISES, COST )
> BOOKNAME WOULD HAVE BEEN A CANDIDATE KEY, HOWEVER THE CHANCE OF INPUT
> ERROR IS TOO GREAT.
By the way, can I ask you not to use capitals so much? They are harder to read and not very friendly for the eyes. Anyway, you cannot choose whether something is a candidate key or not. Either it is or it isn't. What you *can* choose is whether a certain candidate key becomes the primary key. And you still need to indicate what the PK is.

First you should ask if evaluations are really done for every separate ISBN. If yes, then I would ask what BOOKNAME is doing here anyway. Can this not be derived from ISBN using the table BOOK?

The names of the columns EXERCISES and COST are perhaps a bit misleading because they do not contain these things themselves but only their evaluation. So I would add "_EVAL" or something.

I'm also a bit uncomfortable with the name EVALUATE. Entities should always be described with nouns and relationships with verbs. So I would change this into EVALUATION.

I am not sure what your teacher's intentions where but I would ask you to adapt the design so that I can add other evaluation aspects without changing the database schema.

> WEIGHT ( SUBJECT, CONTENT_W, EASE_READ_W, EXERCISES_W, COST_W )
You forgot the PK. Every record describes more than one weight so I would name this WEIGHTS. Does the subject really determine the weights? But what if a book has more than one subject? And if there is not an evaluation of a book then you cannot find what subject this book is about. Is that what you want?

-- 
  Jan Hidders
Received on Wed Mar 14 2001 - 10:01:37 CET

Original text of this message