Databases Archive

Java & HSQLDB : Connecting to a DBMS (HSQLDB) from Java Program

1) Create a simple file and call it Here is a simple code written in Java to connect to a DBMS : import*; import java.sql.*; import java.util.*; public class Simple { public static void main(String args) { Connection con=null;; try { Class.forName("org.hsqldb.jdbc.JDBCDriver"); con=DriverManager.getConnection("jdbc:hsqldb:mydbb","SA",""); con.createStatement().executeUpdate("SET DATABASE SQL SYNTAX MYS TRUE"); con.createStatement().executeUpdate("create ...Read More

Join : SELECT Tutorial using multiple database tables

The JOIN is used in an SQL statement to query data from two or more tables, based on a relationship between certain columns in these tables. Tables in a database are often related to each other with keys. 1) Let’s suppose we have two database tables for : contacts and countries CREATE ...Read More

SQL SELECT Tutorial : Searching & Querying the database

The most commonly used SQL command is SELECT statement. The SQL SELECT statement is used to query or retrieve data from a table in the database. A query may retrieve information from specified columns or from all of the columns in the table. To create a simple SQL SELECT Statement, you must ...Read More

SQL Hello World: A simple guide to database systems using HSQLDB

In this tutorial, we will learn how to create a simple database and play with its content. The example we will consider is a simple phone book to store names, last names and phone numbers for people. 1) We need to download the DBMS  ( HSQLDB ): [a software that eases and ...Read More