First, I'm new to Java DB programming so maybe my approach is wrong. So please keep that in mind. Now the question:
My program let's the user open an existing Java Derby database. When it's opened I want to check if the database contains the correct tables and each table has the correct columns - not just names but type also. So far I'm trying to create each table and if it throws an exception then I know the table exists. Now I need to check column types. What is the best practice to do this? Hard-code check for each column type as answered here in the catch block?