Page 139 - DCAP402_DCAO204_DATABASE MANAGEMENT SYSTEM_MANAGING DATABASE
P. 139
Database Management Systems/Managing Database
Notes Table before First Normal Form Reports Table
Cust_ Name Address Acc_ Acc_ Min_ Tran_ Tran_ Tan_ Amount Balance
id id type bal id type mode
001 Ravi Hyd 994 SB 1000 14300 B/F 1000 1000
001 Ravi Hyd 994 SB 1000 14301 Deposit Bycash 1000 2000
001 Ravi Hyd 994 SB 1000 14302 Withdrawal ATM 500 1500
110 Tim Sec'bad 340 CA 500 14303 B/F 3500 3500
110 Tim Sec 'bad 340 CA 500 14304 Deposit Payroll 3500 7000
110 Tim Sec'bad 340 CA 500 14305 Withdrawal ATM 1000 6000
420 Kavi Vizag 699 SB 1000 14306 B/F 6000 6000
420 Kavi Vizag 699 SB 1000 14307 Credit Bycash 2000 8000
420 Kavi Vizag 699 SB 1000 14308 Withdrawal ATM 6500 1500
Tables after First Normal Form
Customer Table
Cust_id Name Address
001 Ravi Hyd
110 Tim Sec'bad
420 Kavi Vizag
Customer_Tran Table
Tran_id Cust_id Acc_id Acc_type Min_bal Tran_type Tan_mode Amount Balance
14300 001 994 SB 1000 B/F 1000 1000
14301 001 994 SB 1000 Deposit Bycash 1000 2000
14302 001 994 SB 1000 Withdrawal ATM 500 1500
14303 110 340 CA 500 B/F 3500 3500
14304 110 340 CA 500 Deposit Payroll 3500 7000
14305 110 340 CA 500 Withdrawal ATM 1000 6000
14306 420 699 SB 1000 B/F 6000 6000
14307 420 699 SB 1000 Credit Bycash 2000 8000
14308 420 699 SB 1000 Withdrawal ATM 6500 1500
Since Cust_id, Name and Address form a repeating group and hence the Reports table is
decomposed into Customer and Customer_Tran tables. (The primary key columns of each table
are indicated in bold in figures).
The requirements for a table to be INF is exactly what relational database theory specifies as
essential. That is, a table in a relational database must always be in INF.
8.3 Second Normal Form
A table in the first normal form may show redundancies due to partial dependencies. The
Second Normal Form resolves partial dependencies.
The Second Normal Form states that
1. The table should be in 1st Normal form
2. Every non-key column must be fully functional dependent on the Primary key
132 LOVELY PROFESSIONAL UNIVERSITY