Schemacrawler logo

SchemaCrawler

Free database schema discovery and comprehension tool

Code Examples Using the SchemaCrawler API

Overview

The SchemaCrawler API is a much simpler alternative to using JDBC metadata. The API example demonstrates the use of the SchemaCrawler API to create a data source, and obtain database metadata.

Example Code

How to Experiment

  1. Try uncommenting the code block in com.example.ApiExample.java that modifies the default options.
  2. Read the SchemaCrawler javadoc, and edit com.example.ApiExample.java to print more details.
  3. Make changes to com.example.ExecutableExample.java to produce different types of output.

Additional Resources

Also see schemacrawler/SchemaCrawler-Plugins-Starter for code on how to add new SchemaCrawler commands, extend SchemaCrawler lint rules, or create a new database plugin.