SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Enforcing Referential integrity in Microsoft SQL Server 2000


Enforcing Referential integrity in Microsoft SQL Server 2000

Author
Message
Adam Machanic
Adam Machanic
SSCrazy
SSCrazy (3K reputation)SSCrazy (3K reputation)SSCrazy (3K reputation)SSCrazy (3K reputation)SSCrazy (3K reputation)SSCrazy (3K reputation)SSCrazy (3K reputation)SSCrazy (3K reputation)

Group: General Forum Members
Points: 2993 Visits: 714
Okay, so you're saying that some OO devs designed this database like they would design an OO system? I've seen some absolutely --wonderful-- output from those situations. Confusion about is-a vs. has-a relationships and how the DBMS enforces such relationships. In one case, an online ordering (ecommerce) system was designed such that the products table had a foreign key to the line items table! End result: These guys were inserting fake orders every time they wanted to sell new products. And of course, there were duplicate products inserted with every order. Luckily, their volume was very low

--
Adam Machanic
SQL Server MVP
SQLblog.com: THE SQL Server Blog Spot on the Web
DCPeterson
DCPeterson
Hall of Fame
Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)

Group: General Forum Members
Points: 3481 Visits: 432

David: I would hope that I haven't built quite that bad of a reputation for apoplexia!

I admit that I do tend to respond to certain topics rather forcefully, but that is because I've seen too many systems just like the one you and Adam describe, and it annoys the hell out of me when I have to clean up the mess. I have often likened a job like that to trying to separate the toilet paper out of the sewage; at best it's a nasty, difficult job, at worst it's a nasty difficult job that also happens to be impossible. Then to hear (or read) someone put forth this kind of "solution" as "elegant" just makes me want to wring their neck...

To anyone reading this: Relations (db tables) <> OO Objects!!!!! Don't make that mistake, they are not even close to being the same thing. This is what C.J. Date called the "First Great Blunder" which Adam and I have discussed before...



/*****************

If most people are not willing to see the difficulty, this is mainly because, consciously or unconsciously, they assume that it will be they who will settle these questions for the others, and because they are convinced of their own capacity to do this. -Friedrich August von Hayek



*****************/
Dave Poole
Dave Poole
SSCoach
SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)

Group: General Forum Members
Points: 16798 Visits: 3403
I actually agree with most of the things you say, possibly with the exception of the separating out toilet paper from sewage.

When ever I see a badly designed database supplied by a 3rd party organisation I get the warm glow of job security. If every database I saw was well built and well designed then what would people need me for?

LinkedIn Profile
www.simple-talk.com
DCPeterson
DCPeterson
Hall of Fame
Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)

Group: General Forum Members
Points: 3481 Visits: 432

Job security is nice, but in my experience, there are too many truly productive things that don't get done because so much effort goes into supporting junk systems.

I'm much more valuable to my company when we are actually swimming toward a goal as opposed to struggling to tread water. Ultimately it's my value to the company that determines how secure my job is.



/*****************

If most people are not willing to see the difficulty, this is mainly because, consciously or unconsciously, they assume that it will be they who will settle these questions for the others, and because they are convinced of their own capacity to do this. -Friedrich August von Hayek



*****************/
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search