Database Management
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesDatabase Management

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old May 3rd, 2003, 01:52 PM
maria maria is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Posts: 1 maria User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Unhappy ER Diagram

Hello.
I am building a Er Digram for a Library and I have the following problem :
I have an entity Member (superclass) and entitities: professor, undergraduate student, postgraduate student (subclasses of Member) and the entity Book.
I have the relationship : Memebe r--> borrows <--Book and Borrowing Date and Date of Return (90 days max) are kept as attributes at the relationship. But each Member of the library has different rights at borrowing. A profeessor an borrow up to 10 books at the same time for 90 days, a postgraduate student 7 books for 60 days etc.
Should I make a new entity with the rights of borrowing and each member of the library should be connected with it ? The actual numbers (10 books, 90 days) will appear somewhere or I will have attributes "number o books allowed", "days allowed" ?
In addition a professor can reserve up to 5 books. Wiill this number appear in the ER-diagram
Any help should be valuable to me.
Thank you in in advance for your time and patience

Reply With Quote
  #2  
Old May 16th, 2003, 08:31 AM
W860098 W860098 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Location: Northampton, UK
Posts: 1 W860098 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Without know all the facts, my suggestion would be that you have 4 entities, i.e. Member, Staff Type, Terms and Book.

The one-to-many relationships would be :-

a) Terms : Staff Type
b) Staff Type : Member
c) Member : Book

I hope that gives you some 'food for thought'

Reply With Quote
  #3  
Old May 24th, 2003, 10:10 PM
dotcomguy dotcomguy is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Location: #devshed @ irc2.beyondirc.net
Posts: 231 dotcomguy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 22 m 40 sec
Reputation Power: 6
Send a message via ICQ to dotcomguy Send a message via AIM to dotcomguy Send a message via Yahoo to dotcomguy
Actually, I think maria's on the right track using subtype entities; this is a classic example of their usage which you have different type of people to track. You could have a relationship between each different type of member and borrows giving each relationship a different cardinality.
__________________
.

Reply With Quote
  #4  
Old August 19th, 2003, 10:56 AM
RainEr_One RainEr_One is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 1 RainEr_One User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
i think it is better to make "number o books allowed" and "days allowed" to be the attrbutes of each type of member!
The method of attaching cardinality to the borrow relationship is not practical since the user may not borrow maximum number of books at one time!

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesDatabase Management > ER Diagram


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway