MS.COM Operations Tools Team WebLog

Hey - What does this button do?

The right tool for the job

I love relational databases.  Many years ago, I made a conscious decision that I was going to devote my career to architecting, engineering and running databases.  I've spent years poring over subjects such as relational theory, SQL-92 and SQL-99 standards, transaction processing, analytics, set theory, shared everything and shared nothing architectures, security, scalability, reliability and performance.  I've tweaked, I've tuned and I've retweaked and I've retuned.  It started off almost 20 years ago and I've run a gamut of systems and platforms.  DB2, Oracle, Informix, Sybase and ultimately, in 1993 settled on a product called Microsoft SQL Server.  Now we're talking OS2 versions of SQL Server and for anyone who went down that path, you know what I'm talking about when I say the product was in its infancy.  Since then, I've watched it change and grow into the great product we have today. 

So as I mentioned, I love relational databases and I don't just mean SQL Server (it's just the one I like best).   But as tools to create and manage these databases get simpler, I've seen some disturbing trends.  The first is that it's way too easy to create a database without having the first inkling of any of the concepts I mention above.  This is particularly scary when you're the DBA who has to support production databases that don't scale because their design is fundamentally flawed in some way.  An equally (some would call it more) disturbing trend is the current idea that all things belong in a database.  While that may be true on some levels, where the real issue lies is in storing and retrieving non-relational data from a relational database management system (RDBMS).   There are many types of data that do not lend themselves naturally to an RDBMS.  For example, while storing flat file structures and hierarchies in SQL Server ostensibly seems like a good idea...after all it's data and SQL Server is a database, it's important for people to note the "R" at the front of the acronym RDBMS.  Now, without going into the depths of Relational Theory, Boyce-Codd normal form and degrees of denormalization I will say that while hierarchical data is somewhat relational, it does not lend itself well to storage and retrieval operations in an RDBMS.  The reasons are really fairly simple.  RDBMS engines are designed to optimize query plans, storage operations and caching with relational data.  RDBMS engines will still try to interpret the data and apply relational operations to it.  Hierarchies have the added complexity of usually requiring the need for inherited properties, which RDBMS engines do not do well without a LOT of code. 

By now, you're asking yourselves, does he have a point?!  Don't worry, I'm getting there now.  Recently, we had a situation where we had a legacy SQL database that, when we got right down to it, represented an almost pure hierarchical data structure.  And guess what?  We were having issues with performance, requests to have objects inherit properties and attributes from their "parents" and nightmares trying to build a model that would allow for attribute level security.  So we quickly made the decision that SQL Server was not the best solution to store and retrieve the data.  So what did we choose, you ask?  Well, when we looked at what was available to us, the most relevant solution was Active Directory.  It supports hierarchies, inheritance, replication and attribute level security...but it was serious overkill.  As I mentioned in an earlier post, we eventually want to share our tools with all of you and to ask you to install an entire AD structure to manage a portion of your environment seemed a little much.  Then one of my guys, we'll call him Chris (because that's his name) said "Hey, why don't we use AD/AM?"  To which the rest of us said "Huh?  Who the heck is Adam and does he know something we don't?"  To which he rolled his eyes and said "Not Adam, AD/AM!"  and began to educate us on yet another little known Microsoft product.  AD/AM is Active Directory/Application Mode.  It ships with Windows 2003 Server and is downloadable for free for all other operating systems (including XP).  AD/AM is a lightweight Active Directory that supports all of the features of AD that we were looking for without the overhead of a full AD implementation.   Once our data store was converted into AD/AM, we wrote an API that allows us to relate the objects in our hierarchical database to truly relational data stored in SQL Server and I'm here to tell you it rocks!  It's fast, reliable, scalable and the right tool for the right job.  We continue to leverage SQL Server for our relational database needs and AD/AM to manage our hierarchies.  Pretty cool stuff!  I encourage you to take a good look at AD/AM if you're looking to store and retrieve hierarchical data.  I've added the links to their homepage, the download page and an overview presentation below..

AD/AM Home Page

AD/AM Download Page

AD/AM Overview Presentation

 

That's all for now!

Scott

Published Friday, July 16, 2004 2:25 PM by mscomts

Comments

 

TristanK said:

Love the blog - as it's a team blog, it'd be nice to have a name against each post though (just a first name would do)?

If your name is actually Mscomts, I apologize, the pronounication threw me! :)
July 17, 2004 8:56 PM
 

Eric GNACADJA said:

Thanks !
The more I read about the advantages of storing data in directory, the better i feel.

I'm working on a e-Archival system and dealing with the bets way to store the metadata about the documents stored on the juke-box.
The metadata are implemented as rdf file according to some customized extensions of Dublic Core.

Okay, the pending question is "what is the best way to store and query rdf (or more globally, xml) data ?

After trying some ways and googling nigths long, I have to ways which I want to test:
1. Storing in a RDBMS as XML native data type in SQL Server 2005 beta / Oracle 9i Release 2
2. Storing in a LDAP directory.
August 7, 2004 6:07 AM
 

MS COM Operations Tools Team WebLog The right tool for the job | fix my credit said:

June 16, 2009 10:28 PM
New Comments to this post are disabled

This Blog

Syndication

Tags

No tags have been created or used yet.

News

All opinions posted here are those of the author(s) and are in no way intended to represent the opinions of our employer. This is provided "AS IS" with no warranties, and confers no rights. Use of included code samples are subject to the terms specified in the Terms of Use.

© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Microsoft
Page view tracker