Skip to main content
Any Framework

Generate metadata from SQL Server databases for use with docfx to generate reference documentation.

Published
Jan 1, 2025
1y ago
Total Downloads
868
868

Install

dotnet add package docdb.console --version 0.9.0-g52635d6cc9

No framework information available.

README

DocDB

Generate metadata from SQL Server databases for use with DocFX to generate reference documentation.

NuGet Status MIT License

You can use this tool to generate meta data files (.yml files) for a given SQL Server database. Then use docfx to generate reference documentation like you would do for other languages (e.g. C#).

Warning: Albeit usable, this tool is not complete. Still lacking are unit tests and code coverage and integration style tests. YMMV.

Features

DocDB can document the following SQL Server objects:

  • Tables (including indexes, checks, keys, triggers)
  • Stored Procedures
  • Functions (scalar, table valued, aggregates)
  • Types (data types, table types, CLR types)
  • Assemblies (incl. decompilied C# code)
  • DDL Triggers
  • XML Schema collections
  • Parition information (functions, schemes)
  • Sequences
  • Rules
  • Defaults
  • Roles (database and application roles)
  • Users
  • Synonyms
  • Schemas
  • Database itself (files, filegroups, settings, etc.)

All documents and objects are cross references (for example, foreign keys to target table). For every applicable object, the relevant SQL CREATE script is included.

Additionally, a table of contents is generated that structures the objects as they are in the Object Explorer of SSMS.

Getting Started

  1. Install docfx as a global tool:
dotnet tool install -g docfx
  1. Install DocDB as a global tool:
dotnet tool install -g docdb.console

TODO: Document rest of procedure (or see AdventureWorks2022 sample).

Examples

The following pictures are based on the AdventureWorks Sample Database. To generate those yourself see AdventureWorks2022 sample.

Database Overview

Table Details

Views Overview

Stored Procedure Details

Adoption Assessment

Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.

This version is marked prerelease. Validate its API and upgrade path before production use.No target framework metadata is available. Confirm compatibility in a representative project before standardising on this package.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.