0% found this document useful (0 votes)
15 views17 pages

CDM 7 Faveenna

Normalization in databases is a multi-step process that organizes data into smaller tables to reduce redundancy and establish relationships between them. It ensures data consistency, optimizes storage, and maintains logical data dependencies through the use of primary and foreign keys. The document outlines the different normal forms (1NF, 2NF, 3NF) and their requirements to achieve an efficient and scalable database structure.

Uploaded by

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

CDM 7 Faveenna

Normalization in databases is a multi-step process that organizes data into smaller tables to reduce redundancy and establish relationships between them. It ensures data consistency, optimizes storage, and maintains logical data dependencies through the use of primary and foreign keys. The document outlines the different normal forms (1NF, 2NF, 3NF) and their requirements to achieve an efficient and scalable database structure.

Uploaded by

avirat1001
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 17

CLINICAL DATA

MANAGEMENT

FAVEENNA SUKUMARAN
NORMALIZATION IN DB
NORMALIZATION IN DB
Normalization in DB is a technique using which you can organize the data in the database
tables so that:

Less repetition of data

A large set of data is


structured into a bunch of
smaller tables.

The tables have a proper


relationship between them.

It is a multi-step process that puts data into tabular form, removes duplicate data, and set up the
relationship between tables.
WHY WE NEED
NORMALIZATION IN DB?
Normalization helps in keeping data
consistent by storing the data in one table and
referencing it everywhere else

Storage optimization although that is not an issue


these days because Database storage is cheap.

Breaking down large tables into smaller tables


with relationships, so it makes the database
structure more scalable and adaptable.

Ensuring data dependencies make sense i.e. data is logically stored


PRIMARY KEY AND NON-KEY ATTRIBUTES

Primary Key Non-key attributes

Student Id Student Name Attendance Branch

121991 F 98 CDM

391989 G 100 PV

1112024 E 99 CDM

10324 F 97 CDM

The student_id column is a primary key because using the student_id value we can uniquely identify each row of
data.
Student Table:
Student Id Student Contact Info Branch ID
Name
In both tables, Student-ID in the Student table and
121991 F 7777777777 111
Branch-ID in the Branch table are primary keys. This
391989 G 8888888888 333 means that each value in these columns is unique
and can uniquely identify each row in their
1112024 E 9999999999 111 respective tables.

The foreign key Branch-ID ensures that the data in


Branch Table:
the Student table is consistent with the data in the
BRANCH ID BRANCH NAME Branch table. Specifically, it ensures that: Every
111 CDM value in the Branch-ID column of the Student table
must match an existing value in the Branch-ID
333 PV column of the Branch table. This helps maintain
referential integrity between the two tables.
Type of Key Purpose Uniqueness Relationship

Uniquely identifies each Establishes uniqueness in


Primary Key Yes, must be unique
record in a table the table

Links two tables together


Establishes a relationship
Foreign Key by referencing the primary Not necessarily unique
between tables
key of another table

To provide extra details or Not Unique


They are related to the
information about a Many rows can have the
primary key because they
Non-Attribute Key record. They help describe same value in non-key
describe the entity that
the entity but are not used attributes
the primary key identifies
to identify it
NORMAL FORM
NF stands for Normal Form — it’s like a set of rules that help keep a database table clean, organized, and
without confusion.

Imagine your table is like a class register — normal forms help make sure the data is written clearly, with no mix-
ups, and is easy to update.
First Normal Form (1NF)

Second Normal Form (2NF)

Third Normal Form (3NF)


1NF – First Normal Form:
• Keep it neat — one thing per box.
• Each cell in the table should have only one value.
• There should be no lists or multiple items in a single box.
FIRST NORMAL FORM (1NF)
Column A Column B 1.It should only have single(atomic) valued attributes/columns.
1 A,B,C There should be no multiple entry in a column

2 D,E
3 F
4 G

DOB Name
2.Values stored in a column should be of the same domain.
01-11-2024 E
A column should contain values of same kind
Do not inter-mix different values 01-02-1991 F
03-09-1989 G
I 28-09-2014
3. All the columns in a table should have unique names.
Each column should have unique name
This is to avoid confusions and the time of data retrieval

DOB Name Name

01-02-1991 F S 4.The order in which data is stored should not matter.


09-10-2000 E G

11-12-2013 T O Roll No F_Name L_Name

1 F S

3 E G
DOB F_Name L_Name
2 T O
01-02-1991 F S

09-10-2000 E G

11-12-2013 T O
2NF – Second Normal Form
• the table must be in 1NF.
• Every non-key column depends on the whole primary key, not just part of it.
(Partial dependency) Student ID Student Name
101 Aisha
102 Rahul

Student ID Subject
101 Maths
101 Science
102 English

Primary Key = (Student-ID + Subject) → because a student can take multiple subjects.
3NF – Third Normal Form:
• Only store what's really about the main thing.
• First, the table must be in 2NF.
• Then, everything in the table should directly relate to the primary key, and only the primary
key

.
Normal Form Definition Key Requirements Goal

A table is in 1NF if it has


- No repeating groups or
only atomic (indivisible) Eliminate duplicate
arrays
1NF (First Normal Form) values and each column columns and ensure
- Each cell contains a
contains values of a single atomicity
single value
type.

A table is in 2NF if it is in
- In 1NF
1NF and all non-key
2NF (Second Normal - No partial dependency Remove partial
attributes are fully
Form) (non-key depends on part dependencies
functionally dependent on
of a composite key)
the entire primary key.

A table is in 3NF if it is in - In 2NF


2NF and all non-key - No transitive
Remove transitive
3NF (Third Normal Form) attributes are not dependency (non-key
dependencies
transitively dependent on depends on another non-
the primary key. key)
• Ensures data is organized efficiently and logically.
• Eliminates redundancy and minimizes data anomalies.
• Maintains data integrity across the database.
• Helps define clear relationships between entities in the Conceptual Data
Model (CDM).
• Lays a strong foundation for a well-structured and scalable database.
• Makes future maintenance and expansion of the database easier.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy