Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12

Enforcing Referential integrity in Microsoft SQL Server 2000 Expand / Collapse
Author
Message
Posted Tuesday, January 17, 2006 9:39 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Yesterday @ 9:28 PM
Points: 1,140, Visits: 702
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
Post #251322
Posted Tuesday, January 17, 2006 11:22 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Wednesday, July 23, 2014 8:16 AM
Points: 1,035, Visits: 410

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



*****************/
Post #251359
Posted Wednesday, January 18, 2006 2:28 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Today @ 12:02 PM
Points: 2,892, Visits: 1,785
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
Newbie on www.simple-talk.com
Post #251560
Posted Friday, February 3, 2006 9:03 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Wednesday, July 23, 2014 8:16 AM
Points: 1,035, Visits: 410

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



*****************/
Post #255678
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse