0% found this document useful (0 votes)
50 views4 pages

Dental Exam Normalization Case Study

Normalisation
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
50 views4 pages

Dental Exam Normalization Case Study

Normalisation
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Week 7: Practice Questions Normalisation

Part A: Case Study Activity 1 (Normalisation)

Complete the following case study for the DentalExam Relation. The conceptual level design
for this relation has already been completed. Your job is to normalise this relation (It seems to
still have some problems).

Case Study Overview


This entity records the dental tests requested by the patient’s dentist at each appointment. If
no test is requested by the dentist, no record will be created. The completeFlag will only be
set to ‘Y’ when the requested exam result has been returned.

This database is not an appointment booking system.

Business Rules
 A patient is only allowed to visit their own Dentist.
 A patient may have more than one exam requested at any appointment.
 A patient can visit their dentist for examinations at different Clinics.
 Patients are only included in this database when they are required to undergo a dental
examination.

Questions
1. The data provided in the DentalExam table below is in 0NF. Copy the table and make
corrections till it is in 1NF. List each change you have made.

 Enter all known values: -


o By filling in data instead of using dittos or “ ” and
o Fill any unknown values with the null word.
 Ensure the intersection of every row and column contains only one value (known as
atomic) by correcting multivalued attributes.
 Check the table is in a rectangular format.

Page 1 of 4
DentalExam Table
Patient Appointment Exam Patient Patient Dentist Dentist Clinic Complete
Num Date Name DOB Num Name Clinic Name Address Flag
0127 03/09/2023 Dental, Sandra 13/05/178 001 Carl Smile George St Y
Periodontal Ho Bright
“” 20/12/2023 Panoramic “” “” “” “” Tooth Fairy Thomas St Y
“” 10/10/2023 Tooth decay, “” “” “” “” Pearly Beacon Ave
Bitewing White
0823 03/09/2023 Orthodontal, Jeff 07/08/67 002 Sonia Smile George St
Periapical Cyst Daniels Bright
“” 03/10/2023 Bitewing “” “” “” “” Tooth Fairy Thomas St Y
0146 04/10/2023 Periodontal, David 16/06/79 003 Brad Tooth Fairy Thomas St Y
Recall Falkner
0239 05/06/2023 Cleaning Will 23/03/98 004 Carl Tooth Fairy Thomas St
Bosworth
0749 09/11/2023 X-Rays Lynn 17/07/03 005 Brad Pearly Beacon Ave Y
Fields White
Primary Key = PatientNum,AppointmentDate,Exam

Paste the corrected table below.

2. Write out the relational model for the single relation DentalExam using the following
format. (You should only have one table as no normalisation has been completed as yet).

RelationName (Identifier, non-key attributes)

3. Identify and list the functional dependencies (FDs) for the given data. Please use the
following format for your functional dependencies:

X®Y or DeterminantAttribute(s) ® DependentAttribute(s)

4. Transform the data from 1NF to 2NF for the DentalExam relation. Ensure you use the FD
identified to assist you in the normalisation process. Explain your result and write them in
the following format.

Ensure the primary keys are underlined and foreign keys are marked with asterisk(s):
RelationName (Identifier, non-key attributes) or
RelationName (Identifier, non-key attributes, ForeignKey*)

(Remove partial dependencies – attributes that only depend on part of the key.)

Page 2 of 4
5. Transform the data from 2NF to 3NF for the DentalExam relation. Ensure you use the FD
identified to assist you in the normalisation process. Explain your result and write them in
the following format.

Ensure the primary keys are underlined and foreign keys are marked with asterisk(s):
RelationName (Identifier, non-key attributes) or
RelationName (Identifier, non-key attributes, ForeignKey*)
(Remove transitive dependencies – attributes that are dependent on another attribute.)

6. Transform the data from 3NF to BCNF for the DentalExam relation. Ensure you use the FD
identified to assist you in the normalisation process. Explain your result and write them in
the following format.

Ensure the primary keys are underlined and foreign keys are marked with asterisk(s):
RelationName (Identifier, non-key attributes) or
RelationName (Identifier, non-key attributes, ForeignKey*)

(Remove boyce codd dependencies – e.g. For any functional dependency (A->B), A should be either the
super key or the candidate key. In simple words, it means that A can't be a non-prime attribute if B is given
as a prime attribute.)

7. Some patients have been seeing their dentist more than once per day. The Dental Clinic
has decided to add a unique code for each appointment for one dentist. Shown in bold
below.
DentalExam (PatientNum, AppointmentDate, Exam, ClinicNum*, CompleteFlag,
AppointmentNum)

Is this now a correctly normalised relation? If it is not, please correct the relation and
explain what you have done to correct it.

8. Write out the final normalised relational model for the DentalExam relations.
Please use the following format for your final set of relations, where the primary keys are
underlined and the foreign keys are marked with asterisk(s):

