JDBC Metadata



JDBC metadata is a set of Java beans that make it easy to work with your database's schema. You'll find classes for connections, tables, columns, and more.

Use-cases include:

  1. Generating code based on your tables.
  2. Analyzing or reporting on your schema.
  3. Mapping between or comparing two database.

Show The Columns And Tables Of A Schema

The standard JDBC API already provides access to the metadata behind your database, however, treating everything as a resultset isn't always the easiest to use.

This example shows how to use DataPipeline Foundations' JDBC APIs to load metadata from a database and print out the tables and their relationships.

Example: ShowTheColumnsAndTablesOfASchema.java

Generate Java Beans From Database

One way to save on development time is to generate code based on your database schema or other model. There are already generative tools for specific purposes like creating your JPA entities and repos . However, if your needs deviate from what those tools provide, you'll need to create something custom.

This example shows how to generate simple Java Beans from your database schema. It can be extended based on your specific needs.

Example: GenerateJavaBeansFromADatabase.java

Mobile Analytics