• Tidak ada hasil yang ditemukan

PDF Name of the Faculty : M.Ellakkiya - Bharathidasan University

N/A
N/A
Protected

Academic year: 2025

Membagikan "PDF Name of the Faculty : M.Ellakkiya - Bharathidasan University"

Copied!
14
0
0

Teks penuh

(1)
(2)

Name of the Faculty : M.Ellakkiya

Designation : Assistant Professor

Department : Computer Applications

Programme :BCA

Batch : 2016-2017 Onwards Semester : IV

Course : DataBaseSystems Course Code :16SCCCA4

Unit : V

Topics Covered : Normal forms.

Contact No :9994683100

(3)

Database Normalization

Normalization:

is the process of evaluating & correcting the structures of the tables in a database

The goal:

to minimize or remove data redundancy To optimalize the data structure

Accomplished by thoroughly investigating the

various data type and their relationships with one another.

Data redundancy:

The repeat of key fields usages in other tables

(4)

3

Database Normalization

Functional dependencies:

Require that the value for a certain set of attributes determines uniquely the value for another set of attributes

are akin to a generalization of the notion of a key Let R be a relation and

α ⊆ R and β ⊆ R

The functional dependency :

α → β

holds on R and only if dor any tuples t1 & t2 that agree on the attributes α, they also agree on the attributes β.

That is, t1[α] = t2[α] → t1[β] = t2[β]

(5)

3

Database Normalization

Functional dependencies

Example: consider student(Sid, Sname, DeptId) instance of student.

(6)

3

Database Normalization

Functional dependencies

Example: consider student(Sid, Sname, DeptId) instance of student.

(7)

Database Normalization

examine the following poor database design:

Problems:

No need to repeatedly store the class time & Professor ID Which one is the key?

(8)

Database Normalization

First Normal Form (1NF):

A row of data cannot contain a repeating group of data.

Each row of data must have a unique identifier, i.e primary key

This can be done by

Eliminating the repeated groups of data through creating separate tables of related data

Identify each set of related data with a primary key

All attributes are single valued (1 data type) & non-repeating

Major Minor IntakeYear

Time Room

Student information:

Sid Sname

Course information

Cid Cname Lid

Lecturer Information

Lid Lname Ltitle

(9)

40

Database Normalization

Second Normal form (2NF):

A table should meet 1NF

There must not be any partial dependency of any column on primary key (Records should not

depend on anything other than a table's primary key)

Recall our poor database design:

Sid → Cname or Cname → time ?

(10)

Database Normalization

Second Normal Form (2NF) solution:

Create separate tables for sets of values that apply to multiple records

Relates the tables with a foreign key

Remove subsets of data that apply to multiple

rows of a table and place them in separate tables enrolled

Sid Cid grade (?)

What do we do with the attribute time, room, &

Lid?

(11)

Database Normalization

Third Normal Form (3NF):

Eliminate all attributes (columns) that do not directly dependent upon the primary key

Each non-primary key attribute must be

dependent only on primary key (no transitive dependency)

Example:

Student:

Sid Sname Major Minor IntakeYear Which attribute is not directly dependent on Sid?

Student:

Sid Sname Major Minor

(12)

Database Normalization

Old design

New design

(13)

44

Database Normalization

Storing the relation among tables in database

(14)

45

Database Normalization

Exercise:

Which normal form does this table violate?

And how do you normalize it?

Referensi

Dokumen terkait

The process of creating a data product typically needs data from (a) various transac- tional applications (e.g., online customer transactions, status updates of inventory, user

v LIST OF TABLES Table 1 The rate percentage of the students’ score of pre-test Table 2 The rate percentage of the students’ score of post-test Table 3 The mean score and standard

viii LIST OF TABLES Table 1: Food Security Measurement Guide Six Item Table 2: Demographic Characteristics of Survey Respondents Table 3: Student Data Based on Survey Responses

Write your Student ID, full name, and your number in CR58 in the space provided on the top of every page or on the first page of given exam booklets.. Your answer must only be written

The results of this design showed that 1 exploration in creating interior aesthetic artwork with the source of the idea of "birth" can be done by searching for layered data which is

Chapter 7: Major Contributions Analytical modelling of affective data in intelligent systems designed for children with ASD is the fundamental research focus of this work: in Chapter

Dissertation Overview To circumvent the limitations of traditional polyesters and their associated nanoparticle drug delivery systems, a practical approach has been developed for the

1,000 characters 10 Contact information of two references name, affiliation, telephone number, e-mail address 11.Application Deadline:31st May , 2021 date by which documents must