title: How to check if a database exists in Hsqldb/Derby?
body: <p>I am looking for information how to check if a database exists -- from Java code -- in hsqldb and in Apache derby. In Mysql it is quite easy, because I can query a system table -- <code>INFORMATION_SCHEMA.SCHEMATA</code> -- but these two databases seem not to have such a table. </p>
  
  <p>What is an alternative to mysql query:</p>
  
  <pre><code> SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME = &lt;DATABASE NAME&gt;
  </code></pre>
  
  <p>to find if a database exists in hsqldb and apache derby?</p>