BoyceCodd Normal Form BCNF - PowerPoint PPT Presentation

1 / 15
About This Presentation
Title:

BoyceCodd Normal Form BCNF

Description:

Boyce-Codd Normal Form (BCNF) 2. Definition. A relation is in BCNF, if and only if. ... Boyce-Codd Normal Form (BCNF) 3. BCNF is a stronger form of 3NF. Higher ... – PowerPoint PPT presentation

Number of Views:106
Avg rating:3.0/5.0
Slides: 16
Provided by: a20
Category:
Tags: bcnf | boycecodd | boyce | form | normal

less

Transcript and Presenter's Notes

Title: BoyceCodd Normal Form BCNF


1
Boyce-Codd Normal Form(BCNF)
2
Definition
  • A relation is in BCNF, if and only if. every
    determinant is a candidate key
  • For 3NF, it allows A ? B
  • B is a primary key attribute and A is not a
    candidate key
  • For BCNF, it insists A ? B
  • B is a primary key attribute and A must be a
    candidate key

3
BCNF is a stronger form of 3NF
4
BCNF
  • Violation of BCNF is quite rare
  • The potential to violate BCNF
  • contains two (or more) composite candidate keys
  • the candidate keys overlap, that is at least one
    attribute in common

5
Example
  • Client interviews by members of staff
    (ClientInterview relation)

6
Assumptions in the case
  • Members of staff involved in interviewing clients
    are allocated to a specific room on the day of
    interview
  • A room may be allocated to several members of
    staff as required throughout a working day

7
Assumptions in the case
  • A client is only interviewed once on a given
    date, but may be requested to attend further
    interviews at later dates

8
FDs found in ClientInterview
  • fd1 (primary key)
  • clientNo, interviewDate ? interviewTime,
    staffNo, roomNo
  • fd2 (candidate key)
  • staffNo, interviewDate, interviewTime ? clientNo
  • fd3 (candidate key)
  • roomNo, interviewDate, interviewTime ? staffNo,
    clientNo
  • fd4
  • staffNo, interviewDate ? roomNo

9
ClientInterview is already in 3NF
  • However ClientInterview is not in BCNF, because
    in fd4
  • roomNo is a primary-key attribute
  • staffNo, interviewDate is not a candidate key

10
Update anomalies found
  • To change the room number for staff number SG5 on
    the 13-May-02
  • we must update two tuples because of redundancy

11
Transform to BCNF
  • We create two new relations
  • Interview (clientNo, interviewDate,
    interviewTime, staffNo)
  • StaffRoom (staffNo, interviewDate, roomNo)
  • However, we lost fd3
  • roomNo, interviewDate, interviewTime ? staffNo,
    clientNo

12
The relations in BCNF
Interview
StaffRoom
13
Desirable to get BCNF ?
  • Whether it is better to stop the normalization at
    3NF or progress to BCNF
  • depends on the amount of redundancy resulting
    from the presence of fd4 and the significance of
    the loss in fd3

14
Suggestions
  • Stay in 3NF if
  • members of staff conduct only one interview per
    day
  • Transform to BCNF if
  • members of staff conduct numerous interviews per
    day
  • lost of fd3 is not significant

15
END
Write a Comment
User Comments (0)
About PowerShow.com