Scrutiny By Khimaanshu

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Saturday, 24 May 2014

All about Normalization!

Posted on 03:36 by Unknown
Join us on Facebook 
Normalization is one of the favorite topics of interviewee, here are the basics about what Normalization is all about.

What is Normalization?
A normalization is the process of organizing the columns, tables of a database to minimize the redundancy of data and ensure data dependencies make sense( means storing related data in a table).

It involves in dividing large tables into smaller tables and defining relationships between them.

What are different types of Normalization Levels or Normalization Forms?
The technique of normalization includes some rules, which when applied, changes the unnormalized data to a normalized-structured state. The process of nomalizing is implemented in 3 levels which as known as normal forms.

Inner and Outer Joins!..

First Normal Form:
1). Identify the primary key.
2). Remove all duplicate columns from the same table.
3). Create separate tables for each group of related data and identify each row with a unique column or set of columns (Primary Key).
4). Add a primary key column to the new table. It should be the same column as the foreign key in the base table.
   
Second Normal Form:
First it should meet the requirement of first normal form.

All the non-primary key column should be dependent on the whole primary key.  When a non primary key column is partially dependent on primary key then it is known as partial dependency. In 2nd normal form this partial dependency is removed.

Frequently asked SQL queries in interview..

How to remove Partial Dependency?
a). First you need to identify the columns which are partially dependent on primary key.
b). Remove those column from the base table and create another table, in which all the non-primary column are dependent on primary key of newly created table.

Third Normal Form:
First it should meet the requirements of second normal form. in 3rd NF all the non-primary key columns in the tables are directly dependent on the primary key and are not dependent on any other non-primary key.

1). First step is to identify the non-primary key column that depend on other non-primary key columns.
2). Then you need to remove these columns from the base table.
3). Create another table with this removed columns and include the non-primary key column that they are dependent on making it the primary key.
4). Create a foreign key in the base table and link it to primary key of newly created table.


What is Transitive Dependency?
It's a situation where a non-key column of a table is dependent on another non-key column.


What is De-normalization?
The de-normalization is the process of optimizing the read performance of a database by adding redundant data or by grouping data.

Let us take an example:


Student Details
Course Details
Result Details
Roll No
Student Name
DOB
Course ID
Course Name
Duration in Month
Date Of Exams
Marks Obtained
Grade
1001
Ram
11/9/1986
M4
Basic Maths
7
11/11/2004
89
A
1002
Shyam
12/8/1987
M4
Basic Maths
7
11/12/2004
78
B
1001
Ram
23/06/1987
H6

4
11/13/2004
87
A
1003
Sita
16/07/1985
C3
Basic Chemistry
11
11/14/2004
90
A
1004
Gita
24/09/1988
B3

8
11/15/2004
78
B
1002
Shyam
23/06/1988
P3
 Basic Physics
13
11/16/2004
67
C
1005
Sunita
14/09/1987
P3
 Basic Physics
13
11/17/2004
78
B
1003
Sita
23/10/1987
B4

5
11/18/2004
67
C
1005
Sunita
13/03/1990
H6

4
11/19/2004
56
D
1004
Gita
21/08/1987
M4
Basic Maths
7
11/20/2004
78
E

The above table contains the student and result details. Above table has below issues:

1). Firstly, we cannot insert prospective course which does not have any registered student or we cannot insert student details that is yet to register for any course.
2). Secondly, if we want to update the course M4’s name we need to do this operation three times. Similarly we may have to update student 1003’s name twice if it changes.
3). Also, if we want to delete a course M4 , in addition to M4 occurs details , other critical details of student also will be deleted. This kind of deletion is harmful to business. Moreover, M4 appears thrice in above table and needs to be deleted thrice.
4). Course M4’s data is stored thrice and student 1002’s data stored twice .This redundancy will increase as the number of course offerings increases.

To remove above issues, normalization is performed on above table.

-K Himaanshu Shukla...



Copyright © 2014 - ScrutinyByKHimaanshu


