Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 BCNF and 4NF

Author  Topic 

Mohamed Faisal
Yak Posting Veteran

51 Posts

Posted - 2013-08-18 : 09:15:58
I am given the CounsellingCase table:
CounsellingCase(CaseNum, StartDate, EndDate, CaseDetail, StudentNumber, StudentName, StudentContact, CounsellorName, CounsellorContact, sessionDate, sessionStartTime, sessionDuration, sessionOutcome)

My functional and multi-valued dependencies are:

CaseNum-->StartDate,EndDate,CaseDetail,StudentNumber
StudentNumber-->StudentName,StudentContact
CounsellorName-->CounsellorContact
CaseNumr-->-->CounsellorName

My propose candidate key(s) for the table:
sessionDate,sessionStartTime and CounsellorName

how do I normalise the table to BCNF and 4NF by applying the BCNF approach?

Thanks

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2013-08-18 : 09:24:37
Something like this
Table dbo.Cases
CaseNum, StartDate, EndDate, CaseDetail, StudentNumber

Table dbo.Students
StudentNumber, StudentName, StudentContact

Table dbo.Counsellors
CounsellorName, CounsellorContact

Table dbo.Sessions
SessionStartTime,
SessionEndTime,
SessionDuration,
SessionOutcome,
CounsellorName,
CaseNum



Microsoft SQL Server MVP, MCT, MCSE, MCSA, MCP, MCITP, MCTS, MCDBA
Go to Top of Page

Mohamed Faisal
Yak Posting Veteran

51 Posts

Posted - 2013-08-18 : 09:37:29
Hi SwePeso,

Do i have to indicate the PK and FK. cause there is two tale depend on caseNum.

Thanks
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2013-08-18 : 13:48:15
Table dbo.Cases
CaseNum (pk), StartDate, EndDate, CaseDetail, StudentNumber (fk)

Table dbo.Students
StudentNumber (pk), StudentName, StudentContact

Table dbo.Counsellors
CounsellorName (pk), CounsellorContact

Table dbo.Sessions
SessionStartTime,
SessionEndTime,
SessionDuration,
SessionOutcome,
CounsellorName (fk),
CaseNum (fk)



Microsoft SQL Server MVP, MCT, MCSE, MCSA, MCP, MCITP, MCTS, MCDBA
Go to Top of Page
   

- Advertisement -