You are on page 1of 2

Class-2: Theory & Practicals

---------------------------------
Decomposition, Normalization
ER Model
SSMS overview
Service Overview

All_details(s_id, s_name, s_age, Trainer_name, Trainer_Age, Trainer_Id)

s_id --> s_name, s_age


Trainer_Id --> Trainer_Name, Trainer_Age

student_details(s_id, s_name, s_age) s_id --> s_name, s_age


trainer_details(Trainer_name, Trainer_Age, Trainer_Id) Trainer_Id --> Trainer_Name,
Trainer_Age

T1(s_id, s_name, s_age, Trainer_name) s_id --> s_name, s_age


T2(Trainer_Age, Trainer_Id) Trainer_Id --> Trainer_Name, Trainer_Age

Table(ID, name, age, gender, address, fingerprint, retina)

Table1(ID, name, age, gender)


Table2(ID, address, fingerprint, retina)

Table = Table1 & Table2

Table(A_Num, name, age, gender, PIN, State, City, District, Locality)


A_Num --> name, age, gender
PIN --> State, City, District, Locality

Table1(A_Num, name, age, gender)


Table2(PIN, State, City, District, Locality)

user(id, name, mobile1, mobile2)


(1, Deb, 123, 456)

Student(Roll, Name, PIN, State, City, District)

Roll -> (Name, PIN, State, City, District) --> FD1


PIN -> (State, City, District) --> FD2

Roll --> PIN


PIN --> State/City/District

Roll --> State/City/District --> TFD

---------------------------Normalization---------------------------------
-- What is normalization?
Technique to minimize data duplication and increase logical consistency.

-- Why to perform normalization?


Remove redundancy from database
Maintain consistency and integrity

-- First Normal Form:


Rule-1: Single valued column
Rule-2: same kind of data in each column
Rule-3: All column name should be unique
Rule-4: FYI - Row order does not matter

-- Second Normal Form:


Rule-1: Table should follow first normal form
Rule-2: No partial depedency in a table

-- Third Normal Form:


Rule-1: Table should follow second normal form
Rule-2: No transative dependency in the table

-- BCNF: Boyce - Codd Normal Form (Extension of third Normal Form)


Rule-1: Table should follow third normal form
Rule-2: For X->Y, X should be the super key of the table

-- Forth Normal Form:


Rule-1: Table should follow BCNF
Rule-2: Table should not have multi valued depedency.

indipendent columns/ unrelated columns, then we should remove them


We should be having only related columns in a table

Server --> SQL Server Service


Client --> SSMS (SQL Server Management Studio)

Client --> Instance Name(Service Name) --> Server

Instance Name: Hostname\ServiceName (mylaptop\hermes)

You might also like