Giter VIP home page Giter VIP logo

doc-sql-database's Introduction

doc-sql-database

Create an interactive HTML webpage after running a SQL Query to create a XML representation of the schema.

Why was this built?

I needed a way to understand SQL Server Schemas for databases that I didn't have direct access to either due to its size or the location. The SQL Script is relatively simple to run and it can be transported as a simple text file for me to then generate the schema report.

Getting Started

  • Get a copy of the SQL script generate-table-xml.sql
  • Open SQL Server Management Studio to run the SQL script in the Query Window.
  • Change the database
  • Run the script and copy / paste the output into a text file called database.xml
  • Using the Batch file in the src run the script pointing to the database.xml and the output directory (see generate-Adventureworks.cmd for an example).

Example Output

AdventureWorks database

Relationship diagram

Prerequisites

This project has been built on Windows and includes the nxslt.exe and libxml binaries for html document creation

Running the tests

Project has been created on SQL Server 2008 R2.
Other SQL versions may have slightly different formats.

Deployment

The purpose of this project is to allow a simple SQL script to be run on a SQL server database to extract the schema into an XML document. The xml document is then converted to a HTML web page showing the table structure and relationships.

Built With

Authors

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments

doc-sql-database's People

Contributors

joeplant avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

doc-sql-database's Issues

SQL Script has some problems with Collation

Msg 451, Level 16, State 1, Line 5
Cannot resolve collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "Latin1_General_CI_AS" in UNION ALL operator occurring in SELECT statement column 1.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.