Email ThisBlogThis!Share to XShare to Facebook
Posted in Database, Normalization, Technical | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • Bigg Boss 8 got an extension of 4 weeks? Ex-contestants to enter as a wild card?
    Join us on Facebook   T his season of Colors' much talked reality show Bigg Boss which has bunch of wannabe's crossing the lines of ...
  • Lyrics & translation of Surya Mantra 'Tat Savitur Vrnimahe Vayam'..
    Join us on Facebook   N umber of beautiful hymns are present in our Veda's to praise the Sun (Surya devta). Today I heard one of the hym...
  • TAM RATINGS: TVM(TRP) & GVT(GRP) Ratings 2014- Week 20
    Join us on Facebook   Gross TVM's (Channel Wise) STAR PLUS Iss Pyaar Ko Kya Naam Doon 3.3 (3.2 ) Ek Ghar Banauga 2.9 (2.7) Saath Nibhana...
  • Serbian model Natasa Stankovic in Bigg Boss 8!!..
    Join us on Facebook   R emember hot and raunchy Natasa Stankovic? She shaked a leg along with Ajay Devgn on 'Aiyo ji hamri atariya mein...
  • Laut Aao Trisha to go off-air?
    Join us on Facebook   2 4 Frames' show 'Laut Aao Trisha' on Life OK, which marked small screen debut of Bhagyashree, is all set ...
  • #BiggBoss8 Day 8 Synopsis:The Great Divide
    Join us on Facebook   A s week 1 ended in Bigg Boss, a lot of stories unfolded. The happy family is taken by surprise as two new members of ...
  • Inner and Outer Joins!..
    Join us on Facebook   J OINS are basically used to combine the data from two tables. The temporary table is created based on column(s) that...
  • Padmini Kolhapure to play the other woman in Ekk Nayi Pehchaan!
    V eteran bollywood actress Padmini Kolhapure is roped to play pivotal role in Kinnari and Jay Mehta's Ekk Nayi Pehchaan on Sony Entertai...
  • Raj to disown Avni in ‘Aur Pyaar Ho Gaya’..
    Join us on Facebook   The drama proportion is all set to rise once again in Director Kut production’s show ‘Aur Pyaar Ho Gaya’ on Zee TV. Ne...
  • Sunil Grover to return as Gutthi in Comedy Nights?
    Join us on Facebook   S unil Grover, who is well known as Gutthi is all set to return to Comedy Nights With Kapil. ..yes you read is right.....

