Project Description
Metadata Driven Database Deployments (MD3) does just what the name deploys your database schema without having to code esoteric DDL. But there's more

Please see my blog series on MD3 at

Project Overview
Do we really need another database deployment routine? We think so. Most existing database deployers still require you to write a lot of esoteric DDL, which requires a DBA to get correct. There is a movement in our industry to move to "schema-less" solutions because RDBMS schemas are just to hard to change.

That's just not true.

The fact is, if you have a good database deployment routine you should be able to enter some simple metadata about your objects and then the tool should figure out FOR YOU how to deploy the schema correctly. That's why MD3 does.

For More Information
See the Powerpoint demo (

Stateful and Stateless Database Objects
When dealing with a language like Java, if it compiles, you're done. The code is "stateless" insofar as it doesn't care what the previous state of the codebase looked like. With databases, we aren't so lucky. Database objects are both stateful and stateless. Stored Procedures, Functions, and Views are examples of stateless database objects...we just deploy them and if they compile we are done.

But tables, indexes, constraints (PK, FKs, CHECK), and "lookup" data do have to be concerned with the "state" of the table and its data. And this is what drives us nuts trying to deploy our database schemas.

MD3 makes deploying all of this a breeze.

The Four Rules of Stateful Database Object Deployments
If your deployment routine can get these Four Rules of deployments correct, then you have a very sophisticated tool. MD3 does all of these things, simply.
--if the object exists by name and by "properties", then do nothing, the object is already correct
--if the object exists by "properties" but its name is different, then RENAME the object
--if the object exists by name, but the "properties" are different (ie, different FILLFACTOR/FileGroup/INCLUDE columns) then "fix" the current object smartly to get the desired properties
--else, create the objects with the desired properties.

MD3 does all of this without you having to write ANY TSQL. None at all. How? We follow the "Tell, Don't Ask" principle. YOU declare a series of metadata and MD3 makes your schema look just like that metadata. As an example...imagine you could just change the values in sys.indexes and your index was magically adjusted to whatever you needed, without writing SQL.

It's that easy.

Additional Information
--You do not need any special SQL dialect, file format, or anything else. Use your existing .sql files if you want to.
--Total flexibility.
--read the readme.txt file in the downloadable code
--read the attached .pptx file for even more features of MD3
--lots of documentation in the folder structure for reverse-engineering your database.
--the attached code also has a reverse-engineered, working copy of AdventureWorks2012 for experimentation.

Read the Documentation
The latest documentation is embedded with the source code in \_Documentation folder. Also see our Documentation wiki.

- Edit this page to provide information about your project
- Upload the initial source code for your project

Additional information on starting a new project is available here: Project Startup Guide.

Last edited Jan 22, 2015 at 11:15 PM by dwentzel, version 11