Home

 

Connecting to the ITSOBANK database

We provide two implementations of the ITSOBANK database, Derby and DB2. Follow the instructions in Setting up the ITSOBANK database to set up the database.

The ITSOBANK database has four tables: CUSTOMER, ACCOUNT, ACCOUNT_CUSTOMER, and TRANSACT. Note that the name TRANSACTION is reserved in the Derby database, therefore we used TRANSACT.

An account can have multiple transactions and the ACCOUNT_ID becomes the foreign key in the TRANSACT table and is related to the primary key of the ACCOUNT table.

There is a many-to-many association between customers and accounts. ACCOUNT_CUSTOMER is the junction table to turn this many-to-many relationship into a one-to-many relationship between CUSTOMER and ACCOUNT_CUSTOMER and a one-to-many relationship between ACCOUNT and ACCOUNT_CUSTOMER.

ibm.com/redbooks