IBM DB2 User Guide
1 Connect to the server
1.1 Click start > IBM DB2 > General Administration > Control Center.
1.2 Click Advanced and then Click OK.
1.3 Right click on All Systems and click Add.
1.4 Type “ssi7” in the System name text field and click Discover. Next click OK.
1.5 Right click Instances under SSI7 and click add.
1.6 In this example we use Summer for the Instance name, but check with your local administrator to find out your Instance name.
1.7 Click on the Remote Instance Name and click OK.
1.8 Type SUMMER in the Instance node name text field. Click Apply. Click Cancel.
1.9 Right click Databases > Add.
1.10 Click Discover.
1.11 Click SUMMER under Database Alias and click OK.
1.12 Click OK.
1.13 Next click on SUMMER or Tables and login using your provided User ID and Password and click OK.
1.14 You are now connected to the Database and you can begin building your database.
2 Building the Library System Tables
2.1 Right click Tables and click Create.
2.2 Select the drop down box for Table schema.
2.3 Type “Book” in the Table name text field. Click Next.
2.4 In the Column name text field type “title.”
2.5 Select VARCHAR in the drop down menu next to Data type.
2.6 In the Length text field replace 10 with 25.
2.7 Click OK.
2.8 Now add the following columns to the table:
Author: VARCHAR(25) ISBN: INTEGER Book_ID: INTEGER set as Primary Key(PK) Genre: VARCHAR(15) Status: VARCHAR(1) Alert: VARCHAR(1) Due date: DATE Library ID: INTEGER
2.9 Click Next.
2.10 Click Next.
2.11 Click Add Primary.
2.12 Select BOOK_ID and click the “>” to make BOOK_ID a Primary Key.
2.13 Select LIBRARY_ID and click the “>” to make LIBRARY_ID a Primary Key.
2.14 Click OK and Next.
2.15 Click Next.
2.16 Click Next.
2.17 Click Finish.
2.18 Repeat steps 2.1-2.17 and create the Account table with the following columns and key:
Username: VARCHAR(10) First_Name: VARCHAR(10) Last_Name: VARCHAR(15) Email: VARCHAR(25) Library_ID: INTEGER (PRIMARY KEY) Password: VARCHAR(20) Position: VARCHAR(1)
2.19 The tables for the Library System are now created.
Book Table:
Account Table: