SlideShare a Scribd company logo
RELATIONAL DATABASE
MANAGEMENT SYSTEM
(RDBMS)
BY MIAN A. SHABBIR
DATABASE MANAGEMENT SYSTEM
• Database Management System – is a system software that allows users to specify
the structure of a database with a systematic way to create, query and update data
in the database. For Example: Limiting of access to database for specific users.
• The database management system essentially serves as an interface between the
database and end users or application programs, ensuring that data is consistently
organized and remains easily accessible.
• The DBMS manages three important things: the data, the database engine that
allows data to be accessed, locked and modified -- and the database schema, which
defines the database’s logical structure.
DATA, SCHEMA, AND DATABASE
• Data – is numerical, character or other symbols which can be recorded in a form for
processing by a computer. For Example: Names and Addresses of employees in a
company.
• Schema – The schema is the structure of data, whereas the data are the facts.
Schema basically indicates the rules which the data must obey. Such rules can be
enforced by a database. For Example: Age limit of employees being hired in a
company is between 18 – 90 years old.
• Database – A database is a collection of related data arranged for searching quickly
and efficiently.
WHAT IS RDBMS?
• RDBMS is a database management system based on relational model defined by
E.F.Codd.
• Data is stored in the form of rows and columns. The relations among tables are also
stored in the form of the table.
• RDBMS use the language known as SQL (Sequel)
• SQL is a simple programming language used for accessing and managing data in
relational databases.
• Shares a common column in two or more tables (Primary Key and Foreign Key)
FEATURES OF RDBMS
• Provides data to be stored in tables
• Persists data in the form of rows and columns
• Provides primary key to uniquely identify the rows in a table
• Provides a (view) virtual table creation in which sensitive data can be stored
• Provides multi user accessibility that can be controlled by individual users
• And it features four types of relationships in database
RELATIONSHIPS IN DATABASE
• One to One – One entity is associated with another entity. For Example: Each
employee belong to one department.
• One to Many – One entity is associated with many other entities. For Example: A
company is associated with all working employees in one branch/office/country.
• Many to One – Many entities are associated with only one entity. For Example:
Many employees have one manager.
• Many to Many – Many entities are associated with many other entities. For
Example: Many employees associated with multiple assignments and multiple
assignments are associated with multiple employees at the same time.
RULES OF RDBMS
• These rules are strictly implemented as part of the overall database design:
1. Each table has a unique name
2. Each table contains multiple rows
3. Each row in a table is unique
4. Every table has a key to uniquely identify rows
5. Each column in a table has a unique attribute name
ELEMENTS OF RDBMS
• There are four main database elements in a relational database:
• Tables – Data collection objects also known as relation.
• Tuple – Row of a relation which represents an instance of a relation
• Attribute – named column of a relation
• Queries – Inquiry about the stored data.
• Forms – A predefined format to display or enter data
• Reports – Printable version of database information
SQL COMMANDS
• There are various categories of sql commands that are used to handle the data.
1. Data Definition Language (DDL) commands, are used to create, and modify
database objects. For Example: CREATE, ALTER, DROP
2. Data Manipulation Language (DML) commands are used to manipulate data. For
Example: DELETE, INSERT, SELECT, UPDATE
3. Data Control Language (DCL) commands are used to control privileges in
database. For Example: GRANT, REVOKE
SQL CONSTRAINTS
• Constraints are the rules enforced on data columns on table.
• These are used to limit the type of data that can go into a table.
• This ensures the accuracy and reliability of the data in the database.
• Constraints could be column level or table level.
• Column level constraints are applied only to one column where as table level
constraints are applied to the whole table.
COMMON SQL CONSTRAINTS
• NOT NULL Constraint: Ensures that a column cannot have NULL value.
• DEFAULT Constraint: Provides a default value for a column when none is specified.
• UNIQUE Constraint: Ensures that all values in a column are different.
• PRIMARY Key: Uniquely identified each rows/records in a database table.
• FOREIGN Key: Uniquely identified a rows/records in any another database table.
• CHECK Constraint: The CHECK constraint ensures that all values in a column
satisfy certain conditions.
• INDEX: Use to create and retrieve data from the database very quickly.
DATA DEFINITION LANGUAGE SCRIPT
CREATE TABLE EMP (
EMPNO NUMBER(4) PRIMARY KEY,
ENAME VARCHAR2(15) NOT NULL,
JOB VARCHAR2(10),
MGR NUMBER(5),
HIREDATE DATE DEFAULT (SYSDATE),
SAL NUMBER(7,2),
COMM NUMBER(7,2),
DEPTNO NUMBER(4)) ;
DATA MANIPULATION LANGUAGE SCRIPT
INSERT INTO EMP VALUES (7782, 'CLARK' , 'MANAGER' , 7839 , '09-JUN-81' , 2450 ,
NULL , 10);
INSERT INTO EMP VALUES (7788, 'SCOTT' , 'ANALYST' , 7566 , '19-APR-87' , 3000 ,
NULL , 20);
INSERT INTO EMP VALUES (7839, 'KING' , 'PRESIDENT' , NULL , '17-NOV-81' , 5000 ,
0, 10);
INSERT INTO EMP VALUES (7844, 'TURNER' , 'SALESMAN' , 7698 , '08-SEP-81' , 1500
, 0 , 30);
INSERT INTO EMP VALUES (7876, 'ADAMS' , 'CLERK' , 7788 , '23-MAY-87' , 1100 ,
NULL , 20);
INSERT INTO EMP VALUES (7900, 'JAMES' , 'CLERK' , 7698 , '03-DEC-81' , 950 , NULL
DATA CONTROL LANGUAGE SCRIPT
• GRANT SELECT
ON employee
TO CLARK;
• GRANT UPDATE, DELETE
ON employee
TO CLARK;
• REVOKE SELECT
ON employee
FROM CLARK;
• REVOKE UPDATE, DELETE
ON employee
FROM CLARK;
PRIMARY KEY, FOREIGN KEY
Primary Key
• Primary Key is used for unique identification of each row in a table. The rule for
primary key is that values have to be unique and not null.
Foreign Key
• Foreign Key identifies a column with primary key column of another table for
storing data. The values of foreign key are exactly same as the values of primary
keys of other tables.
EXAMPLE OF PRIMARY AND FOREIGN KEY
Patient Id Name D.o.B Gender Phone Doctor Id
125 Clark 04-05-1979 Male 123-456-7890 10
149 Dave 06-21-1984 Male 444-555-6666 20
160 Lisa 11-13-1991 Female 777-888-9999 10
199 Joe 07-02-1993 Male 111-222-0000 10
Doctor Id Doctor Room
10 Dr. Wilson 08
20 Dr. Frank 02
Primary Key
Foreign Key
DBMS VS RDBMS
DBMS
• Introduced in 1960s
• Followed navigational modes for data
storage
• Data fetching is slower for large
amount of data
• Data redundancy is common in this
model leading to difficulty in
maintaining data
• Examples are dBase, Microsoft Access,
LibreOffice Base, FoxPro
RDBMS
• Introduced in 1970s
• Uses relationship between tables using
primary keys, foreign keys and indexes
• Data fetching is faster because of its
relational model
• Keys and indexes are used in the tables
to avoid redundancy
• Example are SQL Server, Oracle,
MySQL, MariaDB, SQLite
RDBMS NORMALIZATION
• Database normalization or simply normalization, is the process of organizing the
data in a database
• There are two main goal of normalization process:
1. Eliminating redundant data
2. Ensuring of data dependence
• Both of these goals reduce the amount of space a database consumes and ensure
that data is logically stored
BENEFITS OF NORMALIZING
• By doing normalization the process of searching and creating tables is faster
• More needed tables can be derived for clear vision
• Less redundant data and fewer null values will make the database more compact
• The indexes of tables make data modification commands execution much faster
• Normalization facilitates in reducing data modification anomalies
SQL JOINS
• SQL join is a instruction to a database to combine data from more than one table.
• There are different type of joins, which have different rules for the results they
create.
• Types of Joins:
1. Inner join
2. Left outer join
3. Right outer join
4. Full outer join
5. Cross join
6. Self join
INNER JOIN
• The INNER JOIN or EQUI JOIN creates a new result table by combining column
values of two tables (table1 and table2) based upon the join-predicate.
• The query compares each row of table1 with each row of table2 to find all pairs of
rows which satisfy the join-predicate.
• INNER JOIN Script Syntax:
SELECT table1.column1, table2.column2
FROM table1
INNER JOIN table2
ON table1.common_field = table2.common_field;
LEFT OUTER JOIN
• A left outer join, or left join, results in a set where all of the rows from the first, or
left hand side, table are preserved. The rows from the second, or right hand side
table only show up if they have a match with the rows from the first table.
• LEFT OUTER JOIN Script Syntax:
SELECT table1.column, table2.column
FROM table1
LEFT OUTER JOIN table2
ON (table1.column = table2.column);
RIGHT OUTER JOIN
• A right outer join, or right join, is the same as a left join, except the roles are
reversed.
• All of the rows from the right hand side table show up in the result, but the rows from
the table on the left are only there if they match the table on the right.
• RIGHT OUTER JOIN Script Syntax:
SELECT column_name(s)
FROM table1
RIGHT OUTER JOIN table2
ON table1.column_name=table2.column_name;
FULL OUTER JOIN
• A full outer join, or just outer join, produces a result set with all of the rows of both
tables, regardless of whether there are any matches.
• FULL OUTER JOIN Script Sytax:
SELECT column_name(s)
FROM table1
FULL OUTER JOIN table2
ON table1.column_name=table2.column_name;
CROSS JOIN
• The CARTESIAN JOIN or CROSS JOIN returns the Cartesian product of the sets of
records from the two or more joined tables. The row count of the result is equal to
the number of rows in the first table times the number of rows in the second table.
• CROSS JOIN Script Syntax:
SELECT *
FROM table1
CROSS JOIN table2;
SELF JOIN
• Joining a table to itself is known as self join. In simple words, it means using a same
table twice.
• SELF JOIN Script Syntax:
SELECT a.column_name, b.column_name
FROM table1 a, table1 b
WHERE a.common_field = b.common_field;
REFERENCES
• http://docs.oracle.com/cd/E17952_01/index.html
• http://www.sql-join.com/
• http://www.mytecbits.com/microsoft/sql-server/what-is-dbms-what-is-rdbms
• http://www.tutorialspoint.com/sql/sql-rdbms-concepts.htm
• http://databases.about.com/od/specificproducts/a/normalization.htm
Ad

More Related Content

What's hot (20)

RDBMS
RDBMSRDBMS
RDBMS
PriyangaRajaram
 
Files Vs DataBase
Files Vs DataBaseFiles Vs DataBase
Files Vs DataBase
Dr. C.V. Suresh Babu
 
Data Models
Data ModelsData Models
Data Models
RituBhargava7
 
1. Introduction to DBMS
1. Introduction to DBMS1. Introduction to DBMS
1. Introduction to DBMS
koolkampus
 
Integrity Constraints
Integrity ConstraintsIntegrity Constraints
Integrity Constraints
Megha yadav
 
Data base management system
Data base management systemData base management system
Data base management system
ashirafzal1
 
Basic DBMS ppt
Basic DBMS pptBasic DBMS ppt
Basic DBMS ppt
dangwalrajendra888
 
basic structure of SQL FINAL.pptx
basic structure of SQL FINAL.pptxbasic structure of SQL FINAL.pptx
basic structure of SQL FINAL.pptx
Anusha sivakumar
 
Schema
SchemaSchema
Schema
Pragya Srivastava
 
Types dbms
Types dbmsTypes dbms
Types dbms
Avnish Shaw
 
SQL Views
SQL ViewsSQL Views
SQL Views
baabtra.com - No. 1 supplier of quality freshers
 
The Relational Database Model
The Relational Database ModelThe Relational Database Model
The Relational Database Model
Shishir Aryal
 
STRUCTURE OF SQL QUERIES
STRUCTURE OF SQL QUERIESSTRUCTURE OF SQL QUERIES
STRUCTURE OF SQL QUERIES
VENNILAV6
 
Database Management System Introduction
Database Management System IntroductionDatabase Management System Introduction
Database Management System Introduction
Smriti Jain
 
Relational Database Design
Relational Database DesignRelational Database Design
Relational Database Design
Archit Saxena
 
DBMS Keys
DBMS KeysDBMS Keys
DBMS Keys
Tarun Maheshwari
 
Dbms Introduction and Basics
Dbms Introduction and BasicsDbms Introduction and Basics
Dbms Introduction and Basics
SHIKHA GAUTAM
 
Data independence
Data independenceData independence
Data independence
Aashima Wadhwa
 
SQL Views
SQL ViewsSQL Views
SQL Views
Aaron Buma
 
Relational Data Model Introduction
Relational Data Model IntroductionRelational Data Model Introduction
Relational Data Model Introduction
Nishant Munjal
 

Viewers also liked (20)

Introduction to RDBMS
Introduction to RDBMSIntroduction to RDBMS
Introduction to RDBMS
Sarmad Ali
 
Rdbms
RdbmsRdbms
Rdbms
rdbms
 
Relational Database Management System
Relational Database Management SystemRelational Database Management System
Relational Database Management System
Free Open Source Software Technology Lab
 
Relational database management system (rdbms) i
Relational database management system (rdbms) iRelational database management system (rdbms) i
Relational database management system (rdbms) i
Ravinder Kamboj
 
RDBMS.ppt
RDBMS.pptRDBMS.ppt
RDBMS.ppt
Ketan Chaoji
 
Lecture 07 relational database management system
Lecture 07 relational database management systemLecture 07 relational database management system
Lecture 07 relational database management system
emailharmeet
 
Introduction to database
Introduction to databaseIntroduction to database
Introduction to database
Pongsakorn U-chupala
 
01 rdbms session01
01 rdbms session0101 rdbms session01
01 rdbms session01
Niit Care
 
Relational database management system
Relational database management systemRelational database management system
Relational database management system
Muhammad Bilal Tariq
 
Rdbms xp 01
Rdbms xp 01Rdbms xp 01
Rdbms xp 01
Niit Care
 
Relational databases
Relational databasesRelational databases
Relational databases
Fiddy Prasetiya
 
Raj mysql
Raj mysqlRaj mysql
Raj mysql
firstplanet
 
Bis Chapter3
Bis Chapter3Bis Chapter3
Bis Chapter3
Chun Hoi Lam
 
Access Ch4 Creating Reports And Forms (Jy)
Access Ch4   Creating Reports And Forms (Jy)Access Ch4   Creating Reports And Forms (Jy)
Access Ch4 Creating Reports And Forms (Jy)
Chun Hoi Lam
 
MySQL Best Practices - OTN
MySQL Best Practices - OTNMySQL Best Practices - OTN
MySQL Best Practices - OTN
Ronald Bradford
 
Relational Databases
Relational DatabasesRelational Databases
Relational Databases
Jason Hando
 
Comparing free software for spatial DBMSs
Comparing free software for spatial DBMSsComparing free software for spatial DBMSs
Comparing free software for spatial DBMSs
Smirnov Sergey
 
Chapter 7 relation database language
Chapter 7 relation database languageChapter 7 relation database language
Chapter 7 relation database language
Jafar Nesargi
 
Ch1
Ch1Ch1
Ch1
Jafar Nesargi
 
Chapter2
Chapter2Chapter2
Chapter2
Bahcesehir Uni
 
Introduction to RDBMS
Introduction to RDBMSIntroduction to RDBMS
Introduction to RDBMS
Sarmad Ali
 
Rdbms
RdbmsRdbms
Rdbms
rdbms
 
Relational database management system (rdbms) i
Relational database management system (rdbms) iRelational database management system (rdbms) i
Relational database management system (rdbms) i
Ravinder Kamboj
 
Lecture 07 relational database management system
Lecture 07 relational database management systemLecture 07 relational database management system
Lecture 07 relational database management system
emailharmeet
 
01 rdbms session01
01 rdbms session0101 rdbms session01
01 rdbms session01
Niit Care
 
Relational database management system
Relational database management systemRelational database management system
Relational database management system
Muhammad Bilal Tariq
 
Access Ch4 Creating Reports And Forms (Jy)
Access Ch4   Creating Reports And Forms (Jy)Access Ch4   Creating Reports And Forms (Jy)
Access Ch4 Creating Reports And Forms (Jy)
Chun Hoi Lam
 
MySQL Best Practices - OTN
MySQL Best Practices - OTNMySQL Best Practices - OTN
MySQL Best Practices - OTN
Ronald Bradford
 
Relational Databases
Relational DatabasesRelational Databases
Relational Databases
Jason Hando
 
Comparing free software for spatial DBMSs
Comparing free software for spatial DBMSsComparing free software for spatial DBMSs
Comparing free software for spatial DBMSs
Smirnov Sergey
 
Chapter 7 relation database language
Chapter 7 relation database languageChapter 7 relation database language
Chapter 7 relation database language
Jafar Nesargi
 
Ad

Similar to Relational Database Management System (20)

Sql introduction
Sql introductionSql introduction
Sql introduction
Bhavya Chawla
 
Data Base Management System.pdf
Data Base Management System.pdfData Base Management System.pdf
Data Base Management System.pdf
TENZING LHADON
 
SQL
SQLSQL
SQL
Devyani Chaudhari
 
demo2.ppt
demo2.pptdemo2.ppt
demo2.ppt
crazyvirtue
 
Complete first chapter rdbm 17332
Complete first chapter rdbm 17332Complete first chapter rdbm 17332
Complete first chapter rdbm 17332
Tushar Wagh
 
RDMS AND SQL
RDMS AND SQLRDMS AND SQL
RDMS AND SQL
milanmehta7
 
Relational Database Language.pptx
Relational Database Language.pptxRelational Database Language.pptx
Relational Database Language.pptx
Sheethal Aji Mani
 
SQL.pptx for the begineers and good know
SQL.pptx for the begineers and good knowSQL.pptx for the begineers and good know
SQL.pptx for the begineers and good know
PavithSingh
 
Unit I Database concepts - RDBMS & ORACLE
Unit I  Database concepts - RDBMS & ORACLEUnit I  Database concepts - RDBMS & ORACLE
Unit I Database concepts - RDBMS & ORACLE
DrkhanchanaR
 
DATABASE-1.pptx
DATABASE-1.pptxDATABASE-1.pptx
DATABASE-1.pptx
ManasRanjanRana4
 
database1.pdf
database1.pdfdatabase1.pdf
database1.pdf
prashanna13
 
SQL SERVER Training in Pune Slides
SQL SERVER Training in Pune SlidesSQL SERVER Training in Pune Slides
SQL SERVER Training in Pune Slides
enosislearningcom
 
Introduction to SQL.pptx
Introduction to SQL.pptxIntroduction to SQL.pptx
Introduction to SQL.pptx
InduVerma40
 
Presentation DBMS (1)
Presentation DBMS (1)Presentation DBMS (1)
Presentation DBMS (1)
Ali Raza
 
SQL Complete Tutorial. All Topics Covered
SQL Complete Tutorial. All Topics CoveredSQL Complete Tutorial. All Topics Covered
SQL Complete Tutorial. All Topics Covered
Danish Mehraj
 
xjtrutdctrd5454drxxresersestryugyufy6rythgfytfyt
xjtrutdctrd5454drxxresersestryugyufy6rythgfytfytxjtrutdctrd5454drxxresersestryugyufy6rythgfytfyt
xjtrutdctrd5454drxxresersestryugyufy6rythgfytfyt
WrushabhShirsat3
 
unit-ii.pptx
unit-ii.pptxunit-ii.pptx
unit-ii.pptx
NilamHonmane
 
Data Manipulation ppt. for BSIT students
Data Manipulation ppt. for BSIT studentsData Manipulation ppt. for BSIT students
Data Manipulation ppt. for BSIT students
julie4baxtii
 
Relational Database.pptx
Relational Database.pptxRelational Database.pptx
Relational Database.pptx
SubhamSarkar64
 
Data Modeling using Microsoft Access v 123
Data Modeling using Microsoft Access v 123Data Modeling using Microsoft Access v 123
Data Modeling using Microsoft Access v 123
draanandverma
 
Data Base Management System.pdf
Data Base Management System.pdfData Base Management System.pdf
Data Base Management System.pdf
TENZING LHADON
 
Complete first chapter rdbm 17332
Complete first chapter rdbm 17332Complete first chapter rdbm 17332
Complete first chapter rdbm 17332
Tushar Wagh
 
Relational Database Language.pptx
Relational Database Language.pptxRelational Database Language.pptx
Relational Database Language.pptx
Sheethal Aji Mani
 
SQL.pptx for the begineers and good know
SQL.pptx for the begineers and good knowSQL.pptx for the begineers and good know
SQL.pptx for the begineers and good know
PavithSingh
 
Unit I Database concepts - RDBMS & ORACLE
Unit I  Database concepts - RDBMS & ORACLEUnit I  Database concepts - RDBMS & ORACLE
Unit I Database concepts - RDBMS & ORACLE
DrkhanchanaR
 
SQL SERVER Training in Pune Slides
SQL SERVER Training in Pune SlidesSQL SERVER Training in Pune Slides
SQL SERVER Training in Pune Slides
enosislearningcom
 
Introduction to SQL.pptx
Introduction to SQL.pptxIntroduction to SQL.pptx
Introduction to SQL.pptx
InduVerma40
 
Presentation DBMS (1)
Presentation DBMS (1)Presentation DBMS (1)
Presentation DBMS (1)
Ali Raza
 
SQL Complete Tutorial. All Topics Covered
SQL Complete Tutorial. All Topics CoveredSQL Complete Tutorial. All Topics Covered
SQL Complete Tutorial. All Topics Covered
Danish Mehraj
 
xjtrutdctrd5454drxxresersestryugyufy6rythgfytfyt
xjtrutdctrd5454drxxresersestryugyufy6rythgfytfytxjtrutdctrd5454drxxresersestryugyufy6rythgfytfyt
xjtrutdctrd5454drxxresersestryugyufy6rythgfytfyt
WrushabhShirsat3
 
Data Manipulation ppt. for BSIT students
Data Manipulation ppt. for BSIT studentsData Manipulation ppt. for BSIT students
Data Manipulation ppt. for BSIT students
julie4baxtii
 
Relational Database.pptx
Relational Database.pptxRelational Database.pptx
Relational Database.pptx
SubhamSarkar64
 
Data Modeling using Microsoft Access v 123
Data Modeling using Microsoft Access v 123Data Modeling using Microsoft Access v 123
Data Modeling using Microsoft Access v 123
draanandverma
 
Ad

Recently uploaded (20)

Unit 4: Long term- Capital budgeting and its types
Unit 4: Long term- Capital budgeting and its typesUnit 4: Long term- Capital budgeting and its types
Unit 4: Long term- Capital budgeting and its types
bharath321164
 
Fundamentals of PR: Wk 4 - Strategic Communications
Fundamentals of PR: Wk 4 - Strategic CommunicationsFundamentals of PR: Wk 4 - Strategic Communications
Fundamentals of PR: Wk 4 - Strategic Communications
Jordan Williams
 
Odoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo SlidesOdoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo Slides
Celine George
 
LDMMIA Reiki Master Spring 2025 Mini Updates
LDMMIA Reiki Master Spring 2025 Mini UpdatesLDMMIA Reiki Master Spring 2025 Mini Updates
LDMMIA Reiki Master Spring 2025 Mini Updates
LDM Mia eStudios
 
Open Access: Revamping Library Learning Resources.
Open Access: Revamping Library Learning Resources.Open Access: Revamping Library Learning Resources.
Open Access: Revamping Library Learning Resources.
Rishi Bankim Chandra Evening College, Naihati, North 24 Parganas, West Bengal, India
 
Stein, Hunt, Green letter to Congress April 2025
Stein, Hunt, Green letter to Congress April 2025Stein, Hunt, Green letter to Congress April 2025
Stein, Hunt, Green letter to Congress April 2025
Mebane Rash
 
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - WorksheetCBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
Sritoma Majumder
 
Presentation of the MIPLM subject matter expert Erdem Kaya
Presentation of the MIPLM subject matter expert Erdem KayaPresentation of the MIPLM subject matter expert Erdem Kaya
Presentation of the MIPLM subject matter expert Erdem Kaya
MIPLM
 
Quality Contril Analysis of Containers.pdf
Quality Contril Analysis of Containers.pdfQuality Contril Analysis of Containers.pdf
Quality Contril Analysis of Containers.pdf
Dr. Bindiya Chauhan
 
Geography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjectsGeography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjects
ProfDrShaikhImran
 
High Performance Liquid Chromatography .pptx
High Performance Liquid Chromatography .pptxHigh Performance Liquid Chromatography .pptx
High Performance Liquid Chromatography .pptx
Ayush Srivastava
 
How to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
How to Customize Your Financial Reports & Tax Reports With Odoo 17 AccountingHow to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
How to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
Celine George
 
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar RabbiPresentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Md Shaifullar Rabbi
 
P-glycoprotein pamphlet: iteration 4 of 4 final
P-glycoprotein pamphlet: iteration 4 of 4 finalP-glycoprotein pamphlet: iteration 4 of 4 final
P-glycoprotein pamphlet: iteration 4 of 4 final
bs22n2s
 
One Hot encoding a revolution in Machine learning
One Hot encoding a revolution in Machine learningOne Hot encoding a revolution in Machine learning
One Hot encoding a revolution in Machine learning
momer9505
 
YSPH VMOC Special Report - Measles Outbreak Southwest US 4-26-2025.pptx
YSPH VMOC Special Report - Measles Outbreak  Southwest US 4-26-2025.pptxYSPH VMOC Special Report - Measles Outbreak  Southwest US 4-26-2025.pptx
YSPH VMOC Special Report - Measles Outbreak Southwest US 4-26-2025.pptx
Yale School of Public Health - The Virtual Medical Operations Center (VMOC)
 
Studying Drama: Definition, types and elements
Studying Drama: Definition, types and elementsStudying Drama: Definition, types and elements
Studying Drama: Definition, types and elements
AbdelFattahAdel2
 
Exploring-Substances-Acidic-Basic-and-Neutral.pdf
Exploring-Substances-Acidic-Basic-and-Neutral.pdfExploring-Substances-Acidic-Basic-and-Neutral.pdf
Exploring-Substances-Acidic-Basic-and-Neutral.pdf
Sandeep Swamy
 
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Library Association of Ireland
 
How to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of saleHow to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of sale
Celine George
 
Unit 4: Long term- Capital budgeting and its types
Unit 4: Long term- Capital budgeting and its typesUnit 4: Long term- Capital budgeting and its types
Unit 4: Long term- Capital budgeting and its types
bharath321164
 
Fundamentals of PR: Wk 4 - Strategic Communications
Fundamentals of PR: Wk 4 - Strategic CommunicationsFundamentals of PR: Wk 4 - Strategic Communications
Fundamentals of PR: Wk 4 - Strategic Communications
Jordan Williams
 
Odoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo SlidesOdoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo Slides
Celine George
 
LDMMIA Reiki Master Spring 2025 Mini Updates
LDMMIA Reiki Master Spring 2025 Mini UpdatesLDMMIA Reiki Master Spring 2025 Mini Updates
LDMMIA Reiki Master Spring 2025 Mini Updates
LDM Mia eStudios
 
Stein, Hunt, Green letter to Congress April 2025
Stein, Hunt, Green letter to Congress April 2025Stein, Hunt, Green letter to Congress April 2025
Stein, Hunt, Green letter to Congress April 2025
Mebane Rash
 
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - WorksheetCBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
Sritoma Majumder
 
Presentation of the MIPLM subject matter expert Erdem Kaya
Presentation of the MIPLM subject matter expert Erdem KayaPresentation of the MIPLM subject matter expert Erdem Kaya
Presentation of the MIPLM subject matter expert Erdem Kaya
MIPLM
 
Quality Contril Analysis of Containers.pdf
Quality Contril Analysis of Containers.pdfQuality Contril Analysis of Containers.pdf
Quality Contril Analysis of Containers.pdf
Dr. Bindiya Chauhan
 
Geography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjectsGeography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjects
ProfDrShaikhImran
 
High Performance Liquid Chromatography .pptx
High Performance Liquid Chromatography .pptxHigh Performance Liquid Chromatography .pptx
High Performance Liquid Chromatography .pptx
Ayush Srivastava
 
How to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
How to Customize Your Financial Reports & Tax Reports With Odoo 17 AccountingHow to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
How to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
Celine George
 
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar RabbiPresentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Md Shaifullar Rabbi
 
P-glycoprotein pamphlet: iteration 4 of 4 final
P-glycoprotein pamphlet: iteration 4 of 4 finalP-glycoprotein pamphlet: iteration 4 of 4 final
P-glycoprotein pamphlet: iteration 4 of 4 final
bs22n2s
 
One Hot encoding a revolution in Machine learning
One Hot encoding a revolution in Machine learningOne Hot encoding a revolution in Machine learning
One Hot encoding a revolution in Machine learning
momer9505
 
Studying Drama: Definition, types and elements
Studying Drama: Definition, types and elementsStudying Drama: Definition, types and elements
Studying Drama: Definition, types and elements
AbdelFattahAdel2
 
Exploring-Substances-Acidic-Basic-and-Neutral.pdf
Exploring-Substances-Acidic-Basic-and-Neutral.pdfExploring-Substances-Acidic-Basic-and-Neutral.pdf
Exploring-Substances-Acidic-Basic-and-Neutral.pdf
Sandeep Swamy
 
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Library Association of Ireland
 
How to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of saleHow to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of sale
Celine George
 

Relational Database Management System

  • 2. DATABASE MANAGEMENT SYSTEM • Database Management System – is a system software that allows users to specify the structure of a database with a systematic way to create, query and update data in the database. For Example: Limiting of access to database for specific users. • The database management system essentially serves as an interface between the database and end users or application programs, ensuring that data is consistently organized and remains easily accessible. • The DBMS manages three important things: the data, the database engine that allows data to be accessed, locked and modified -- and the database schema, which defines the database’s logical structure.
  • 3. DATA, SCHEMA, AND DATABASE • Data – is numerical, character or other symbols which can be recorded in a form for processing by a computer. For Example: Names and Addresses of employees in a company. • Schema – The schema is the structure of data, whereas the data are the facts. Schema basically indicates the rules which the data must obey. Such rules can be enforced by a database. For Example: Age limit of employees being hired in a company is between 18 – 90 years old. • Database – A database is a collection of related data arranged for searching quickly and efficiently.
  • 4. WHAT IS RDBMS? • RDBMS is a database management system based on relational model defined by E.F.Codd. • Data is stored in the form of rows and columns. The relations among tables are also stored in the form of the table. • RDBMS use the language known as SQL (Sequel) • SQL is a simple programming language used for accessing and managing data in relational databases. • Shares a common column in two or more tables (Primary Key and Foreign Key)
  • 5. FEATURES OF RDBMS • Provides data to be stored in tables • Persists data in the form of rows and columns • Provides primary key to uniquely identify the rows in a table • Provides a (view) virtual table creation in which sensitive data can be stored • Provides multi user accessibility that can be controlled by individual users • And it features four types of relationships in database
  • 6. RELATIONSHIPS IN DATABASE • One to One – One entity is associated with another entity. For Example: Each employee belong to one department. • One to Many – One entity is associated with many other entities. For Example: A company is associated with all working employees in one branch/office/country. • Many to One – Many entities are associated with only one entity. For Example: Many employees have one manager. • Many to Many – Many entities are associated with many other entities. For Example: Many employees associated with multiple assignments and multiple assignments are associated with multiple employees at the same time.
  • 7. RULES OF RDBMS • These rules are strictly implemented as part of the overall database design: 1. Each table has a unique name 2. Each table contains multiple rows 3. Each row in a table is unique 4. Every table has a key to uniquely identify rows 5. Each column in a table has a unique attribute name
  • 8. ELEMENTS OF RDBMS • There are four main database elements in a relational database: • Tables – Data collection objects also known as relation. • Tuple – Row of a relation which represents an instance of a relation • Attribute – named column of a relation • Queries – Inquiry about the stored data. • Forms – A predefined format to display or enter data • Reports – Printable version of database information
  • 9. SQL COMMANDS • There are various categories of sql commands that are used to handle the data. 1. Data Definition Language (DDL) commands, are used to create, and modify database objects. For Example: CREATE, ALTER, DROP 2. Data Manipulation Language (DML) commands are used to manipulate data. For Example: DELETE, INSERT, SELECT, UPDATE 3. Data Control Language (DCL) commands are used to control privileges in database. For Example: GRANT, REVOKE
  • 10. SQL CONSTRAINTS • Constraints are the rules enforced on data columns on table. • These are used to limit the type of data that can go into a table. • This ensures the accuracy and reliability of the data in the database. • Constraints could be column level or table level. • Column level constraints are applied only to one column where as table level constraints are applied to the whole table.
  • 11. COMMON SQL CONSTRAINTS • NOT NULL Constraint: Ensures that a column cannot have NULL value. • DEFAULT Constraint: Provides a default value for a column when none is specified. • UNIQUE Constraint: Ensures that all values in a column are different. • PRIMARY Key: Uniquely identified each rows/records in a database table. • FOREIGN Key: Uniquely identified a rows/records in any another database table. • CHECK Constraint: The CHECK constraint ensures that all values in a column satisfy certain conditions. • INDEX: Use to create and retrieve data from the database very quickly.
  • 12. DATA DEFINITION LANGUAGE SCRIPT CREATE TABLE EMP ( EMPNO NUMBER(4) PRIMARY KEY, ENAME VARCHAR2(15) NOT NULL, JOB VARCHAR2(10), MGR NUMBER(5), HIREDATE DATE DEFAULT (SYSDATE), SAL NUMBER(7,2), COMM NUMBER(7,2), DEPTNO NUMBER(4)) ;
  • 13. DATA MANIPULATION LANGUAGE SCRIPT INSERT INTO EMP VALUES (7782, 'CLARK' , 'MANAGER' , 7839 , '09-JUN-81' , 2450 , NULL , 10); INSERT INTO EMP VALUES (7788, 'SCOTT' , 'ANALYST' , 7566 , '19-APR-87' , 3000 , NULL , 20); INSERT INTO EMP VALUES (7839, 'KING' , 'PRESIDENT' , NULL , '17-NOV-81' , 5000 , 0, 10); INSERT INTO EMP VALUES (7844, 'TURNER' , 'SALESMAN' , 7698 , '08-SEP-81' , 1500 , 0 , 30); INSERT INTO EMP VALUES (7876, 'ADAMS' , 'CLERK' , 7788 , '23-MAY-87' , 1100 , NULL , 20); INSERT INTO EMP VALUES (7900, 'JAMES' , 'CLERK' , 7698 , '03-DEC-81' , 950 , NULL
  • 14. DATA CONTROL LANGUAGE SCRIPT • GRANT SELECT ON employee TO CLARK; • GRANT UPDATE, DELETE ON employee TO CLARK; • REVOKE SELECT ON employee FROM CLARK; • REVOKE UPDATE, DELETE ON employee FROM CLARK;
  • 15. PRIMARY KEY, FOREIGN KEY Primary Key • Primary Key is used for unique identification of each row in a table. The rule for primary key is that values have to be unique and not null. Foreign Key • Foreign Key identifies a column with primary key column of another table for storing data. The values of foreign key are exactly same as the values of primary keys of other tables.
  • 16. EXAMPLE OF PRIMARY AND FOREIGN KEY Patient Id Name D.o.B Gender Phone Doctor Id 125 Clark 04-05-1979 Male 123-456-7890 10 149 Dave 06-21-1984 Male 444-555-6666 20 160 Lisa 11-13-1991 Female 777-888-9999 10 199 Joe 07-02-1993 Male 111-222-0000 10 Doctor Id Doctor Room 10 Dr. Wilson 08 20 Dr. Frank 02 Primary Key Foreign Key
  • 17. DBMS VS RDBMS DBMS • Introduced in 1960s • Followed navigational modes for data storage • Data fetching is slower for large amount of data • Data redundancy is common in this model leading to difficulty in maintaining data • Examples are dBase, Microsoft Access, LibreOffice Base, FoxPro RDBMS • Introduced in 1970s • Uses relationship between tables using primary keys, foreign keys and indexes • Data fetching is faster because of its relational model • Keys and indexes are used in the tables to avoid redundancy • Example are SQL Server, Oracle, MySQL, MariaDB, SQLite
  • 18. RDBMS NORMALIZATION • Database normalization or simply normalization, is the process of organizing the data in a database • There are two main goal of normalization process: 1. Eliminating redundant data 2. Ensuring of data dependence • Both of these goals reduce the amount of space a database consumes and ensure that data is logically stored
  • 19. BENEFITS OF NORMALIZING • By doing normalization the process of searching and creating tables is faster • More needed tables can be derived for clear vision • Less redundant data and fewer null values will make the database more compact • The indexes of tables make data modification commands execution much faster • Normalization facilitates in reducing data modification anomalies
  • 20. SQL JOINS • SQL join is a instruction to a database to combine data from more than one table. • There are different type of joins, which have different rules for the results they create. • Types of Joins: 1. Inner join 2. Left outer join 3. Right outer join 4. Full outer join 5. Cross join 6. Self join
  • 21. INNER JOIN • The INNER JOIN or EQUI JOIN creates a new result table by combining column values of two tables (table1 and table2) based upon the join-predicate. • The query compares each row of table1 with each row of table2 to find all pairs of rows which satisfy the join-predicate. • INNER JOIN Script Syntax: SELECT table1.column1, table2.column2 FROM table1 INNER JOIN table2 ON table1.common_field = table2.common_field;
  • 22. LEFT OUTER JOIN • A left outer join, or left join, results in a set where all of the rows from the first, or left hand side, table are preserved. The rows from the second, or right hand side table only show up if they have a match with the rows from the first table. • LEFT OUTER JOIN Script Syntax: SELECT table1.column, table2.column FROM table1 LEFT OUTER JOIN table2 ON (table1.column = table2.column);
  • 23. RIGHT OUTER JOIN • A right outer join, or right join, is the same as a left join, except the roles are reversed. • All of the rows from the right hand side table show up in the result, but the rows from the table on the left are only there if they match the table on the right. • RIGHT OUTER JOIN Script Syntax: SELECT column_name(s) FROM table1 RIGHT OUTER JOIN table2 ON table1.column_name=table2.column_name;
  • 24. FULL OUTER JOIN • A full outer join, or just outer join, produces a result set with all of the rows of both tables, regardless of whether there are any matches. • FULL OUTER JOIN Script Sytax: SELECT column_name(s) FROM table1 FULL OUTER JOIN table2 ON table1.column_name=table2.column_name;
  • 25. CROSS JOIN • The CARTESIAN JOIN or CROSS JOIN returns the Cartesian product of the sets of records from the two or more joined tables. The row count of the result is equal to the number of rows in the first table times the number of rows in the second table. • CROSS JOIN Script Syntax: SELECT * FROM table1 CROSS JOIN table2;
  • 26. SELF JOIN • Joining a table to itself is known as self join. In simple words, it means using a same table twice. • SELF JOIN Script Syntax: SELECT a.column_name, b.column_name FROM table1 a, table1 b WHERE a.common_field = b.common_field;
  • 27. REFERENCES • http://docs.oracle.com/cd/E17952_01/index.html • http://www.sql-join.com/ • http://www.mytecbits.com/microsoft/sql-server/what-is-dbms-what-is-rdbms • http://www.tutorialspoint.com/sql/sql-rdbms-concepts.htm • http://databases.about.com/od/specificproducts/a/normalization.htm