Editorials

Emulate Inheritance In Your Relational Database

Webcast Tomorrow:
High Availability Through SQL Server

With failover clustering, data mirroring, peer-to-peer replication, and log shipping available there is an option or two for every scenario. While each technology has a place in the world, they aren’t interchangeable and provide the greatest benefit when applied to the proper solution. A walkthrough of each of these technologies and where they fit in your environment.
Presented by: Jason Strate

> Register Now
> Live date: 2/24/2010 at 12:00 Pacific

SelectViews Video Show
SQL Server service packs, VS CTP, SQL Server features and applications, SQL Server Tip: Auditing your systems.
End-user SharePoint resources for your systems, new mobile devices with SharePoint, upcoming events and more.

[Watch the Show]

Better Reports Management AND Dashboards
If you can pull together reporting, dashboards AND the management of these critical tools, all in one place, you’ll be ahead of the game of giving people information they can use. This is exactly where Crystal Reports Server comes in, providing you with a centralized tool and management tools to deliver your interactive reports to your users – over the web, email, on your portals and using Microsoft Office. Crystal Reports Server can help make the use of these tools much more comprehensive and helpful – and right now, you can enjoy huge savings! Get up to 30% off when you move to Crystal Reports Server 2008. Limited time offer. Learn more here.

Did You See Ben Taylor’s Article?
"Emulate Inheritance In Your Relational Database" – the article starts with "One reasons for the popularity of object oriented programming is the ability to re-use code. Once that code is perfected, it does not have to be repeated. Applying the same principal to a relational database you reap the same benefit of re-use and reduced effort. In this article I explore one method of emulating inheritance using normalization techniques in relational database design."

What’s really cool though is the discussion that has followed. Dave wrote "I don’t really see this as "object oriented programming in the db." As you mentioned in the comments to Alec, it’s just good physical modeling of the type/subtype pattern. In fact, I’m always leery of ever mentioning something like "object oriented programming in the db" for fear that the less knowledgeable try to take this concept to a ridiculous extreme since now the DBA is telling us they are trying to be more OO.

Here’s an idea for a follow-up article for you. When have you taken "OO in the db" too far? More importantly, as a db professional, how do you spot it and *win* an argument against your solution architect that wants to do this?

That always seems to be my problem. For instance, taking the reusability OO argument to an extreme, have you ever seen a really bad MUCK design? Or an EAV? I’ve found these are more common than ever due to trying to implement OO in the data tier and the advent of ORMs and "sql writers". In some cases these designs make sense (user extensibility of data models), but I’ve also seen cases where the entire db was implemented as 1 table with cols like ID, PropertyName, PropertyValue, and some stuff to denote data types.

The OO guys never stop to think about how this will perform, how to report off of it, referential/domain integrity…you get the idea. Just a thought but I wouldn’t call this OO in the db…it’s just good modeling."

I’m not pointing this out to disagree with either Ben or Dave – but rather to point out the discussion. Today’s food for thought…

There are other comments as well – take a look at the article link above. How do you feel about this? I guess I’d call it "true" Object Oriented modeling – how far is too far, particularly with SQL Server. Do you use these types of tools, and if so, do you find yourself reviewing the designs to make sure you stay in the realm of referential integrity and best practices for design?

Drop me a note – let me know

SQL Server Learning
We have several things coming up to learn all about SQL Server – from Accidental DBA-type things (DBA School) to Full-up 75-session events (vConference):

SQL Server Admin Expo – Feb 26 – Free event – 3 sessions by excellent speakers, about SQL Server administration
Spring 2010 SSWUG.ORG Virtual Conference – SQL Server, Business Intelligence, SharePoint – 75 sessions, 20 speakers…
DBA School – (50% sold-out already) 15 ppl max – Apr 19, 20, 21 – In-Person class that focuses on the things you really need to know – and shows/teaches how to apply it.

Featured Script
dba3_OutPutVariable_Demo
demo example procedure of how an output variable may be used… (read more)