Categories

  • #HotGrapes
  • 24
  • Aaja Nachle
  • Aakanksha Singh
  • Aakansha Singh
  • Aamir Khan
  • Aamir Khan Nude
  • Aaradhna Uppal
  • Aashish Chaudhary
  • Aashka Goradia
  • Aasiya Kazi
  • Aastha Chaudhary
  • Abhishek Bachchan
  • Abhishek Rawat
  • ACP Pradyuman
  • Adah Sharma
  • Aditya Raj Kapoor
  • Agent Vinod
  • Airlines
  • Aishwarya Rai
  • Ajay Devgn
  • Ajaz Khan
  • Ajit Chandila
  • Akshay Kumar
  • Ali Asgar
  • Ali Quli Mirza
  • Alia Bhatt
  • Alisah Abdullah
  • Alok Nath
  • Alok Nath Upen Patel
  • Alzheimer
  • Amita Ka Amit
  • Amitabh Bachchan
  • Amrita Rao
  • Amrita Sher-Gil
  • Anas Rashid
  • Angels
  • Anil Kapoor
  • Anita Raj
  • Ankeet Chavan
  • Ankita Bhargava
  • Anshuman Jha
  • Anuj Sachdeva
  • Anup Soni
  • Anupam Kher
  • Anurag Kashyap
  • Anushka Sharma
  • Aparna Dixit
  • Apoorva Lakhia
  • Application Server
  • Archana Taide
  • Archangel Chamuel
  • Archangel Chamuel Prayer
  • Archangels
  • Arjun Kapoor
  • Armaan Kohli
  • Arya Babbar
  • Asha Negi
  • Ashish Sharma
  • Ashutosh Gowariker
  • Aur Pyaar Ho Gaya
  • Baaghi
  • Baal Veer
  • Baawre
  • Bade Acche Lagte Hain
  • Balaji Telefilms
  • Balika Vadhu
  • Bandit Queen
  • Bang Bang
  • Bani Ishq Da Kalma
  • Barun Sobti
  • Begum Nawazish Ali
  • Beintehaa
  • Bhagyashree
  • Bhanu Athaiya
  • Bharat Ka Veer Putra – Maharana Pratap
  • Bidaai
  • Bigg Boss
  • Bigg Boss 5
  • Bigg Boss 6
  • Bigg Boss 7
  • Bigg Boss 8
  • Bipasha Basu
  • Birthday
  • Blind Item
  • Bluffmaster
  • Bobby Darling
  • Bombay Velvet
  • Cartoon Network
  • Chak De India
  • Chakravartin Ashoka Samrat
  • Chandni Bhagwanani
  • Channel V
  • Chef Vikas Khanna
  • Chetan Hansraj
  • Chhanchhan
  • Chidiya Ghar
  • Children Of War
  • Chitrangada Singh
  • CID
  • Colors
  • Comedy Nights with Kapil
  • Connected Hum Tum
  • Daindra Soares
  • Damsharads
  • Dancing with the Stars
  • Daniel Weber
  • Dare To Dance
  • Darsheel Safary
  • Database
  • Dawood Ibrahim
  • Dayanand Shetty
  • Dayavan
  • DD
  • DDLJ
  • Debina Bonnerjee
  • Deepika Padukone
  • Deepika Singh
  • Deepshikha Nagpal
  • Delhi
  • Delhi Belly
  • Devoleena Bhattacharjee
  • Devon Ke Dev Mahadev
  • Dhoom
  • Diandra Soares
  • Digangana Suryavanshi
  • Dilwale Dulhania Le Jaayege
  • Dilwale Dulhania Le Jayenge
  • Dimple Kapadia
  • Dimpy Mahajan
  • Disney Channel
  • Divyanka Tripathi
  • Diya Aur Baati Hum
  • Diya Aur Baati Hum Written Episode Update
  • DJ's Production
  • Do Dil Bandhey Ek Dori Se
  • Doli Armaanon Ki
  • Dolly Bindra
  • Donde esta Elisa
  • Doordarshan
  • Drashti Dhami
  • Ek Haseena Thi
  • Ek Hazaaron Mein Meri Behena Hai
  • Ek Nanad Ki Khushiyon Ki Chaabi… Meri Bhabhi
  • Ek Nayi Pehchaan
  • Ekta Kapoor
  • Ela Bhatt
  • Emperor Ashoka
  • Emraan Hashmi
  • Endemol
  • Esha Gupta
  • Everest
  • Fahad Ali
  • Fanna
  • Farnaz Shetty
  • Fashion
  • Fear Factor Khatron Ke Khiladi
  • Finding Hanny
  • First Look
  • First Look of haider
  • Gangster
  • Gaurav Chopra
  • Gautam Gulati
  • Gautam Rode
  • Gay
  • Gay Couple
  • Geet Hui Sabse Parayi
  • Giaa Manek
  • Girvi
  • Gita Gopinath
  • Gold Awards
  • Got Talent World Stage Live
  • Govinda
  • Grand Masti
  • Gratitude
  • Guardian Angels
  • Gurmeet Choudhary
  • Gustak Dil
  • Gutthi
  • GVM
  • GVT
  • Haider
  • Happy New Year
  • Harshith Arora
  • Haseena
  • Haseena Parkar
  • Hate Story 2
  • Heropanti
  • Homi Adajania
  • Hot Grapes
  • Hotel
  • Hrithik Roshan
  • Humaima Malick
  • Humpty Sharma Ki Dulhaniyaa
  • Humshakals
  • Hungama
  • Hussain Kuwajerwala
  • Ibrahim Ismail Parkar
  • Imam Siddique
  • Inder Kumar
  • Inder Kumar Sarraf
  • India
  • India's Got Talent
  • Inner Join
  • Instagram
  • Interview Questions
  • IPL
  • Iqbal Khan
  • Irom Sharmila Chanu
  • Iron Lady
  • Iron Lady of Manipur
  • Ishita Ganguly
  • ITA Awards
  • Itna Na Karo Mujhe Pyaar
  • Itna Naa Karo Mujhe Pyaar
  • Jackie Shroff
  • Jacqueline Fernandes
  • Jamai Raja
  • Java
  • Java Interview Questions
  • Jay Bhanushali
  • Jeannie Aur Juju
  • Jennifer Winget
  • Jhalak Dikhhla Jaa
  • Jhalli Anjali
  • Jhalli Anjali Ke Tootey Dil Ki Amazing Story
  • Jhalli Anjali Written Episode Update
  • Jodha Akbar
  • Jodha Akbar Written Episode
  • Jyoti
  • Kainaat Arora
  • Kajol
  • Kanan Malhotra
  • Kanchi Singh
  • Kanpur
  • Kapil Nirmal
  • Kapil Sharma
  • Karan Johar
  • Karan Patel
  • Karan Sharma
  • Karan Singh Grover
  • Karanvir Bohra
  • Kareena Kapoor
  • Karishma Tanna
  • Katrina Kaif
  • Kaun Banega Crorepati
  • KBC
  • Khiladiyon Ka Khiladi
  • Kick
  • Kiku Sharda
  • Kinshuk Mahajan
  • Kiran Majumdar Shaw
  • KJO
  • kkusum
  • Koffee With Karan
  • Kriti Sanon
  • Kritika Kamra
  • Krystle D'Souza
  • KSG
  • Kuku Mathur Ki Jhand Ho Gayi
  • Kulbhushan Kharbanda
  • Kumkum Bhagya
  • Kunal Kohli
  • Kunwar Amarjeet Singh
  • Kushal Punjabi
  • Lata Mangeshkar
  • Laut Aao Trisha
  • Laxmi Narayan Tripathi
  • Life OK
  • Lost and Found
  • Love Sex Aur Dhokha
  • Loveleen Kaur Sasan
  • Luck By Chance
  • Maa Tujhe Salmaan
  • Mad In India
  • Madhubala... Ek Ishq Ek Junoon
  • Madhuri Dixit
  • Mahabharat
  • Mahakumbh
  • Maharakshak Aryan
  • Mahesh Bhatt
  • Main Lakshmi Tere Aangan Ki
  • Maine Gandhi Ko Nahin Mara
  • Maksim Chmerkovskiy
  • Maleeka R Ghai
  • Mandar Jadhav
  • Mandira Bedi
  • Manipur
  • Manish Paul
  • Mary Kom
  • Maryam Zakaria
  • Masoom
  • MasterChef
  • Meri Aashiqui Tumhi Se Hai
  • Meri Aashiqui Tumse Hi
  • Meri Bhabhi
  • Minissha Lamba
  • Mishal Raheja
  • Mishkat Verma
  • Miss Universe
  • Mohit Sehgal
  • Mouni Roy
  • Mrunal Jain
  • MTV
  • Mugdha Chapekar
  • Muh Boli Shadi
  • MySql
  • Na Aana Iss Desh Laado
  • Na Bole Tum Na Maine Kuch Kaha
  • Na Bole Tum Na Maine Kuuch Kaha
  • Nach Baliye
  • Naina Lal Kidwai
  • Namish Taneja
  • Nandish Sandhu
  • Naseeruddin Shah
  • Natasa Stankovic
  • Nausheen Ali Sardar
  • Navjot Singh Sidhu
  • Nawazuddin Siddiqui
  • Neelesh Misra
  • Neha Bagga
  • Neha Pednekar
  • Neil Bhoopalam
  • Neil Bhoopalam Bollywood
  • NH 10
  • Nia Sharma
  • Nick
  • Nigaar Khan
  • Nikhattu
  • Nirbhaak
  • Nisha Ke Cousins
  • Nisha Ke Cousins Written Episode Update
  • Nitin Vakaria
  • No Problem
  • Normalization
  • Olympian Meryl Davis
  • Oracle
  • Outer Join
  • Padmini Kolhapure
  • Painter
  • Pallavi Kulkarni
  • Pallavi Subhash
  • Panchi Bora
  • Pankaj Kapoor
  • Parag Tyagi
  • Parakh Madan
  • Pardes
  • Parichay Sharma
  • Paridhi Sharma
  • Parvati
  • Pavitra Rishta
  • Phir Se
  • PK
  • PK Poster
  • Pogo
  • Pooja Bhatt
  • Pooja Bose
  • Poonam Dhillon
  • Pragati Chourasiya
  • Prakash Jha
  • Praneet Bhatt
  • Preetika Rao
  • Priyanka Chopra
  • Pukaar- Call for the Hero
  • Puneet Isaar
  • Purab Kohli
  • Pyaar Ka Dard Hai
  • Pyaar Ka Dard Hai Meetha Meetha Pyaara Pyaara
  • Pyaar Tune Kya Kiya
  • Qubool Hai
  • Radhika Madan
  • Rafi Malik
  • Ragini MMS 2
  • Rahul Khanna
  • Rahul Mahajan
  • Raj Babbar
  • Raj Nayak
  • Raja Chaudhary
  • Raja Natwarlal
  • Rajan Shahi
  • Rajat Tokas
  • Ram Kapoor
  • Ranbir Kapoor
  • Randeep Hooda
  • Rangrasiya
  • Rannvijay Singh
  • Ranveer Shorey
  • Ranvir Shorey
  • Rape
  • RaQesh Vashisht
  • Rashami Desai
  • Rashmi Sharma
  • Ravi Dubey
  • Ravish Desai
  • Reliance
  • Remo D'Souza
  • Renne Dhyani
  • Richa Anirudh
  • Rishab Sinha
  • Rishtey
  • Riteish Deshmukh
  • Rithvik Dhanjani
  • RJ Malishka
  • RJ Preetam PYaare
  • Rohit Gandhi
  • Rohit Verma
  • Ronit Roy
  • Roopa Ganguly
  • Roopal Tyagi
  • Rucha Hasabnis
  • Ruslaan Mumtaz
  • S. Sreesanth
  • Saath Nibhana Saathiya
  • Sab TV
  • Sahil Anand
  • Saif Ali Khan
  • Sajid Khan
  • Sajid Nadiadwala
  • Sakshi Tanwar
  • Salman Khan
  • Samarth Shandilya
  • Sameer Soni
  • Sanam JOhar
  • Sanaya Irani
  • Sanjay Leela Bhansali
  • Sapne Suhane Ladakpan Ke
  • Saraswatichandra
  • Sarita Joshi
  • Satrangi Sasural
  • Satyagrah
  • Saubhagyavati Bhava
  • Saurabh Raj Jain
  • Saurabh Tiwari
  • Savdhaan India
  • Sayantani Ghosh
  • Secret Society
  • Seema Biswas
  • Shaandar
  • Shabana Azmi
  • Shabbir Khan
  • Shagufta Ali
  • Shah Rukh Khan
  • Shaheer Sheikh
  • Shahid Kapoor
  • Shahis Kapoor Shraddha Kapoor Kiss
  • Shahrukh Khan
  • Shakti Arora
  • Shakuntalam Telefilms
  • Shammi Kapoor
  • Shanti Dynamite
  • Shashi Sumeet Mittal
  • Shastri Sisters
  • Shastri Sisters Written Episode Update
  • Shefali Sharma
  • Shilpa Shirodkar
  • Shivaji Satam
  • Shivani Tomar
  • Shivin Narang
  • Shootout at Lokhandwala
  • Shot In The Dark
  • Shraddha Kapoor
  • Shruti Kanwar
  • Shubhangi Latkar
  • Shveta Salve
  • Shweta Salve
  • Shweta Tiwari
  • Siddharth Arora
  • Siddharth Kumar Tewary
  • Siddharth Shukla
  • Sidharth Shukla
  • Smita Bansal
  • Sneha Wagh
  • So you Think You Can Dance
  • Sonakshi Sinha
  • Sonal Vengurlekar
  • Sonali Raut
  • Sonam Kapoor
  • Soni Singh
  • Sony Pal
  • Sony TV
  • Sooraj Thapar
  • Sophie Choudry
  • South Africa
  • Sphereorigins
  • Splitsvilla
  • SQL
  • SQL Query
  • Sridevi
  • Star Parivaar Awards
  • Star Parivaar Awards 2014
  • Star Plus
  • Stored Procedure
  • Story
  • Struts
  • Sudhir Sharma
  • Sukriti Kandpal
  • Sumona Chakravarty
  • Sun Lust Pictures
  • Sunil Grover
  • Sunny Leone
  • Surbhi Jyoti
  • Surveen Chawla
  • Sushant Divakar
  • Sushant Divgikar
  • Sushmita Sen
  • Suyyash Rai
  • Swastik Productions
  • TAM ratings
  • Tammannah
  • Tanishaa Mukerji
  • Tanya Abrol
  • Tara Jean Popowich
  • Technical
  • Telly Diva
  • The Anupam Kher Show - Kucch Bhi Ho Sakta Hai
  • The Bold and the Beautiful
  • Tiger Shroff
  • Tina Dutta
  • Tisca Chopra
  • Toral Rasputra
  • Triggers
  • TRP
  • TRP of Indian Serials
  • TRP Ratings
  • Tum Aise Hi Rehna
  • Tumhare Sheher Mein
  • Tumhari Paakhi
  • TVM
  • TVT
  • Twitter
  • Udaan
  • Udann
  • Udann Written Episode Update
  • Ungli
  • Upasana Singh
  • Upen Patel
  • Urvashi Dholakia
  • Uttaran
  • Varun Dhawan
  • Vatsal Seth
  • Veera
  • Vibhav Roy
  • Vidya Balan
  • Vikas Bahl
  • Vikas Khanna
  • Vikram Bhatt
  • Vinita Joshi Thakkar
  • Vinod Khanna
  • Vipul Amrutlal Shah
  • Vishal Karwal
  • Vishal Pandya
  • Vishal Vashisht
  • Vishwapreet Kaur
  • Viveik Mishra
  • Vivek Mishra
  • Vivian D'Sena
  • Vivian Dsena
  • VJ Andy
  • Wanted
  • Web Server
  • Wicket
  • Will Smith
  • Written Episode
  • Yahaan
  • Yash Patnaik
  • Yash Puri
  • Ye Dil Sun Raha Hai
  • Yeh Hai Aashiqui
  • Yeh Hai Mohabbatein
  • Yeh Hai Mohabbatein Written Episode Update
  • Yeh Jawaani Hai Deewani
  • Yeh Rishta Kya Kehlata Hai
  • Yo Yo Honey Singh
  • Zaan Khan
  • Zalak Desai
  • Zee TV
  • Zing

