Skip to main content

ER(Entity Relational) Diagram and Normalization in DBMS - Technology369kk

ER:- An entity-relationship model (ER model) Diagram describes the structure of a database with the help of a diagram, known as an Entity Relationship Diagram (ER Diagram). 
An ER model is a design or blueprint of a database that can later be implemented as a database.



Normalization

Normalization in a DBMS is a process used to organize data in a database efficiently and effectively. It eliminates data and redundancy (duplicate data) and ensures data dependency(logic storage). The goal is to divide a database into smaller tables and define relationships between them, making it more flexible and easy to maintain. So Important Points: 

  • Decompose larger, complex tables into simple and smaller ones, 
  • Moves from lower normal forms to higher normal forms.


Normalization and Normal Forms: 



Need for Normalization

  •  To produce a good database design
  •  To ensure all operations are efficiently performed
  • Avoid any expensive DBMS operations
  • Avoid unnecessary replication of information
DATABASE of Students but wrong learn next I will explain why wrong.

Students_Details

Course_details

Pre-requisite

Results_details

101 Shailu 05/01/2002

J1 Advance Java                 301

Basic Java

03/08/2022    85        A

102 Sanju 14/02/2002

P4 Advance Python           304

Basic Python

03/08/2022     78      B

103 Annu 05/01/2002

S Advance SQL                   308

Basic SQL

03/08/2022     98      A

104 Priya 17/02/2002

C5 Advance C++                 302

Basic C++

03/08/2022     58      C

    

       Note: 

  •     Before learning  the types of normal forms in normalization 1NF, and 2NF………we will be most important this concept in detail:

       Functional Dependency:

·        Consider the relation

  •             Results ( Students#, Course#, CourseName#, Marks#, Grade#)

o   Students# and Course# together exactly one value of marks. Students#, Course#, Marks

o   Students# and Course# determines Marks or Marks is functionally dependent on student# and Course#

  • ·        Other Functional dependencies in the relation:  

o   Course# - CourseName

o   Marks#  - Grade

·        Let’s see an example of a demo

·        In a given relation R, P and Q are attributes. Attributes Q is functionally dependent on attributes P if each of P determines exactly one value of Q. 




Type of Function Dependency:-  



1.      1. Partial Functional Dependency:

1. Attributes Q is partially dependent on attributes on P, if and only if is dependent on the subset of attributes P.

2. REPORT (Student#, Course#, StudentName#, CourseName#, Marks, Grade)



       

2. Transitive Dependency:

X, Y, and Z are three attribute

Types of Normalization

  • We are already discussing about normalization but here now discuss on types only major three types of normalizations: - 


1.      First Normal Form – (1NF)

·        A relational schema is in 1NF, if and only if:

o   All attributes in the relation are atomic (indivisible value)

o   And there are no repeating elements or groups of elements

Students_Details

Course_details

Pre-requisite

Results_details

101 Shailu 05/01/2002

J1 Advance Java                301

Basic Java   18

03/08/2022    85        A

102 Sanju 14/02/2002

P4 Advance Python           304

Basic Python 25

03/08/2022     78      B

103 Annu 05/01/2002

S Advance SQL                   308

Basic SQL     33

03/08/2022     98      A

104 Priya 17/02/2002

C5 Advance C++                 302

Basic C++     17

03/08/2022     58      C

Note:- Remember, I told you this is the wrong table of student's information so now explain how to convert it right.


Student Information Table in 1NF

Student

#

 

Student_

Name

DOB

Course#

Course

Name

Course

Id

Pre-Requisite

Duration in Days

Date

of Exam

Marks

Grade

101

Shailu

05/01/

2002

J1

Advance Java

301

Basic Java

18

03/08

/2022

85

A

102

Annu

07/09/

2002

P4

Advance Python

302

Basic

Python

25

03/08/

2022

78

B

103

Priya

17/02/

20004

S2

Advance

SQL

303

Basic SQL

33

03/08/

2022

98

A


    2. Second Normal Form – (2NF):

·        A relation is said to be in 2NF, if and only if:

·        It is in 1st Normal form.

·        No partial dependency exists between non-key attributes and key attributes.

·        Here Now 1NF Divided by 2NF so let’s see now:

·        Students#, Course# à Marks

·        Students#, Course# à Grade

·        Marksà Grade



Student Information Table in 2NF
Student Table

Student#

Student_Name

DOB

101

Shailu

05/01/2002

102

Annu

07/09/2002

103

Priya

17/02/2002


Result Table

Student#

Course#

Marks

Grade

101

J1

85

A

102

P4

78

A

103

S2

98

B


Course Table

Course#

CourseName

Prerequisite

DurationDay

Date

of Exam

J1

Advance Java

Basic Java

18

03/08

/2022

P4

Advance Python

Basic Python

25

03/08/

2022

S2

Advance SQL

Basic SQL

33

03/08/

2022



1.      Third Normalization –(3NF):

    Result Table

Student#

Course#

Marks

Grade

101

J1

85

A

102

P4

78

A

103

S2

98

B


·        Student#, Course# à Marks

·        Student#, Course#  à Grade

·        Marks à Grade

·        Student#, Course# à Marks à Grade: TD -----à Remove


Result Table

Student#

Course#

Marks

101

J1

85

102

P4

78

103

S2

98


Marks Grade Table

Marks

Course#

85

A

73

B

98

A


I hope this post is understandable for you, if you have any doubts pls comments.





 

Comments

Popular posts from this blog

Assignment of ITA/ Information Technology and Application BCA- Technology369kk

Q1. What is  computer Explain basic computer architecture and Difference components.  2. Discuss the use of memory in computer system, Explain memory hierarchy  in details. 3. What is software? Explain difference types of software with explain. 4. Write short notes on the given:- (I) Internet. (II) LAN (Local area network ) (III) Search engine (IV) Web browser  Q 1.What is computer Explain basic computer architecture, Difference components of computer.   Computer :- Computer is defined as an electronic device that takes input data and instructions from the user and after processing them, it generates useful and desired output quickly.   A computer is designed to execute applications and provides a variety of solutions through integrated hardware and software components.                            It is fast and automatic device. It works with the help of programs and represents the d...

C++ and Java Practical All Questions Answers - BCA -Technology369kk

C++ and Java  In this post see most important questions for practical questions given by college all questions with answers . Guys I want to say that this is only for suggested post for your practical please request to you change same alphabets, words or anything  methods name and variables name because if you write all words same then this is copy paste for another peoples.  Used Topics:  Keywords, Variables, Condition Statements, Function , Array, Structure, Pointer.                           In OOPs, Class and Objects, Constructor, Poly morph, Encapsulation, Access Specifiers,                               Inheritance etc.  So, Without Time Lose Come to the Points, let's go start Now:        *************************************************************************  C++ 12 ...

Assignment of PMO (Principal of Management and Organization) - Technology369kk

 ** Assignment Of PMO ** Agenda: -  4 Questions discuss in this post. Question 1. Write a d etails note on selection why it Called. negative process.  Question 2. Write a details note on 'span of control. Question 3. Planning is an essential process, do you agree ? Discuss  Question 4. Write a note on management function. Q 1. Write a d etails note on selection why it called negative process.  Ans :-  Selection is the process of choosing the most suitable candidates out of the several candidates available.          Selection is a negative process because there may be more rejected then those selected in most of the candidates that is called selection is a negative process. → Selection process has the following steps:-  [ A .] Screening of applicants - Based on the screening of applicants only those candidates. It Called further process of selection. Who are found eligible for the job Standards of the the organization. [ B .] S...