18CSC303J DBMS Unit I
18CSC303J DBMS Unit I
Management Systems
Dr.B.Muruganantham
Associate Professor
Department of Computing Technology
SRM Institute of Science and Technology
Dr.B.Muruganantham
13-02-2022 1
Associate Professor / C.Tech
Outline of the Presentation
S-1 SLO-1 :What is Database Management System
SLO-2 :Advantage of DBMS over File Processing System
S-2 SLO-1 :Introduction and applications of DBMS
SLO-2 :Purpose of database system
S-3 SLO-1 & SLO2 :Views of data
S 4-5 SLO-1 & SLO-2 : Lab 1: SQL Data Definition Language Commands on sample exercise
S-6 SLO-1 & SLO-2 : Database system Architecture
S-7 SLO-1 & SLO-2 : Data Independence
S-8 SLO-1 & SLO-2 : The evolution of Data Models
S-9-10 SLO-1 & SLO-2 : Lab 2: SQL Data Manipulation Language Commands
S-11 SLO-1 & SLO-2 : Degrees of Data Abstraction
S-12 SLO-1 & SLO-2 : Database Users and DBA
S-13 SLO-1 & SLO-2 : Database Languages
S-14-15SLO-1 & SLO-2 : Lab 3: SQL Data Control Language Commands and Transaction control
commands to the sample exercises
Dr.B.Muruganantham
13-02-2022 2
Associate Professor / C.Tech
S-1 SLO-1 : What is Database Management System ?
Data : It is a RAW FACT ( It won’t give any meaning )
Ex: 10, RAM, etc.
Information : Which gives meaning for Data
Ex: id = 10 , name = ‘RAM’ Distance in miles = 200, etc.
Database : Collection of meaningful interrelated information
Ex: DB2,ORACLE, SQL Server, MySQL, etc.
Database Management System ( DBMS ) :
• Database Management Systems (DBMS) are software systems used to store, retrieve, and
run queries on data which is stored in a database.
• A DBMS serves as an interface between an end-user and a database, allowing users to
create, read, update, and delete data in the database.
• DBMS manage the data, the database engine, and the database schema, allowing for
data to be manipulated or extracted by users and other programs.
• This helps provide data security, data integrity, concurrency, and uniform data
administration procedures.
Dr.B.Muruganantham
13-02-2022 3
Associate Professor / C.Tech
S-1 SLO-2 : Advantage of DBMS over File Processing System
A File Processing / Management system is a DBMS that allows access to single files or tables at a time. In a File
System, data is directly stored in set of files.
It contains flat files that have no relation to other files (when only one table is stored in single file, then this file is
known as flat file).
✔ Data redundancy
✔ Data inconsistency
✔ Data Isolation
✔ Atomicity
✔ Data Security
✔Data Concurrency
✔Data Security
✔Data Privacy
✔Data Recovery
✔Flexible
Dr.B.Muruganantham Associate Professor /
13-02-2022 5
C.Tech
S-2 SLO-1 :Introduction and applications of DBMS
Dr.B.Muruganantham
13-02-2022 7
Associate Professor / C.Tech
S-2 SLO-1 :Introduction and applications of DBMS
Applications of DBMS
Domain Usage of DBMS
Managing customer information, account activities, payments,
Banking
deposits, loans, etc.
Maintain and Manage the Passenger Manifesto, reservations and
Transportation
schedule information.
Universities Student information, course registrations, colleges and grades.
It helps to keep call records, monthly bills, maintaining balances,
Telecommunication
etc.
For storing information about stock, sales, and purchases of
Finance
financial instruments like stocks and bonds.
Sales To store customer details , product details & sales information.
It is used for the management of supply chain and for tracking
Manufacturing
production of items. Inventories status in warehouses.
Social Media Manage the user accounts, Security, Data access
Dr.B.Muruganantham
13-02-2022 8
Associate Professor / C.Tech
S-2 SLO-2 :Purpose of database system
Purpose of DBMS:
The purpose of DBMS is to transform the following −
DATA
Purpose of DBMS:
The diagram given explains the process Information
as to how the transformation of data to
information to knowledge to action
happens respectively in the DBMS
knowledge
Action
( Processing)
Dr.B.Muruganantham
13-02-2022 10
Associate Professor / C.Tech
S-3 SLO-1 & SLO2 :Views of data
Data Abstraction
✔Data Abstraction is a process of hiding unwanted or irrelevant
details from the end user.
✔Data abstraction has different views and support in attaining data
independence which is used to enhance the security of data.
✔The database systems consist of complicated data structures and
relations.
Dr.B.Muruganantham
13-02-2022 11
Associate Professor / C.Tech
S-3 SLO-1 & SLO2 :Views of data
Levels of Abstraction
Logical level: describes data stored in database, and the relationships among
the data.
type student = record
student_reg_number : integer;
student_name : string;
student_degree : string;
customer_mobile : integer;
student_email : string
end;
View level: application programs hide details of data types. Views can also hide
information (such as an student’s mobile number /email) for security purposes.
Dr.B.Muruganantham
13-02-2022 12
Associate Professor / C.Tech
S-3 SLO-1 & SLO2 :Views of data
View of Data
View Level
Logical level
Physical
Level
Dr.B.Muruganantham
13-02-2022 13
Associate Professor / C.Tech
S-3 SLO-1 & SLO2 :Views of data
Dr.B.Muruganantham
13-02-2022 14
Associate Professor / C.Tech
S-3 SLO-1 & SLO2 :Views of data
Dr.B.Muruganantham
13-02-2022 15
Associate Professor / C.Tech
S-3 SLO-1 & SLO2 :Views of data
Data Models
• Data models is , a collection of tools for describing Data and its
relationships, Semantics and Constraints
• There are different types of data models are available in DBMS
• Relational model
• Entity-Relationship data model (mainly for database design)
• Object-based data models (Object-oriented and Object-
relational)
• Semi structured data model (XML)
• Other older models:
• Network model
• Hierarchical model
Dr.B.Muruganantham
13-02-2022 16
Associate Professor / C.Tech
S 4-5 SLO-1 & SLO-2 : Lab 1: SQL Data Definition Language Commands
on sample exercise
Structured Query Language ( SQL)
✔SQL became a standard of the American National Standards Institute (ANSI) in 1986, and
of the International Organization for Standardization (ISO) in 1987
✔Common language for all Databases
✔Fourth generation Language
✔Non procedural Language
✔Commands like an normal English statements
✔SQL is not a case sensitive language
✔All SQL statements should ended with terminator , the default terminator is semi-colon (;)
✔Based on the operation SQL divided into three categories
• DDL ( Data Definition Language)
• DML ( Data Manipulation Language)
• DCL ( Data Control Language)
Dr.B.Muruganantham
13-02-2022 17
Associate Professor / C.Tech
S 4-5 SLO-1 & SLO-2 : Lab 1: SQL Data Definition Language Commands
on sample exercise
✔ VARCHAR2
✔ NUMBER
✔ DATE
✔ RAW
✔ LONG
✔ CLOB
✔ BLOB , etc.,
Dr.B.Muruganantham
13-02-2022 18
Associate Professor / C.Tech
S 4-5 SLO-1 & SLO-2 : Lab 1: SQL Data Definition Language Commands
on sample exercise
Data Definition Language (DDL)
✔DDL relates only with base tables structure and it is no where relates with the information stored in
the table.
✔Note : All the DDL command statements are AUTO COMMIT Statements
• CREATE
• ALTER
• DROP
• TRUNCATE
Dr.B.Muruganantham
13-02-2022 19
Associate Professor / C.Tech
S 4-5 SLO-1 & SLO-2 : Lab 1: SQL Data Definition Language Commands
on sample exercise
CREATE COMMAND
Used to create a new object / schema with a defined structure
Syntax : CREATE TABLE table_name (
column1 datatype,
column2 datatype,
column3 datatype,
....
);
Example :
CREATE TABLE EMP
(EMPNO NUMBER(4) NOT NULL, ENAME VARCHAR2(10), JOB VARCHAR2(9),
MGR NUMBER(4), HIREDATE DATE, SAL NUMBER(7, 2), COMM NUMBER(7, 2),
DEPTNO NUMBER(2));
Dr.B.Muruganantham
13-02-2022 20
Associate Professor / C.Tech
S 4-5 SLO-1 & SLO-2 : Lab 1: SQL Data Definition Language Commands
on sample exercise
ALTER COMMAND
Dr.B.Muruganantham
13-02-2022 22
Associate Professor / C.Tech
S 4-5 SLO-1 & SLO-2 : Lab 1: SQL Data Definition Language Commands
on sample exercise
ALTER COMMAND
Example :
Dr.B.Muruganantham
13-02-2022 23
Associate Professor / C.Tech
S 4-5 SLO-1 & SLO-2 : Lab 1: SQL Data Definition Language Commands
on sample exercise
DROP COMMAND
It is used to remove the base table with records (information) from
database permanently.
Syntax:
Example:
Dr.B.Muruganantham
13-02-2022 24
Associate Professor / C.Tech
S 4-5 SLO-1 & SLO-2 : Lab 1: SQL Data Definition Language Commands
on sample exercise
TRUNCATE COMMAND
Truncate command used to delete the records (information) from the
base table permanently and keeps the structure of the base table alone
Syntax:
Example:
Dr.B.Muruganantham
13-02-2022 25
Associate Professor / C.Tech
S-6 SLO-1 & SLO-2 : DATABASE SYSTEM ARCHITECTURE
There are four types users
accessing / managing the database
✔ Naïve Users
✔ Application Programmers
✔ Sophisticated Users
✔ Database Administrators
The database system is divided into
three components:
✔ Query Processor
✔ Storage Manager
✔ Disk Storage.
Dr.B.Muruganantham
13-02-2022 26
Associate Professor / C.Tech
S-6 SLO-1 & SLO-2 : DATABASE SYSTEM ARCHITECTURE
Query Processor :
It interprets the requests (queries) from user(s) via an application
program /interface into instructions.
It also executes the user request which is received from the DML
compiler.
Query Processor contains the following components
Name of the Component Purpose of the component
DML Compiler It processes the DML statements into low level
instruction
DDL Interpreter It processes the DDL statements into a set of table
containing meta data
Embedded DML Pre-compiler It processes DML statements embedded in an application
program into procedural calls.
Query Optimizer It executes the instruction generated by DML Compiler.
Dr.B.Muruganantham
13-02-2022 27
Associate Professor / C.Tech
S-6 SLO-1 & SLO-2 : DATABASE SYSTEM ARCHITECTURE
Storage Manager :
✔It is an interface between the information stored in the database an
and the requests ( queries )
Dr.B.Muruganantham
13-02-2022 28
Associate Professor / C.Tech
S-6 SLO-1 & SLO-2 : DATABASE SYSTEM ARCHITECTURE
Storage Manager contains the following components
Components Purpose of the Components
Authorization It ensures role-based access control, i.e,. checks whether the particular
Manager person is privileged to perform the requested operation or not.
Integrity Manager It checks the integrity constraints when the database is modified.
Transaction Manager It controls concurrent access by performing the operations in a scheduled
way that it receives the transaction. Thus, it ensures that the database
remains in the consistent state before and after the execution of a
transaction.
File Manager It manages the file space and the data structure used to represent
information in the database.
Buffer Manager It is responsible for cache memory and the transfer of data between the
secondary storage and main memory.
Dr.B.Muruganantham
13-02-2022 29
Associate Professor / C.Tech
S-6 SLO-1 & SLO-2 : DATABASE SYSTEM ARCHITECTURE
Disk Storage
✔Used to store all the information
✔It contains the following components
Dr.B.Muruganantham
13-02-2022 30
Associate Professor / C.Tech
S-7 SLO-1 & SLO-2 : Data Independence
✔Data Independence is an important property of DBMS and also an advantage.
Dr.B.Muruganantham
13-02-2022 31
Associate Professor / C.Tech
S-7 SLO-1 & SLO-2 : Data Independence
Dr.B.Muruganantham
13-02-2022 32
Associate Professor / C.Tech
S-7 SLO-1 & SLO-2 : Data Independence
Dr.B.Muruganantham
13-02-2022 33
Associate Professor / C.Tech
S-7 SLO-1 & SLO-2 : Data Independence
It is defined as to make the changes in the structure of the logical level / view
level of DBMS without affecting the physical / low level.
Dr.B.Muruganantham
13-02-2022 34
Associate Professor / C.Tech
S-7 SLO-1 & SLO-2 : Data Independence
Difference between physical data independence and logical data independence
Dr.B.Muruganantham
13-02-2022 35
Associate Professor / C.Tech
S-8 SLO-1 & SLO-2 : The evolution of Data Models
✔Hierarchical
✔Network
✔Entity relationship
✔Relational
✔Object oriented
Dr.B.Muruganantham
13-02-2022 36
Associate Professor / C.Tech
S-8 SLO-1 & SLO-2 : The evolution of Data Models
Hierarchical Model
✔ The first and fore most model of the DBMS.
✔ This model organizes the data in the hierarchical tree structure.
✔ This model is easy to understand with real time examples site map of a website
CLOTHES
MEN WOMEN
Dr.B.Muruganantham
13-02-2022 37
Associate Professor / C.Tech
S-8 SLO-1 & SLO-2 : The evolution of Data Models
Features of a Hierarchical Model
✔ One-to-many relationship:
✔ Parent-Child Relationship
✔ Deletion Problem:
✔ Pointers
✔ Complexity
✔ Parent mode deleted automatically child node will be deleted
Dr.B.Muruganantham
13-02-2022 38
Associate Professor / C.Tech
S-8 SLO-1 & SLO-2 : The evolution of Data Models
Network Model
✔ Network model is an extension of hierarchical model.
✔ This model was recommended as the best before relationship model.
✔ Same like hierarchical model, the only difference between these two models are a
record can have more than one parent
✔ For Example consider the following diagram a student entity has more than one
parent
COLLEGE
DEPARTMENT LIBRARY
STUDENT
Dr.B.Muruganantham
13-02-2022 39
Associate Professor / C.Tech
S-8 SLO-1 & SLO-2 : The evolution of Data Models
✔ More paths
Dr.B.Muruganantham
13-02-2022 40
Associate Professor / C.Tech
S-8 SLO-1 & SLO-2 : The evolution of Data Models
1. Entities
2. Attributes
3. Relationships
Dr.B.Muruganantham
13-02-2022 41
Associate Professor / C.Tech
S-8 SLO-1 & SLO-2 : The evolution of Data Models
Example for ER Diagram ( Faculty and Department entity set)
Dept_ID
Faculty_Id Faculty_Name
Works
Faculty Department
for
Phone_ No
Salary Dept_Location
Dept_Name
Date_of_ Birth
Dr.B.Muruganantham
13-02-2022 42
Associate Professor / C.Tech
S-8 SLO-1 & SLO-2 : The evolution of Data Models
Dr.B.Muruganantham
13-02-2022 43
Associate Professor / C.Tech
S-8 SLO-1 & SLO-2 : The evolution of Data Models
Features of ER Model
✔ Graphical representation
✔ Visualization
✔ Good Database design (Widely used)
Advantages of ER Model
✔ Very Simple
✔ Better communication
✔ Easy to convert to any model
Disadvantage of ER Model
✔ No industry standard
✔ Hidden information
Dr.B.Muruganantham
13-02-2022 44
Associate Professor / C.Tech
S-8 SLO-1 & SLO-2 : The evolution of Data Models
Relational Model
✔ Widely used model
✔ Data are represented as row-wise and column-wise ( 2 Dimensional Array)
Example : EMP (Employee) Table
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
Dr.B.Muruganantham
13-02-2022 45
Associate Professor / C.Tech
S-8 SLO-1 & SLO-2 : The evolution of Data Models
Relational Model
✔Each row is known as RECORD or TUPLE
Table – EMP
Dr.B.Muruganantham
13-02-2022 46
Associate Professor / C.Tech
S-8 SLO-1 & SLO-2 : The evolution of Data Models
✔ Attributes
✔ Scalable
✔ Structured format
✔ Isolation
Dr.B.Muruganantham
13-02-2022 47
Associate Professor / C.Tech
S-8 SLO-1 & SLO-2 : The evolution of Data Models
Object Oriented Model
✔ The real- time problems are easily represented through
object-oriented data model which is an OBJECT.
✔ In this Model, the data and its relationship present in the single structure
✔ Complex data like images, audio, videos can be stored easily
✔ Objects connected through links using common attribute(s)
✔ Example : Three Objects Faculty, Department and Campus linked using common attribute
FACULTY
DEPARTMENT CAMPUS
ATTRIBUTES
Faculty_ID ATTRIBUTES ATTRIBUTES
Faculty_Name Dept_ID Campus_ID
Faculty_Designation Dept_Name Campus_Name
Faculty _Sal Dept_Location Campus_Location
Faculty_DOB Campus_ID
Faculty_MobileNo Methods
Methods New Campus Creation
Dept_ID Department Change Location Change
Methods Campus Change
Teaching_Subjects
Designation_Change
Dr.B.Muruganantham
13-02-2022 48
Associate Professor / C.Tech
S-9-10 SLO-1 & SLO-2 :
Lab 2: SQL Data Manipulation Language Commands
Consider EMP table for DML operations
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPT
NO
7369 SMITH CLERK 7902 17-DEC-80 800 - 20
7499 ALLEN SALESMAN 7698 20-FEB-81 1600 300 30
7521 WARD SALESMAN 7698 22-FEB-81 1250 500 30
7566 JONES MANAGER 7839 02-APR-81 2975 - 20
7654 MARTIN SALESMAN 7698 28-SEP-81 1250 1400 30
7698 BLAKE MANAGER 7839 01-MAY-81 2850 - 30
7782 CLARK MANAGER 7839 09-JUN-81 2450 - 10
7788 SCOTT ANALYST 7566 09-DEC-82 3000 - 20
7839 KING PRESIDENT - 17-NOV-81 5000 - 10
7844 TURNER SALESMAN 7698 08-SEP-81 1500 0 30
7876 ADAMS CLERK 7788 12-JAN-83 1100 - 20
7900 JAMES CLERK 7698 03-DEC-81 950 - 30
7902 FORD ANALYST 7566 03-DEC-81 3000 - 20
7934 MILLER CLERK 7782 23-JAN-82 1300 - 10
Dr.B.Muruganantham
13-02-2022 49
Associate Professor / C.Tech
S-9-10 SLO-1 & SLO-2 :
Lab 2: SQL Data Manipulation Language Commands
DML Commands are relates only with base table information ( value in an
attribute)
There are four commands in DML:
1. INSERT
2. UPDATE
3. DELETE
4. SELECT
✔Where clause ( Conditional retrieval )
Dr.B.Muruganantham
13-02-2022 50
Associate Professor / C.Tech
S-9-10 SLO-1 & SLO-2 :
Lab 2: SQL Data Manipulation Language Commands
INSERT COMMAND
✔ It relates only with new records.
✔ Must follow the order of the column specified in the query statement
Dr.B.Muruganantham
13-02-2022 51
Associate Professor / C.Tech
S-9-10 SLO-1 & SLO-2 :
Lab 2: SQL Data Manipulation Language Commands
INSERT COMMAND
Syntax:
Dr.B.Muruganantham
13-02-2022 52
Associate Professor / C.Tech
S-9-10 SLO-1 & SLO-2 :
Lab 2: SQL Data Manipulation Language Commands
INSERT COMMAND
INSERT INTO EMP VALUES (7369, 'SMITH', 'CLERK', 7902, '17-12-1980‘, 800, NULL, 20);
(OR)
INSERT INTO EMP (EMPNO,ENAME,JOB,MGR,HIREDATE,SAL,COMM,DEPTNO)
VALUES (7369, 'SMITH', 'CLERK', 7902, '17-12-1980', 800, NULL, 20);
The input value will be store in the appropriate field using bind
variable ( :OLD and :NEW)
Dr.B.Muruganantham
13-02-2022 54
Associate Professor / C.Tech
S-9-10 SLO-1 & SLO-2 :
Lab 2: SQL Data Manipulation Language Commands
Update command
✔ It works with only existing records
✔ It works only column wise
✔ It is used to modify the column values ( increase / decrease / change)
Syntax
UPDATE <table_name> set <field_name> = value [ where <condition>];
Note : Update command without where condition will update all the records.
Update command with where condition will update the records which are satisfy the
condition
Example 1:
UPDATE emp set comm = 2000 ; ( Update all the records in EMP table )
Example 2 :
Update emp set comm = 1000 where empno = 7369;
(Update the records having the empno as 7369)
Dr.B.Muruganantham
13-02-2022 55
Associate Professor / C.Tech
S-9-10 SLO-1 & SLO-2 :
Lab 2: SQL Data Manipulation Language Commands
Delete command
✔ It works only with existing records
✔ It works only with row wise
✔ It not possible to delete a single column in a row
Syntax
DELETE from <table_name> [ where <condition>];
Note : Delete command with out where condition will delete all the records in the table.
Delete command with where condition will delete the selected records which are
satisfy the condition.
Example 1: DELETE from emp; ( All records will be deleted from emp )
Example 2: DELETE from emp where empno = 7369;
( Those records holding the value in the field empno as 7369 will be deleted )
Dr.B.Muruganantham
13-02-2022 56
Associate Professor / C.Tech
S-9-10 SLO-1 & SLO-2 :
Lab 2: SQL Data Manipulation Language Commands
SELECT COMMAND
✔Works with existing records
Dr.B.Muruganantham
13-02-2022 57
Associate Professor / C.Tech
S-9-10 SLO-1 & SLO-2 :
Lab 2: SQL Data Manipulation Language Commands
SELECT COMMAND
Syntax
SELECT column_list FROM table-name
[WHERE Clause]
[GROUP BY clause]
[HAVING clause]
[ORDER BY clause];
NOTE : To retrieve all the column from the table ‘ * ’ symbol can be
used instead of specifying the column_list.
Dr.B.Muruganantham
13-02-2022 58
Associate Professor / C.Tech
S-9-10 SLO-1 & SLO-2 :
Lab 2: SQL Data Manipulation Language Commands
SELECT COMMAND
Example 1: To retrieve all the columns and rows from emp table
SELECT * from emp; ( ‘*’ stands from all columns and rows )
Example 3: To retrieve the records from emp table which record holds the salary value greater
than 1000;
SELECT * from emp WHERE sal> 1000;
Example 4: To retrieve the columns empno and ename from emp table which records holds the
value as CLERK in job column.
SELECT empno, ename from emp WHERE job = ‘CLERK’
Dr.B.Muruganantham
13-02-2022 59
Associate Professor / C.Tech
S-9-10 SLO-1 & SLO-2 :
Lab 2: SQL Data Manipulation Language Commands
SELECT COMMAND
Select command with order by clause
Example 5 : To retrieve the records from emp table in ascending order
using empno
SELECT * from emp order by empno asc;
(OR)
SELECT * from emp order by empno;
Example 6: To retrieve the records from emp table in ascending order
using job and empno
SELECT * from emp order by job,empno asc;
(OR)
SELECT * from emp order by job,empno;
NOTE : Ascending order is default condition, no need to specify
Dr.B.Muruganantham
13-02-2022 60
Associate Professor / C.Tech
S-9-10 SLO-1 & SLO-2 :
Lab 2: SQL Data Manipulation Language Commands
SELECT COMMAND
Select command with order by clause
Example 7 : To retrieve the records from emp table in descending order using empno.
SELECT * from emp order by empno desc;
Example 8: To retrieve the records from emp table in descending order using job and
empno
SELECT * from emp order by job desc,empno desc;
Example 8: To retrieve the records from emp table in ascending order using job and
descending order empno
SELECT * from emp order by job asc,empno desc;
Dr.B.Muruganantham
13-02-2022 61
Associate Professor / C.Tech
S-9-10 SLO-1 & SLO-2 :
Lab 2: SQL Data Manipulation Language Commands
SELECT COMMAND
Select command with group by clause
Example 9: To retrieve the different jobs from emp table
SELECT job from emp group by job;
Example 10: To retrieve the different jobs and its average salary from emp table
SELECT job, avg(sal) from emp group by job;
Dr.B.Muruganantham
13-02-2022 62
Associate Professor / C.Tech
S-11 SLO-1 & SLO-2 : Degrees of Data Abstraction
Reference : https://databasemanagement.fandom.com/wiki/Degrees_of_Abstraction
Dr.B.Muruganantham
13-02-2022 63
Associate Professor / C.Tech
S-11 SLO-1 & SLO-2 : Degrees of Data Abstraction
✔ The External Model is the end users' view of the data. The end users view of data
usually applies to their specific business needs and those of their organizational
unit.
✔ The Conceptual Model is the database as seen by the specific DBMS. What sets
the internal model apart from the external and conceptual is its reliance on its
software platform.
✔ The goal in designing the internal model is to achieve logical independence, where
the
internal model can be changed without affecting conceptual model.
Reference : https://databasemanagement.fandom.com/wiki/Degrees_of_Abstraction
Dr.B.Muruganantham
13-02-2022 64
Associate Professor / C.Tech
S-11 SLO-1 & SLO-2 : Degrees of Data Abstraction
✔ The Physical Model is the final and lowest level of abstraction. This is the model
which describe such implementation level design as how the data is stored on
media and what media to use. This level of abstraction is reliant on software and
hardware.
Note:
▪ If the rules established by the ANSI/SPARC are followed, the database is
easily scalable and upgradeable.
▪ A common need is for the ease of upgradability in the physical model.
▪ As technology improves and as the database grows and needs more
processing power and space it is important to be able to upgrade the
hardware without worrying about needing to redesign parts or the entire
database.
Reference : https://databasemanagement.fandom.com/wiki/Degrees_of_Abstraction
Dr.B.Muruganantham
13-02-2022 65
Associate Professor / C.Tech
S-12 SLO-1 & SLO-2 : Database Users and DBA
Database Users
✔Naive Users
✔Application Programmers
✔Sophisticated Users
✔Native Users
✔Specialized Users
✔Stand-alone Users
Dr.B.Muruganantham
13-02-2022 66
Associate Professor / C.Tech
S-12 SLO-1 & SLO-2 : Database Users and DBA
Naive Users
✔ Those who don’t have any knowledge about DBMS
✔ Use DBMS applications frequently
✔ Mostly using the internet browser as an interface to access the database
✔ They don’t have any privileges to modify the database, simply use the application
✔ Example : Railway booking users, Clerks in bank accessing database
Application Programmers
✔ Users who develop DBMS applications.
✔ They are backend programmers
✔ Programs can be written in any programming languages like C++, JAVA, Python, PHP
Dr.B.Muruganantham
13-02-2022 67
Associate Professor / C.Tech
S-12 SLO-1 & SLO-2 : Database Users and DBA
Sophisticated Users
✔ Having knowledge about database and DBMS
✔ They can create their own applications based on requirements
✔ They don’t write codes in any programming languages, but able to manage using queries
✔ Example : Business Analyst, Researchers
Native Users
✔ These are the users, who use the existing database applications
✔ They don’t write any codes or queries
✔ Example: Library Management Systems, Inventory Control Systems
Dr.B.Muruganantham
13-02-2022 68
Associate Professor / C.Tech
S-12 SLO-1 & SLO-2 : Database Users and DBA
Specialized Users
✔ These are also sophisticated users, but they write special database application
programs.
✔ They are the developers who develop the complex programs to the requirement.
Stand-alone Users
✔ These users will have a stand-alone database for their personal use.
✔ These kinds of the database will have readymade database packages
which will have menus and graphical interfaces.
Dr.B.Muruganantham
13-02-2022 69
Associate Professor / C.Tech
S-12 SLO-1 & SLO-2 : Database Users and DBA
Dr.B.Muruganantham
13-02-2022 70
Associate Professor / C.Tech
S-13 SLO-1 & SLO-2 : Database Languages
Dr.B.Muruganantham
13-02-2022 71
Associate Professor / C.Tech
S-13 SLO-1 & SLO-2 : Database Languages
✔ Can specify the storage structure and access methods used by the database
system by a set of statements in a special type of DDL called a data storage and
definition language.
Dr.B.Muruganantham
13-02-2022 72
Associate Professor / C.Tech
S-13 SLO-1 & SLO-2 : Database Languages
Data Definition Language (DDL)
Different types of constraints
✔Domain Constraints
• Data types , Not Null, Check ,Unique, Primary key
✔Referential Integrity constraints
• Foreign key
✔Assertions
• Any condition that the database must satisfy.
• Domain and Referential Integrity constraints are special forms of assertion.
✔Authorization
• User Authorization
• Read Authorization
• Insert Authorization
• Update Authorization
• Delete Authorization
Note : The output of the DDL will be stored in Data Dictionary which contains all the details
about the data, like meta-data
Dr.B.Muruganantham
13-02-2022 73
Associate Professor / C.Tech
S-13 SLO-1 & SLO-2 : Database Languages
Data Manipulation Language
✔ Enables users to access or manipulate data as organized by the
appropriate data model.
✔ The followings are the different types of access
• Procedural DMLs require a user to specify what data are needed and how to
get those data.
✔Used to give / get back / control the privileges of an object by the owner
on <OBJECT_NAME> to <USER_NAME>;
REVOKE : To get back all the privileges from the user who has been granted
Dr.B.Muruganantham
13-02-2022 76
Associate Professor / C.Tech