DBMS Part-1 SSG
DBMS Part-1 SSG
PAGE 1
Introduction to Database Management System
About DBMS
Course
Outline
Database Normalization
Type of Normalization
PAGE 2
What is DBMS ? Types of DBMS
A database is a collection of interrelated data that helps in Relational Database Management System (RDBMS):
the efficient retrieval, insertion, and deletion of data from Data is organized into tables (relations) with rows and
the database and organizes the data in the form of tables, columns, and the relationships between the data are
views, schemas, reports, etc. For Example, a university managed through primary and foreign keys. SQL
database organizes the data about students, faculty, admin (Structured Query Language) is used to query and
staff, etc. which helps in the efficient retrieval, insertion, manipulate the data.
and deletion of data from it.
NoSQL DBMS: Designed for high-performance
A Database Management System (DBMS) is a software scenarios and large-scale data, NoSQL databases store
system that is designed to manage and organize data in a data in various non-relational formats such as key-
structured manner. It allows users to create, modify, and value pairs, documents, graphs, or columns.
query a database, as well as manage the security and
access controls for that database. DBMS provides an Object-Oriented DBMS (OODBMS): Stores data as
environment to store and retrieve data in convenient and objects, similar to those used in object-oriented
efficient manner. programming, allowing for complex data
representations and relationships
PAGE 3
Key Features of DBMS
Data modeling: A DBMS provides tools for creating and modifying data models, which define the structure and
relationships of the data in a database.
Data storage and retrieval: A DBMS is responsible for storing and retrieving data from the database, and can provide
various methods for searching and querying the data.
Concurrency control: A DBMS provides mechanisms for controlling concurrent access to the database, to ensure that
multiple users can access the data without conflicting with each other.
Data integrity and security: A DBMS provides tools for enforcing data integrity and security constraints, such as
constraints on the values of data and access controls that restrict who can access the data.
Backup and recovery: A DBMS provides mechanisms for backing up and recovering the data in the event of a system
failure.
RDBMS: Data is organized in the form of tables and each table has a set of rows and columns. The data are related to
each other through primary and foreign keys.
NoSQL: Data is organized in the form of key-value pairs, documents, graphs, or column-based. These are designed to
handle large-scale, high-performance scenarios
Database Normalization
Database normalization is the process of organizing the attributes of the database to reduce or eliminate data
redundancy (having the same data but at different places). Data redundancy unnecessarily increases the size of the
database as the same data is repeated in many places. Inconsistency problems also arise during insert, delete, and
update operations.
PAGE 6
First Normal Form (1NF)
Example: Relation EMPLOYEE is not in 1NF The decomposition of the EMPLOYEE table into 1NF has
because of multi-valued attribute EMP_PHONE. been shown below:
PAGE 7
Second Normal Form (2NF)
In the 2NF, relational must be in 1NF.
In the second normal form, all non-key attributes are fully functional dependent on the primary key
Example: Let's assume, a school can store the To convert the given table into 2NF, we decompose it into
data of teachers and the subjects they teach. In a two tables:
school, a teacher can teach more than one
subject.
PAGE 8
Description of Normal Forms
A relation is in the third normal form, if there is no transitive dependency for non-prime attributes as well
as it is in the second normal form. A relation is in 3NF if at least one of the following conditions holds in
Third Normal Form (3NF) every non-trivial function dependency X –> Y.
•X is a super key.
•Y is a prime attribute (each element of Y is part of some candidate key).
PAGE 9
MySQL using XAMPP
PAGE 10
PAGE 11