Blog Archive

  • ▼  2014 (500)
    • ►  December (32)
    • ►  November (77)
    • ►  October (83)
    • ►  September (67)
    • ►  August (125)
    • ►  July (50)
    • ►  June (51)
    • ▼  May (15)
      • Lyrics & translation of Surya Mantra 'Tat Savitur ...
      • Maksim Chmerkovskiy, winner of 'Dancing with the S...
      • TAM RATINGS: TVM(TRP) & GVT(GRP) Ratings 2014- Wee...
      • Paridhi Sharma out..Aparna Dixit roped in to play ...
      • Shiv and Anandi get worried in Balika Vadhu!
      • Sunil Grover to return as Gutthi in Comedy Nights?
      • Inner and Outer Joins!..
      • Frequently asked SQL queries in interview..
      • All about Normalization!
      • Padmini Kolhapure to play the other woman in Ekk N...
      • Rohit Shetty's balancing act in Khatron Ke Khiladi..
      • Paridhi Sharma in Ekta Kapoor's next on Colors'?
      • “Thank You Junta”, says Kapil Sharma
      • TAM RATINGS: TVM(TRP) & GVT(GRP) Ratings 2014- Wee...
      • COLORS launches- 'The Anupam Kher Show - Kucch Bhi...
Powered by Blogger.

About Me

Unknown
View my complete profile