DBMS:Normalisation Answers

First Normal Form exercise
TIMESHEET ( EmpId ,EmpName,EmpEmail,WeekNum1,HrsWorked1, WeekNum2, HrsWorked2, WeekNum3, HrsWorked3)

becomes and ..
 * EMPLOYEE ( EmpId ,EmpName,EmpEmail)
 * If there can only be one timesheet per employee per week
 * TIMESHEET ( EmpId*, WeekNum ,HrsWorked)


 * If there can be many timesheets per employee per week
 * TIMESHEET ( TsID ,EmpId*,WeekNum,HrsWorked)

Combined exercise

 * STUDENTRESULT( StuId ,Name, Address,Program ID, Program Name, Program Duration Course1,Result1,CourseName1,Course2,Result2,CourseName2,Course3,Result3,CourseName3)


 * First Normal Form
 * STUDENT( StuId ,Name, Address,Program ID, Program Name, Program Duration )
 * COURSERESULT( StuId*, Course ,Result,CourseName)
 * Second Normal Form (look only at Course file as combined key)
 * COURSE( StuId*, Course ,Result,CourseName)
 * becomes
 * COURSE( Course ,CourseName)
 * COURSERESULT( StuId*, Course* ,Result,CourseName)
 * Third Normal Form (look inside... at STUDENT Table)
 * STUDENT( StuId ,Name, Address,Program ID, Program Name, Program Duration )
 * becomes
 * PROGRAM( Program ID, Program Name, Program Duration )
 * STUDENT( StuId ,Name, Address,Program ID* )
 * Note that the Program table must be created before the Student table.