As system architects we have to foresee things that can change in the software specification over time. We have learned that a good system design is one that seperates the things that change from the things that do not. However in trying to foresee potential changes we often try to design for changes that may not happen. This leads to an over-engineered design which is more time consuming to implement and difficult to understand. Such a design becomes counter productive. While designing a software it is important to view the changes we anticipate along with their probablity of occurence. It is often a good idea not to design for a low probability change, if it significantly increases the design complexity.
This is a simple story of my need to inspect the schema of an HSQLDB database for a participar FOREIGN KEY, and the interesting things I had to do to actually inspect it. I am using an HSQLDB 1.8 database in one of my web applications. The application has been developed using the Play framework , which by default uses JPA and Hibernate . A few days back, I wanted to inspect the schema which Hibernate had created for one of my model objects. I started the HSQLDB database on my local machine, and then started the database manager with the following command java -cp ./hsqldb-1.8.0.7.jar org.hsqldb.util.DatabaseManagerSwing When I tried the view the schema of my table, it showed me the columns and column types on that table, but it did not show me columns were FOREIGN KEYs. Image 1: Table schema as shown by HSQLDB's database manager I decided to search on StackOverflow and find out how I could view the full schema of the table in question. I got a few hints, and they all pointed to ...
Comments