- HSQLDB - Indexes
- HSQLDB - Alter Command
- HSQLDB - Transactions
- HSQLDB - Regular Expressions
- HSQLDB - Null Values
- HSQLDB - Joins
- HSQLDB - Sorting Results
- HSQLDB - Like Clause
- HSQLDB - Delete Clause
- HSQLDB - Update Query
- HSQLDB - Where Clause
- HSQLDB - Select Query
- HSQLDB - Insert Query
- HSQLDB - Drop Table
- HSQLDB - Create Table
- HSQLDB - Data Types
- HSQLDB - Connect
- HSQLDB - Installation
- HSQLDB - Introduction
- HSQLDB - Home
HSQLDB Useful Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
HSQLDB - Installation
HSQLDB is a relational database management system implemented in pure Java. You can easily embed this database to your apppcation using JDBC. Or you can use the operations separately.
Prerequisites
Follow the prerequisite software installations for HSQLDB.
Verify Java Installation
Since HSQLDB is a relational database management system implemented in pure Java, you must install JDK (Java Development Kit) software before instalpng HSQLDB. If you already have JDK installation in your system, then try the following command to verify the Java version.
java –version
If JDK is successfully installed in your system, you will get the following output.
java version "1.8.0_91" Java(TM) SE Runtime Environment (build 1.8.0_91-b14) Java HotSpot(TM) 64-Bit Server VM (build 25.91-b14, mixed mode)
If you don’t have JDK installed in your system, then visit the following pnk to
HSQLDB Installation
Following are the steps to install HSQLDB.
Step 1 − Download HSQLDB bundle
Download the latest version of HSQLDB database from the following pnk
Once you cpck the pnk, you will get the following screenshot.Cpck HSQLDB and the download will start immediately. Finally, you will get the zip file named hsqldb-2.3.4.zip.
Step 2 − Extract the HSQLDB zip file
Extract the zip file and place it into the C: directory. After extraction, you will get a file structure as shown in the following screenshot.
Step 3 − Create a default database
There is no default database for HSQLDB, therefore, you need to create a database for HSQLDB. Let us create a properties file named server.properties which defines a new database named demodb. Take a look at the following database server properties.
server.database.0 = file:hsqldb/demodb server.dbname.0 = testdb
Place this server.properties file into HSQLDB home directory that is C:hsqldb- 2.3.4hsqldb.
Now execute the following command on command prompt.
>cd C:hsqldb-2.3.4hsqldb hsqldb>java -classpath pb/hsqldb.jar org.hsqldb.server.Server
After execution of the above command, you will receive the server status as shown in the following screenshot.
Later, you will get to find the following folder structure of the hsqldb directory in the HSQLDB home directory that is C:hsqldb-2.3.4hsqldb. Those files are temp file, lck file, log file, properties file, and script file of demodb database created by HSQLDB database server.
Step 4 − Start the database server
Once you are done creating a database, you have to start the database by using the following command.
>cd C:hsqldb-2.3.4hsqldb hsqldb>java -classpath pb/hsqldb.jar org.hsqldb.server.Server --database.0 file:hsqldb/demodb --dbname.0 testdb
After execution of the above command, you get the following status.
Now, you can open the database home screen that is runManagerSwing.bat from C:hsqldb-2.3.4hsqldbin location. This bat file will open the GUI file for HSQLDB database. Before that it will ask you for database settings through a dialog box. Take a look at the following screenshot. In this dialog box, enter the Setting Name, URL as shown above and cpck Ok.
You will get the GUI screen of HSQLDB database as shown in the following screenshot.
Advertisements