Win a copy of High Performance Python for Data Analytics this week in the Python forum!
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
• Campbell Ritchie
• Paul Clapham
• Ron McLeod
• Bear Bibeault
• Liutauras Vilda
Sheriffs:
• Jeanne Boyarsky
• Tim Cooke
• Junilu Lacar
Saloon Keepers:
• Tim Moores
• Tim Holloway
• Stephan van Hulst
• Jj Roberts
• Carey Brown
Bartenders:
• salvin francis
• Frits Walraven
• Piet Souris

# Related to Entity Relationships.

Ranch Hand
Posts: 339
• Number of slices to send:
Optional 'thank-you' note:
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.

Sheriff
Posts: 14691
16
• Number of slices to send:
Optional 'thank-you' note:
Multiplicity is explained page 223. Is there anything you don't understand from this explanation ?

Ranch Hand
Posts: 339
• Number of slices to send:
Optional 'thank-you' note:
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 ]

Sheriff
Posts: 14691
16
• Number of slices to send:
Optional 'thank-you' note:
"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.