Quantcast
Channel: SQL Archives - SQL Authority with Pinal Dave
Viewing all articles
Browse latest Browse all 594

SQL SERVER – Document Your Databases with Data Dictionary and Diagrams

$
0
0

A couple of months ago I told you about the new interesting tool I found for documenting existing database schemas – Dataedo. For those who don’t remember, this is a desktop tool that enables you to describe database schema elements and create ER diagrams for existing databases, and export to nicely formatted HTML and PDF documents.

Since my last article I have worked with the tool more, and, with the courtesy of the guys from Dataedo team, I had a sneak peek into their upcoming new major release – Dataedo 6. I believe it now stands out even more and, despite being simple, is ready for serious enterprise data governance programs. Let me walk you through the features.

SQL SERVER - Document Your Databases with Data Dictionary and Diagrams dd1

Why document databases?

Let’s have a look first why you should use a database documentation tool. Some of you might think that the database schema is self-documented, that all you need is a database console and you are ready to query the data. Well, not exactly. Here are some reasons why that’s not that simple:

  1. The database is missing FK constraints and table relations are unknown,
  2. Tables and columns have confusing names,
  3. There are hundreds or thousands of tables and it’s hard to find the data,
  4. There are a lot of unused tables and columns and there’s a risk of using obsolete data,
  5. It’s not clear what data tables and columns actually hold.

With up to date documentation developers, report creators, data analysts, and organizations as a whole can:

  1. Make better use of their data,
  2. Make it easier to replace and onboard new people,
  3. Create more reliable analytics and reporting,
  4. Save time on database discovery and learning,
  5. Maintain legacy databases.

Data has not much value if you don’t understand it or can’t find it.

Works for enterprises and small projects

What I like about the tool is that you can generate good looking documentation of your databases in a couple of minutes. It is fairly simple and small tool. And yet, with features like documentation repository, teamworking, advanced metadata capabilities, diagrams, etc. it is ready for some serious enterprise applications.

Cross database diagrams

A notable feature of the new release, something I have seen only in advanced modeling tools (which might be too heavy for documenting database schema, and definitely not user-friendly for describing data dictionaries and clunky exports) is the ability to document models that span many different databases, servers or even platforms (i.e. Oracle, SQL server, MySQL).

SQL SERVER - Document Your Databases with Data Dictionary and Diagrams dd2

You can define a link between any two tables, no matter to which database they belong, and mix those tables in the diagrams.

SQL SERVER - Document Your Databases with Data Dictionary and Diagrams dd3

This gives enables documenting complex environments.

Data Dictionary

This is one of a key features of the tool – easy way and publish a Data Dictionary (a definition and description of all the tables and columns). You can document not only tables, but many other database objects.

SQL SERVER - Document Your Databases with Data Dictionary and Diagrams dd4

Full documentation – database schema, descriptions and diagrams are exported to a nice HTML document.

SQL SERVER - Document Your Databases with Data Dictionary and Diagrams dd5

Keeping model up to date

One of the issues when managing documentation outside of the database is that when schema changes it is really hard to keep the documentation up to date and in sync with the database. If you’d like to do that in Excel it could be a nightmare.

SQL SERVER - Document Your Databases with Data Dictionary and Diagrams dd6

Dataedo handles this nicely. At first, you import schema to new “documentation” and then you can always automatically update the schema of your documentation from the live database. New elements are added to the data dictionary and removed are marked as deleted.

Extensions with custom fields

Another very interesting and powerful new feature of Dataedo 6 that makes a real difference is the ability to define multiple custom descriptive fields. You can set up a set of attributes you want to add to columns, tables and other database elements that you can easily access, edit and export. This is way more convenient than adding Extended Properties with SSMS in the SQL Server.

SQL SERVER - Document Your Databases with Data Dictionary and Diagrams dd7

Publish documentation online

Dataedo enables exporting documentation to printable PDF, Excel that you can use as a data source or HTML that you can publish online, in your intranet or simply save to the local or network disk. It is also possible to publish it on portals like SharePoint or Confluence.

I tried it on Confluence and it looks quite good.

SQL SERVER - Document Your Databases with Data Dictionary and Diagrams dd8

Keep documentation in repository and database

Dataedo 6 keeps all metadata in repository but also enables you to write them back to the database into extended properties (in case of SQL Server) or comments (in case of Oracle or MySQL). You have the best of two worlds:

  1. Advanced description capabilities, dependence on, no need for access to live database or alter its schema, the benefits of repositories and
  2. Documentation with your database and data, available for use by other tools.

SQL SERVER - Document Your Databases with Data Dictionary and Diagrams dd9

Open repository & interface

Dataedo repository is in fact a plain SQL Server database that you can query. The online documentation has a few useful scripts you can run against the repository to modify metadata. This gives abilities to automate documentation and integrate with other processes.

SQL SERVER - Document Your Databases with Data Dictionary and Diagrams dd10

Working in development environment (dev and prod environments)

Another advanced capability is the ability to set up repositories for different environments – development, UAT and production – and release changes so you can incorporate documentation in your development process.

SQL SERVER - Document Your Databases with Data Dictionary and Diagrams dd11

Process:

  1. Developers apply changes to dev database schema
  2. Scheduled Dataedo process imports schema changes from dev database to dev documentation
  3. Developers update documentation (describe new objects)
  4. Scheduled Dataedo process exports dev documentation and shares with the dev team
  5. Changes are being deployed to prod database (dev tools)
  6. Scheduled Dataedo process imports schema changes from prod database to prod documentation
  7. SQL script moves dev documentation to prod repository
  8. Scheduled Dataedo process exports prod documentation and shares with the organization

Automation

You can easily schedule tasks and create an automated process of documentation generation and publishing so that all the developers, DBAs, and other database users have access to the most recent documentation.

SQL SERVER - Document Your Databases with Data Dictionary and Diagrams dd12

The future

Looking at the website and talking to the team it seems that the tool is heavily developed and there’s a lot of other interesting features on the way (or at least explored). Including more database objects and engines being one of the things developed. I think it’s worth having an eye on this tool.

Conclusion

I already liked the tool in its previous version and the new release makes it even more useful and advanced. If you are not documenting your database schemas already, It’s a great opportunity to change that!

Download Dataedo

Reference: Pinal Dave (https://blog.sqlauthority.com)

First appeared on SQL SERVER – Document Your Databases with Data Dictionary and Diagrams


Viewing all articles
Browse latest Browse all 594

Trending Articles