tag:blogger.com,1999:blog-6579772240267288367.post1050281534290401315..comments2023-06-05T08:45:12.716-04:00Comments on kwblog: SQL Performance: Child dataKevin Berridgehttp://www.blogger.com/profile/13759114853595462455noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-6579772240267288367.post-375313912655176512009-06-30T17:26:37.558-04:002009-06-30T17:26:37.558-04:00you could add some abstraction, using views and st...you could add some abstraction, using views and stored procedures for all the CRUD operations, that would give you the room to switch strategiesBlackTigerXhttps://www.blogger.com/profile/05376454374607771065noreply@blogger.comtag:blogger.com,1999:blog-6579772240267288367.post-62261209461908822472009-06-29T11:09:25.617-04:002009-06-29T11:09:25.617-04:00Agreed. I've been moving that way too.Agreed. I've been moving that way too.Kevin Berridgehttps://www.blogger.com/profile/13759114853595462455noreply@blogger.comtag:blogger.com,1999:blog-6579772240267288367.post-34805967958452703152009-06-29T11:07:32.804-04:002009-06-29T11:07:32.804-04:00That's a really interesting problem and oddly ...That's a really interesting problem and oddly enough I can't say I've ever had to do this. Although i could see it being really common. <br /><br />I think, just off the top of my head i would lean toward #2 unless some compelling reason pulled me another direction. <br /><br />I personally prefer most logic like this to be in code (by which i mean say C# instead of SQL like an SP). I reserve SPs to simple insert/update/delete but even then I'm starting to lean more toward ORM style solutions that's dont use SPs. Considering that this means I'd probably put in some sort of hook on that particular objects add or delete. <br /><br />The main reason is that code is generally a bit easier to test than pure SQL. Also id want to isolate this logic into a method or class and i find it a bit more maintainable to have a method in a class somewhere than another SP or function that a 2nd SP calls.Josh Schrammhttps://www.blogger.com/profile/04179432092617833919noreply@blogger.com