Re: Test in 16 Hours, This is it.

From: Jan Hidders <hidders_at_REMOVE.THIS.win.tue.nl>
Date: 16 Mar 2001 09:34:41 GMT
Message-ID: <98smnh$kpc$1_at_news.tue.nl>


MadG wrote:
> OK, Test is in less than 15 hours!! Do you feel the excitement?
> I have Goosebumps!
>
> This is what I've got. I like it, but I am not ready to go into battle yet.
>
> TEXTBOOK ( isbn[pk], bookname, author, aff_num[fk to affiliate], year, cost,
> subject )
> I am going to assume that a book is only represented in one subject

Ok.  

> PUBLISHER (pub_num[pk], pub_name, contact, web_address, last_contact_date,)
>
> AFFILIATE (aff_num[pk], pub_num[fk to publisher], aff_name)
>
> SUPPLEMEMTS (isbn[fk to textbook] , supplement[composite pk])
>
> BOOKFEATURE (book_feature, isbn[fk to textbook][composite pk of isbn/
> bookfeature], weight )
 

> this sits at many to many, so i need a composite (bridge entity).

Hm? I don't see a M-N relationship. What I would worry about is if the 'isbn' should be really in there. Does every feature have have a fixed weight or is this determined for every book separately. The latter is what you have modeled now. If you take the first assumption you get:

FEATURE ([feature_name], weight)

(the square brackets indicate the PK)

> EVALUATIONS (isbn[fk to textbook], book_feature[fk to
> weights][composite pk], score )

and this would then become

EVALUATION ([isbn, feature_name], score)   FK: feature_name -> FEATURE

Try to keep your naming consistent. Every record in PUBLISHER is a publisher. Every record in TEXTBOOK is a textbook. Every record in EVALUATION is an evaluation of a certain feature. So don't use EVALUATION*S*. The final test of a good data model is always if the records in the tables make sense to you as facts. So for the tables I gave above you have to aks yourself "does it make sense to say that a certain feature with a certain name has a certain weight". If weights are determined per book, for instance, then this does not make sense.

-- 
  Jan Hidders
Received on Fri Mar 16 2001 - 10:34:41 CET

Original text of this message