Skip to content

Trivadis/plsql-and-sql-coding-guidelines

Repository files navigation

Trivadis PL/SQL & SQL Coding Guidelines

Introduction

Trivadis published their guidelines for PL/SQL & SQL in 2009 in the context of the DOAG conference in Nuremberg. Since then these guidelines have been continuously extended and improved. Now they are managed as a set of markdown files. This makes the guidelines more adaptable for individual application needs and simplifies the continous improvement.

HTML format

HTML is the primary output format. Material for MkDocs is used to generate static HTML files and Mike to publish version specific variants. The following sites are available:

PDF format

PDF is the secondary output format. wkhtmltopdf is used to produce it.

Starting with version 3.5 you may access the PDF document from the appendix in the HTML site.

The PDF version is also accessible per version from Releases.

Releases

You find all releases and release information here.

SonarCloud

The SQL code blocks in the Markdown files of this repository are automatically checked with db* CODECOP. The result is stored in SonarCloud. The idea is to follow our own guidelines, at least in the good examples.

How to Build the HTML Site

  1. Install Docker in your environment
  2. Fork this respository
  3. For Windows users only
    • Install Git for Windows, it provides Git command line tools, a GUI and a Bash emulator
  4. Check/change the version in mkdocs.yml
  5. Open a terminal window in the tools folder
    • Build/update the table in appendix B run ./genappendix.sh.
    • Build/update the PDF file run ./genpdf.sh.
    • Test the HTML site locally run ./serve.sh and open http://localhost:8000
    • Deploy HTML site run ./mike.sh deploy main.
    • Set default version (HTML redirect) run ./mike.sh set-default main.
  6. commit changes and push all branches.

Related Resources

License

The Trivadis PL/SQL & SQL Coding Guidelines are licensed under the Apache License, Version 2.0. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.