Skip to main content

Posts

Showing posts with the label database

HSQLDB - Handling Database Programatically (In-Process and Server Mode at a time )

HSQLDB database it a very small database that can be controlled from you application. you can start and stop the database by writing the programming statement. This feature enable to use this database in your application with programmatic control. You can handle the database by writing some java codes. When you use the database with In-Process mode, you will not able to access it other ways. In the In-Process mode, database become the part of your application and it does not run as server on other port number. So using the database In-Process mode is good when you are going to deploy the webapplication on the live server but at the time of development you have to avoid it. At the time of development, you need to look into database table so queckly to see the changes after executing any functionalityies. So you require the way to access the same dtabase from datbase client. But, if the database is running in the in-process mode, it doesn't open any port to access via...

In Process Mode of HSQLDB in web application.

If you want to use the database into your web application, you can use the HSQLDB in In_Process mode. In this mode, you can embed the HSQLDB into your web application and it runs as a part of your web application programm in the same JVM. In this mode, the database does not open any port to connect to the application on the hosing machine and you don't need to configure anything to access it. Database is not expposed to other application and can not be accessed from any dabase tools like dbVisualizer etc. In this mode ,database will be unknown from any other person except you. But in the 1.8.0 version, you can use Server intance for external as well as in process access.  To close the databse, you can issue SHUTDOWN command as an SQL query.   In the in-process mode, database starts from JDBC with the associated databse file provided through  connection URL. for example   DriverManager.getConnection("jdbc:hsqldb:mydatabase","SA","");   Here myd...