Access-Control Database Manager

Access-Control Database Manager

A Java/JDBC and SQL Server desktop utility that used runtime table, column and primary-key metadata to manage access-control data.

I developed this application during the 2014 RFID/access-control work to manage card, user and authorization data. Its most interesting technical aspect was not ordinary CRUD behavior, but the use of database metadata to make the Java desktop tool less dependent on one hard-coded table structure.

Data Model and JDBC

The data was stored in SQL Server. The Java application connected through JDBC, listed tables and records, and supported editing selected data.

Using DatabaseMetaData and ResultSetMetaData, the application discovered at runtime:

  • table names,
  • column names,
  • data types,
  • primary-key information.

That metadata was then used to drive parts of the interface and editing behavior.

Why Metadata?

Hard-coding table and column assumptions is easy initially, but schema changes then require the same assumptions to be updated in multiple places. Reading metadata reduced that coupling and made the tool more general.

This was not a full ORM in the modern sense. It was, however, an early example of runtime schema discovery and metadata-driven application behavior that later influenced my reflection and data-access work.

Access-Control Context

The database utility belonged to the larger access-control problem. A UID obtained from physical hardware ultimately had to be associated with the correct card/user record.

Related work:

QR code for this page