0% found this document useful (0 votes)
3 views

DBMS Module 3 (1)

The document discusses key concepts in database management systems (DBMS), including data abstraction levels (physical, logical, and view), various database languages (DDL, DML, DCL, TCL), and the roles of different database users and administrators. It highlights the importance of data abstraction for security and user accessibility, as well as the functions of the query processor and storage manager. Additionally, it introduces the Entity Relationship Model (ER Model) for database design and its components.

Uploaded by

naifnahdi7
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

DBMS Module 3 (1)

The document discusses key concepts in database management systems (DBMS), including data abstraction levels (physical, logical, and view), various database languages (DDL, DML, DCL, TCL), and the roles of different database users and administrators. It highlights the importance of data abstraction for security and user accessibility, as well as the functions of the query processor and storage manager. Additionally, it introduces the Entity Relationship Model (ER Model) for database design and its components.

Uploaded by

naifnahdi7
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 27

Database languages and Database design

7 Sessions
Data Abstraction
Data Abstraction

 Data Abstraction is one of the most important concepts in DBMS. Data


abstraction is the process of hiding unwanted and irrelevant details
from the end user.

 It helps to store information in such a way that the end user can access
data which is necessary, the user will not be able to see what data is
stored or how it is stored in a database.

 Data abstraction helps to keep data secure from unauthorized access


and it hides all the implementation details.
Physical Level

 It is the lowest level of data abstraction which defines how data is stored
in database .

 It defines data structures used to store data and methods to access data in
database.

 It is very complex to understand and hence kept hidden from user.

 Database administrator decides how and where to store the data in


database.
Logical Level

 It is intermediate level present next to physical level. It defines what


data is present in database and their relationships between them .

 It is less complex as compared to physical level.

 Programmers generally work at this level and depending on data,


structure of tables, relationships and their constraints is decided at this
level.
View Level

 It is the highest level in abstraction.

 There are different levels of views and each view defines only a part of
whole data required to user.

 This level defines many views of same database for simplification of


view to user.

 This is the highest level and easiest to understand for user.


Database Languages
Data Definition Language (DDL)

 Data definition language (DDL) creates the framework of the database


by specifying the database schema, which is the structure that
represents the organization of data.

 Its common uses include the creation and alteration of tables, files,
indexes and columns within the database.

 This language also allows users to rename or drop the existing database
or its components.
Data Manipulation Language (DML)

 Data manipulation language (DML) provides operations that handle


user requests, offering a way to access and manipulate the data that
users store within a database.

 Its common functions include inserting, updating and retrieving data


from the database.
Data Control Language (DCL)

 Data control language (DCL) controls access to the data that users
store within a database.

 Essentially, this language controls the rights and permissions of the


database system. It allows users to grant or revoke privileges to the
database.
Transaction Control Language (TCL)

 Transaction control language (TCL) manages the transactions within a


database.

 Transactions group a set of related tasks into a single, executable task.

 All the tasks must succeed in order for the transaction to work.
Common Commands
Database Architecture

USERS

QUERY PROCESSOR

STORAGE MANAGER

DATA
Database Users

NAIVE USERS APPLICATION SOPHISTICATED DATABASE


PROGRAMMERS USERS ADMINISTRATORS

USE WRITES USE USE

APPLICATION APPLICATION QUERY TOOLS ADMIN TOOLS


INTERFACES PROGRAMS
Database Users

Naive Users
 Naive Users are the unsophisticated who don’t have any DBMS knowledge
but they frequently use the database applications in their daily life to get the
desired results.

Sophisticated Users
 Sophisticated users can be engineers, scientists, business analyst, who are
familiar with the database. They can develop their own database applications
according to their requirement. They don’t write the program code but they
interact the database by writing SQL queries directly through the query
processor.
Database Users

Application Programmers
 Application Programmers also referred as Software Engineers, are the back-
end programmers who writes the code for the application programs. They are
the computer professionals. These programs could be written in Programming
languages such as Visual Basic, Developer, C, FORTRAN, COBOL etc.

Database Administrator (DBA)


 A Database Administrator (DBA) is a person/team who defines the schema
and also controls the 3 levels of the database. DBA is also responsible for
providing security to the database and he allows only authorized users to
access/modify the database.
Role of the DBA

 Creating and maintaining database standards and policies.


 Supporting database design, creation, and testing activities.
 Managing the database availability and performance.
 Administering database objects to achieve optimum utilization.
 Performing database housekeeping, such as tuning, indexing, etc.
 Monitoring usage, transaction volumes, response times, concurrency levels, etc.
 Implementing security measures and frameworks, while ensuring compliance.
 Identifying, reporting, and managing database security issues, audit trails, and
forensics.
 Designing database backup, archiving, and storage strategy.
 Installing upgrades and patches.
Query Processor
Query Processor

 A DML compiler converts Data Manipulation Language (DML)


instructions into Machine Language. DML is a computer language that
allows users to add, modify, and delete data in a database.

 A Data Definition Language (DDL) interpreter interprets DDL


statements and records the generated statements in a metadata table.

 A query evaluation engine processes and executes queries against a


database or dataset. It interprets queries, optimizes them for efficiency,
and performs data retrieval or manipulation
Storage Manager

FILE MANAGER BUFFER MANAGER AUTHORIZATION TRANSACTION


MANAGER MANAGER
Storage Manager

 Authorization and integrity manager: Validates the users who want to access the data and
tests for integrity constraints.

 Transaction manager: Ensures that the database remains in consistent despite of system
failures and concurrent transaction execution proceeds without conflicting.

 File manager: Manages allocation of space on disk storage and representation of the
information on disk.

 Buffer manager: Manages the fetching of data from disk storage into main memory. The
buffer manager also decides what data to cache in main memory. Buffer manager is a crucial
part of database system.
Data

 A data dictionary in a database management system (DBMS) helps


organize data, prevents redundancy, and provides information about
database tables. It also helps ensure data consistency and quality, and
makes it easier to share data.
Entity Relationship Model (ER Model)

 The Entity Relationship Model is a model for identifying entities (like


student, car or company) to be represented in the database and
representation of how those entities are related.
 The ER data model specifies enterprise schema that represents the
overall logical structure of a database graphically.
 ER diagrams represent the E-R model in a database, making them easy
to convert into relations (tables).
 ER diagrams provide the purpose of real-world modeling of objects
which makes them intently useful.
ER Model Building blocks

 Rectangles represent Entities in the ER Model.


 Ellipses represent Attributes in the ER Model.
 Diamonds represent Relationships among Entities.
 Lines represent attributes to entities and
entity sets with other relationship types.
 Double Ellipses represent Multi-Valued Attributes.
 Double Rectangle represents a Weak Entity.
Drawing an ER Model

 Identify entities: Identify all the entities in the database and label them
 Add attributes: Add attributes to each entity
 Identify relationships: Identify how the entities are related
 Connect entities: Connect the entities with a line and a diamond in the
middle to illustrate the relationship
 Remove redundant entities: Remove any redundant entities or
relationships
 Label relationships: Label the relationships with a brief description of
how they are related
Example

You might also like