Win a copy of Murach's MySQL this week in the JDBC and Relational Databases forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Associative Entities

 
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can an associative entity be used between 2 entities that have a 1:many relationship? Or do must they only apply between a many:many..

The examples I can see online are about many:many
eg. a Grade entity between a Course and a Student...

I thinking about using an associative entity between what I originally considered as a 1:many relationship

i.e An Order has many Order Items...However, an audit history is required (of items being removed or added from the transaction).

So I want to use another entity to map the relationship between the orders and the ordered items...items could be added and removed several times..

I am sounding reasonable here? Or is this crazy talk?
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It sound reasonable but why would you need it. Why to create an extra entity when those 2 can keep what you really need?
 
Jules Bach
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I was thinking that the 'ownership relationship' was not really property of the item, or the order item. I.e. a distinct ownership entity would be suitable to bridge orders with some order items - even if an order item can belong to at most one order.

I could have an attribute in 'order item' entity along the lines of 'who owns me' - but I didn't know if this was in the spirit of ERD modelling...since ownership is not a property of the 'thing' - it's a type of relationship
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic