Browse DevX
Sign up for e-mail newsletters from DevX


Manage Database Metadata with POI and Excel

Set up quick and easy database metadata housekeeping with the Java Apache POI libraries and Microsoft Excel.

atabases are everywhere. In IT, you can't build a substantial application without providing tables to store the data that the application will rely on (properties, configuration settings, etc.) and process. Maintaining a clear understanding of the role the columns play in your tables is essential, as maintenance needs and enhancements force tables to evolve.

Entity relationship diagrams (ERD), while central to such development efforts, don't go far enough when it comes to explaining the actual use of a particular column. Some ERD design tools do allow you to store metadata in them, but this forces anybody who wants to look up metadata definitions later to either use those specific tools. Moreover, descriptions stored in design tools, while adequate for those involved in the design process, may not meet the needs of developers performing maintenance or creating enhancements after the application goes live. Consequently, the usage and meanings of columns and tables typically get modified, lost, or obscured over time.

A simple metadata dictionary can help you monitor and maintain this essential information. Just use the Apache POI library API to query your database for its metadata and then store it in a clear and organized way in Microsoft Excel. This article describes how to implement this solution. (See Sidebar: What Does POI Stand For? for a humorous explanation of the technology.)

Thanks for your registration, follow us on our social networks to keep up-to-date