RelationName (Identifier, non-key attributes) or


RelationName (Identifier, non-key attributes, ForeignKey*)
Add surrogate keys where necessary by explaining their need in the relational model.
Page 3 of 4
Part B: Normalisation Activity 2
Refer to the poorly designed ERD below and identify the errors that need to be corrected at
each normal form by completing the table that follows:

Bad Design - ERD

Complete the following table.


Error(s) Correction Normal Form
A. Homonym
B. Synonym
C. Composite
attribute(s)
D. Partial
dependency
E. Transitive
dependency(s)
F. Any other
error(s):

1. Save your word document as per YourName_ID_Performance Test 4.

Page 4 of 4

Common questions

Powered by AI

Challenges in maintaining data integrity and minimizing redundancy include handling complex dependencies, temporal data precision, and ensuring every table adheres to higher normal forms like BCNF. Solutions may involve implementing surrogate keys for stable identifiers, rigorous application of normalization steps to remove transitive dependencies, and diligent functional dependency analysis to ensure each attribute's dependency is well-defined. Moreover, incorporating clear naming conventions and constraints can prevent data anomalies and ensure consistent integration and retrieval operations .

Transforming from 1NF to 2NF involves removing partial dependencies, where non-key attributes depend only on a part of a composite key, rather than the whole key. In the DentalExam table, since PatientNum and AppointmentDate together determine the examinations, partial dependencies such as DentistName which depends only on DentistNum, and Clinic details on ClinicNum, are removed by splitting these dependencies into separate tables, ensuring that each non-key attribute is fully functionally dependent on the primary key .

Surrogate keys are introduced to simplify key management and enhance performance. They are unique identifiers that are not semantically significant but provide a stable and consistent identifier for each record. In the DentalExam relational model, using surrogate keys such as unique AppointmentID or ExamID can reduce complex composite keys involving PatientNum, AppointmentDate, and Exam, thus easing indexing and maintenance while ensuring entity integrity .

To achieve Boyce-Codd Normal Form (BCNF), you must ensure that every determinant in the table is a candidate key. This form resolves any cases where a non-candidate key attribute (like ClinicName via ClinicNum) might imply each other. By ensuring every attribute derives directly from a full candidate key, BCNF prevents anomalies in the dependency structure that can occur even in 3NF. For DentalExam, this involves ensuring no redundancy and all dependencies are based on candidate key relations .

In an ERD, homonyms occur when one attribute name refers to different entities, leading to ambiguity, whereas synonyms mean different attribute names are used for the same data across entities. These errors complicate normalization because they obscure true dependencies and can cause inconsistent data interpretations. Correction involves standardizing the attribute names or using domains and naming conventions to clearly distinguish entity roles and ensure clear, consistent database schema documentation, thus aiding the normalization process .

Partial dependencies exist where an attribute is dependent on only a part of a composite key, such as ClinicName depending on ClinicNum but not on the full PatientNum key. Transitive dependencies occur when one attribute depends on another non-prime attribute, like ClinicAddress depending on ClinicName through ClinicNum. Non-trivial dependencies are those where adding attributes would change the dependency. These dependencies complicate normalization as they necessitate re-structuring data to ensure each attribute directly depends on an entire key, avoiding redundancy and update anomalies .

To transform a relation from 0NF to 1NF, you must ensure that each cell in a table contains atomic values and eliminate any repeating groups or multivalued attributes. For the DentalExam table, this involved entering all known values by replacing dittos and unidentified values with 'null', and ensuring that each cell intersection contains only one value. Specifically, the multivalued 'Exam' entries like "Dental, Periodontal" were split into separate rows, ensuring atomicity .

The addition of AppointmentNum aims to uniquely identify each visit even if multiple occur on the same day, resolving temporal uniqueness issues. However, this alone does not address all normalization issues because AppointmentNum must be incorporated sensibly into the overarching schema to avoid new partial or transitive dependencies. Correction might involve ensuring that dependencies solely relate to one unique identifier such as the AppointmentNum without unspecified overlap in other attributes .

Functional dependency in a database occurs when one attribute uniquely determines another attribute. In the context of the DentalExam table, functional dependencies include: PatientNum, AppointmentDate, Exam -> ClinicNum, CompleteFlag; DentistNum -> DentistName; ClinicNum -> ClinicName, ClinicAddress . These dependencies indicate which attributes depend on others and help guide the normalization process to higher normal forms.

In moving from 2NF to 3NF, transitive dependencies, where non-key attributes depend on other non-key attributes rather than directly on primary keys, must be eliminated. For the DentalExam, details like ClinicName and ClinicAddress depend transitively through ClinicNum, so these were split into separate tables where ClinicNum becomes a primary key in these new tables. By doing this, each attribute in non-key positions depends directly on the primary key, thus satisfying 3NF .

You might also like