SchemaSmith Enterprise Documentation

What is Metadata?

Data describing data

metadata

Overview

Metadata describes a database structure. Most sql server objects can be defined completely within a .sql file.

For example:

  • Functions
  • Stored procedures
  • Triggers
  • Views

All of these objects can be created or altered without worrying about state. Tables are where things get tricky.

Tables need an abstraction

You could define a table as a create script, but as soon as you start entering data, things get complicated. For any change after the initial rollout, you have to determine how to alter the table to bring it to the desired state. You could have a series of migration scripts describing each change for each release, but do you do that with any of your other code? What is needed is some form of abstraction to describe the desired state.

By convention, SchemaQuench works with tables defined in JSON format. This format is describing what the column names should be, the type they should have, nullability, etc. SchemaQuench calculates how to safely alter the structure to bring it to the desired state as defined by the JSON leaving you to worry about what matters most. Describing what you want the table to look like.

Additional Resources