Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Part 2 - domain model normalization allowed?

 
Claudiu Dumitrescu
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,

I've downloaded the assignment few days ago and already started to work on it. Hope to finish in time, but already I hit on some issues.
From your experience, if I have a many to many in the domain model (I actually have 3 of such) could I go ahead and normalize the model or I need to design the solution using it as it is? How should I map an many to many Order - Product relation into classes? The example is fictive off course.

Thanks
 
Matthew Brown
Bartender
Posts: 4568
9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd have thought the way to map a many-to-many relationship between orders and products would be to have an Order class and a Product class, with a many-to-many association between them. Remember this is an object-oriented model, not a relational model, so I don't see why normalization would be relevant.
 
Claudiu Dumitrescu
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes. You are right.

 
Krishna Jonnalagadda
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think when we finally model we intend to pesist these classes (objects/entities) in to a database. So i guess we should still consider normalization.
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!