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 May 8th, 2008, 04:14 PM
Friend of Wrox
 
Join Date: Mar 2007
Posts: 488
Thanks: 2
Thanked 11 Times in 10 Posts
Default

Ronnie,

Glad to see it's all 'happening' now. i think your idea of the parent table is a good concept which will no doubt be 'bastradised' to the n'th degree to fit all scenarios (i mean this in a +ve sense as i know what can happen will happen!!).

if you normalise the tables and require to do multiple updates to keep everything in sync (and i think you should), then look to your old friend TransactionScope. This way, you can do 'seemingly' multiple insert/deletes within your BLL whilst keeping your heirarchical data integrity intact. this has a ripple down effect (i.e if you delete a parent id, then all hierarchies below will be similarly deleted, but only if the master record delete succeeds [remember, we're operating at the BLL level, so we can't use any database specific transactional logic]. if you need help on 'seeing' what this means, then just let me know but it's similar to the BLL.Hotel.Hotel DeleteHotel method (and all other 'DeleteObject' methods).

Other than that, i guess the only other area to be aware of (tho' it sounds like you're well aware of most scenarios) is the critical section where you consume the external data and make the updates to your own 'internal' data structure. In this scenario, many folk opt for a mapping structure in order to keep their own data discreet from the consumed data (i.e. a small two column table is created which maps the key field of the consumed data onto the internal key data table. I don't know if this is applicable/desirable or not - but is worth 'noting' (even if only academically).

ok - hope this hasn't raised more than it's settled. Looking fwd to seeing your initial implementation(s)....

[edit] another good example of the TransactionScope stuff is in the actual TBH code under BLL.Store.Order. look in particular at InsertOrder, tho UpdateOrder is a good one too ;)

jimi

http://www.originaltalent.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
list foreign keys in sql 2000 jomet SQL Server 2000 2 May 1st, 2008 11:15 PM
Foreign key not updating with Primary key xavier1945 BOOK: Access 2003 VBA Programmer's Reference 2 July 4th, 2007 09:48 PM
inserting records with foreign and primary keys tdaustin Classic ASP Basics 0 October 4th, 2005 12:49 AM
FOREIGN KEY and PRIMARY KEY Constraints junemo Oracle 10 June 15th, 2004 01:00 AM





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