Wrox Programmer Forums
|
BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0
This is the forum to discuss the Wrox book ASP.NET 2.0 Website Programming: Problem - Design - Solution by Marco Bellinaso; ISBN: 9780764584640
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 15th, 2006, 07:44 PM
Registered User
 
Join Date: Aug 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default O/R mapping many to many relationship

Hey guy , i would like to know that how to implement the relationship many to many in O/R mapping. In the book the relationship between category and product is one to many, however if i want to modify the relationship between the category and product to many to many i.e. create a new table called categoryproduct which contains foreign key from categoryID and productID how could i implement those categorydetails and productdetails objects. Will i need to implement the mapping object categoryproduct as well.

Thank you very much for you help

 
Old August 15th, 2006, 10:48 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 917
Thanks: 0
Thanked 0 Times in 0 Posts
Default

It depends on how many records you want to deal with at a time. If you'll only have a small number of records you can denormalize the data and store it all in one class, or a couple classes. You have to decide how you want to map the domains so the data presentation layer will find it convenient to use, and the DBMS layer will find it efficient and reliable.

By the way, the term ORM usually refers to a slightly different process where you have a set of maps and an automated process to statically or dynamically map a table or set of tables to a domain class, or set of classes. Marco is using a custom DAL that isn't really an ORM methodology. Marco has defined his own classes by hand, which is the way a lot of people prefer to do it.

Eric

 
Old August 17th, 2006, 07:59 PM
Registered User
 
Join Date: Aug 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi englere, so how can i do it by hand based on Macro style

 
Old August 17th, 2006, 11:18 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 917
Thanks: 0
Thanked 0 Times in 0 Posts
Default

If you do it by hand you just design your own classes using traditional OOP technicques. Sometimes you'll see the term OOAD, which means Object Oriented Analysis and Design. Plug this into google.

If you're weak on the C# language you should get a good book on it. Marco's book assumes people already have some familiarity with OOP design methods.

The single biggest reason people have a hard time with .NET is because they don't really understand OOP. OOP is fundamental to .NET and it's worth it for you to learn it really well.

Eric






Similar Threads
Thread Thread Starter Forum Replies Last Post
One To One RelationShip prasanta2expert SQL Language 0 November 7th, 2006 06:30 AM
dataset relationship zaiywz ASP.NET 2.0 Professional 0 April 5th, 2006 01:49 PM
Tables Relationship itHighway Classic ASP Databases 1 August 22nd, 2005 12:16 AM
Many To Many Relationship samersult BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003 1 January 26th, 2005 07:09 AM
sql:relationship Yehuda SQL Server 2000 2 December 22nd, 2004 06:02 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.