Help coderanch get a
new server
by contributing to the fundraiser
  • 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
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

Master-Detail and Many to Many Patterns

 
Ranch Hand
Posts: 165
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What are these patterns for? For GUI?
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Didn't hear of them before, but from a quick google search it seems as if Master-Detail is actually a GUI pattern, whereas Many To Many seems to be more about data modeling.
Why do you ask?
 
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Master-detail is about data modeling (and in fact the notion goes back a long ways in the data modeling community). But there are some UI patterns that arise from it.
Here's the standard example. Consider a sales order. It consists of a some basic info about the sale (customer, date, etc.) and then a list of the items sold. In a relational database, we would have a sales-order table, and a sales-line-item table. The sales-order is the master, and the sales-line-item is the detail. There's a one-to-many relation between them, but it's special because the detail has no life beyond its parent.
Now, in the UI area, there will often be screens or web pages or whatever that display or edit the master-detail relation (e.g, "enter sales order",
"display sales order" etc.) So you could have some patterns regarding how to do that. In fact, many old 4GL tools could recognize master-detail relationships and automatically generate a UI for them.
Many-to-many is again from data modeling. It's not really a pattern, but one could make a little pattern language of different ways to handle many-to-many relationships.
(Edited to add the UI aspect.)
[ November 03, 2003: Message edited by: Loren Rosen ]
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic