If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > General > Database Concepts & Design > I need a simple help ...

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-24-03, 13:23
xspace xspace is offline
Registered User
 
Join Date: Oct 2003
Posts: 9
Question ERD

xx

Last edited by xspace; 10-29-03 at 01:06.
Reply With Quote
  #2 (permalink)  
Old 10-26-03, 11:12
Zemog Zemog is offline
Registered User
 
Join Date: Oct 2003
Location: Mexicali, Baja California, México
Posts: 5
Re: ERD

Hi.

IMHO you left out one entity on your ERD: the one that holds the cd copies.

With the design you propose you´ll have to repeat the title, synopsis and all data for each CD copy available, also the ISBN alone wouldn´t keep track of a rented cd, since all copies of a CD will have the same one, so you need a way to identify each physical CD.

On the other hand, the Category Entity is a little mixed up, I guess that it holds the category where the cd is classified (ie. action, comedy, etc)

I would do it more or less like this:

Member (member_id, membership_num, name, sex, age, address... etc)

cds (cd_isbn, title, synopsis, category_id fk)

categories (category_id, description, num_titles)

copies (copy_id, cd_isbn fk, date_purchased) * imho it's wrong to assume all copies will be bought the same day, think about replacements

rentals (rental_id, copy_id fk, member_id fk, rental_date, due_date)

reservations(reservation_id, cd_isbn fk, date_reserved, time_reserved)

Note the categories table, you shouldn't include any cd information there.

Hope this helps
Reply With Quote
  #3 (permalink)  
Old 10-26-03, 23:25
xspace xspace is offline
Registered User
 
Join Date: Oct 2003
Posts: 9
Hi Zemog,

Thanks for the reply. What you mentioned is kinda true, and I did not realise it too.

I actually assume that even for the same CD Title, they will have their own different unique ISBN. I do not know how true this is in the real market. Perhaps what you said is true, every same title will have the same ISBN.

If you can just do me a favor ( I know abit too much ) ... on the diagram itself ...
Reply With Quote
  #4 (permalink)  
Old 10-27-03, 10:25
xspace xspace is offline
Registered User
 
Join Date: Oct 2003
Posts: 9
I drew a new ERD .. wonder how correct it is ...

Last edited by xspace; 10-27-03 at 10:58.
Reply With Quote
  #5 (permalink)  
Old 10-27-03, 10:59
xspace xspace is offline
Registered User
 
Join Date: Oct 2003
Posts: 9
xx

Last edited by xspace; 10-29-03 at 01:06.
Reply With Quote
  #6 (permalink)  
Old 10-27-03, 15:14
Zemog Zemog is offline
Registered User
 
Join Date: Oct 2003
Location: Mexicali, Baja California, México
Posts: 5
Thumbs up

Yup, you got it, that looks fine to me
Reply With Quote
  #7 (permalink)  
Old 10-27-03, 20:15
xspace xspace is offline
Registered User
 
Join Date: Oct 2003
Posts: 9
Thx Zemog ... I showed this to my lecturer ... what he says that we only need to have copies in the CD entity ...

That means it will be the formal diagram but add a new column, COPY in CD entity.

Erm ...
Reply With Quote
  #8 (permalink)  
Old 10-27-03, 21:52
Zemog Zemog is offline
Registered User
 
Join Date: Oct 2003
Location: Mexicali, Baja California, México
Posts: 5
It is possible to do it like that, but it is not efficient at all.

It is far better to have a separate table to hold the copies, but if that makes him happy so let it be. But you'll know better than that, right?

What will that column hold? the number of available copies?

That approach works if there are no plans to track each individual copy, which in my opinion should be desirable (to track each one).

If he's suggesting that you'll have a row for each copy then he's way out of order

Anyway, removing the "copies" table you'll lose track of when a specific cd was bought, or how many times a specific copy was out, or who had the copy out the last time (provided that you have a history table for that).

Don't you remember on the old times of videotape rentals when you had to go back and return the tape because the previous member messed it up?

Well I think you got the idea by now.

So if he's happy then go ahead.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On