0% found this document useful (0 votes)
25 views11 pages

DBMS Part-1 SSG

Uploaded by

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

DBMS Part-1 SSG

Uploaded by

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

DBMS

Purpose and functionality of Database

PAGE 1
Introduction to Database Management System

About DBMS

Course
Outline
Database Normalization

Type of Normalization

MySQL using XAMPP

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.

Functional Dependency and Normalization

Attribute Y is functionally dependent on attribute X if


Given the value of X, there is a value of Y responding to it
Denoted by X Y; Example: Item_Code  Item_Name
Anomalies in a database system
Bad design may impose (a) repetition of information and (b) inability to represent certain information
It leads to insertion, updation, and deletion anomalies
Lending = (branch_name, branch_city, assets, customer_name, customer_city, customer_street, loan_number, amount)
Decompose the table based on the functional dependency
Branch (branch_name, branch_city, assets)
branch_name  branch_city branch_name  assets
Customer (customer_name, customer_city, customer_street)
customer_name  customer_city customer_name  customer_street
Loan (loan_number, customer_name, branch_name, amount)
loan_number  amount
loan_number  branch_name
loan_number  customer_name
Properties of Normalized Relation

 No data values be duplicated in different rows unnecessarily


 A value must be specified for every attribute in a row
 If a row from a relation is deleted important information should not be lost
 When a row is added to relation other relations in the database should not be affected.
 A value of an attribute in a tuple may be changed independent of other tuples in the relation
and other relations.
 1 NF, 2 NF, 3 NF

PAGE 6
First Normal Form (1NF)

 A relation will be 1NF if it contains an atomic value.


 It states that an attribute of a table cannot hold multiple values. It must hold only single-valued
attribute.
 First normal form disallows the multi-valued attribute, composite attribute, and their
combinations.

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).

For BCNF the relation should satisfy the below conditions


Boyce-Codd Normal Form (BCNF) •The relation should be in the 3rd Normal Form.
•X should be a superkey for every func onal dependency (FD) X−>Y in a given rela on.

A relation R is in 4NF if and only if the following conditions are satisfied:


Fourth Normal Form (4NF) •It should be in the Boyce-Codd Normal Form (BCNF).
•The table should not have any Multi-valued Dependency.

A relation R is in 5NF if and only if it satisfies the following conditions:


Fifth Normal Form (5NF) •R should be already in 4NF.
•It cannot be further non loss decomposed (join dependency).

PAGE 9
MySQL using XAMPP

PAGE 10
PAGE 11

You might also like