• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Related to Entity Relationships.

 
pradeep singh
Ranch Hand
Posts: 339
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi to all
Could you anybody explain me in detail the numbers denoted on entity diagrams of showing OneToMany and ManyToOne mapping at page no. 244 and at page no. 247 in EJB in Action book.The numbers are like 1 ,0..* ,1..* etc.
Please explain me in detail .I am very confused about these.
 
Christophe Verré
Sheriff
Pie
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Multiplicity is explained page 223. Is there anything you don't understand from this explanation ?
 
pradeep singh
Ranch Hand
Posts: 339
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
Thankx
But i want to know what these numbers denote ?
The numbers are like 1 ,0..* ,1..*


Please explain me these with some examples.
[ November 16, 2008: Message edited by: pradeep singh ]
 
Christophe Verré
Sheriff
Pie
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"1" means "only one". "*" means "many". So, "0..*" means "zero or any number of". I find figure 7.3 self explanatory. Look at Bid and Bidder. Bid(0..*)<----(1)Bidder. It means that a Bidder can place many Bid, and a Bid is placed by only one Bidder. The relation between Item and Category is Item(0..*)<---->(1..*)Category. It means that an Item belongs to one or more Category, and a Category can hold many Item.

For example:
Category : Sport,Cloth,Television,Game
Item : Football Shirt

The Item "Football Shirt" may belong to Category "Sport" and "Cloth". This Item has two Category. Category "Sport" now has one item. "Cloth" also has one item. "Television" and "Game" still have no Item.
 
pradeep singh
Ranch Hand
Posts: 339
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thankx Christophe Verre
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic