• 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
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Big Smokes Domain Model

 
Ranch Hand
Posts: 254
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

As some people have already pointed out in other posts, the relationships between StandardCigar, PetiteCigar, FlavoredCigar and CigarManufacturer is many-to-many. This raises several issues:

A many-to-many relationship like this works fine for the components of a final product but it doesn't really fit for a finished product like a cigar. The many-to-many relationship implies that Big Smokes only sells generic cigars. For example, when I buy a standard cigar I'll have no idea who made it until it arrives on my doorstep. Clearly this isn't a very sensible business model. For example, people don't go into a shop and ask for a packet of cigarettes, only to leave the choice of brand up to the salesperson.

An alternative interpretation of the business model is that StandardCigar, PetiteCigar, and FlavoredCigar all relate to product categories, as opposed to individual saleable items. This makes far more sense.

Also, I think it's safe to assume that the perspective of the domain model class diagram supplied by Sun is conceptual, rather than specification or implementation. This gives us some leeway in how we interpret it's contents.

What are other peoples' thoughts on this?

Regards,

Jonathan
 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am agree with the idea that Standard, Petite and Flavored are categories of a product. Thinking in a new cigar it will be so expensive to have an entity for each type. Then I have changed my BDM to support a new entity called product that has a category (Product[*]:Category[1]). But now, is that possible? as you say is it safe to think that BDM is a conceptual model?

Many to Many relation, as you say gives the customer the absence of brand, then BigSmokes Cigars only has three products to sale, this for me has no sense, moreover you will have to ask for inventory of the same product in all manufacturers and it is so expensive. I think a product should be identified by a category(standard, petit, flavored) and a manufacturer, are you agree?.

Greetings.
 
J J Wright
Ranch Hand
Posts: 254
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I totally agree.

In my mind StandardCigar, PetiteCigar, and FlavoredCigar have to be categories of product. Whichever way you look at it they just don't make sense as saleable items. I raised the question because this seemed to be an issue other people were grappling with.

I also believe the class model is 100% conceptual in nature (it was created by business analysts). As has already been mentioned; there's no way you're going to create a catalogue system based on non-generic objects like these.
 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Jonathan
I totally agree with you. What you say here makes a lot of sense.
Actually I thought about this the same way as well, but wasn't that sure. The assumption is reasonable, therefore the products(not category) to manufacturer is many-to-one. This simplifies things. But remember it still stands that one Order may involve multiple manufacturers.

Btw, what makes you afraid of speaking out of my name, keep referring me as "other".

Peace,
 
J J Wright
Ranch Hand
Posts: 254
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Lann,

Btw, what makes you afraid of speaking out of my name, keep referring me as "other".



Hey, nothing personal. I was trying to write replies on the fly and couldn't be bothered linking all the threads together! Get's a little confusing now there's 2 or 3 on the same topic :-) It's good that there's strong consensus on how to interpret the Domain Model.

Regards,

Jonathan
 
Lann Lu
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, Jonathan,

Not a problem, I was just curious.
Thanks again for helping me think through.

Cheers,
 
I found some pretty shells, some sea glass and this lovely tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic