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

Module-1

The document provides an introduction to Database Management Systems (DBMS) covering key concepts such as data independence, three-schema architecture, and various database components and users. It outlines the types of data languages (DDL, DML, DCL, TCL) and their functions, as well as the differences between centralized and client/server architectures. Additionally, it classifies database users and describes their roles, particularly focusing on the responsibilities of the Database Administrator (DBA).
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Module-1

The document provides an introduction to Database Management Systems (DBMS) covering key concepts such as data independence, three-schema architecture, and various database components and users. It outlines the types of data languages (DDL, DML, DCL, TCL) and their functions, as well as the differences between centralized and client/server architectures. Additionally, it classifies database users and describes their roles, particularly focusing on the responsibilities of the Database Administrator (DBA).
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 39

DATABASE MANAGEMENT SYSTEMS

COURSE CODE: CSE-2007


MODULE – 1
(Introduction to DBMS and Conceptual data modelling)

By:
Dr. Nagendra Panini Challa
Assistant Professor, Senior Grade 2
SCOPE, VIT-AP University, India
AGENDA
 Introduction and Motivation
 Data independence
 Three schema architecture
 Centralized and Client/Server architectures
 Database components, Database users
 Entity Types, Entity Sets, Attributes, Entity
Type (Strong and Weak)
 Relationship Types, Relationship Sets,
Roles
 Structural Constraints
 ER diagram construction

Database Management Systems (DBMS), SCOPE, VIT-AP University, India 02/03/2025 2


INTRODUCTION
 Database is a collection of interrelated data which helps in the efficient
retrieval, insertion, and deletion of data from the database and organizes
the data in the form of tables, views, schemas, reports, etc.
 For Example, a university database organizes the data about students,
faculty, admin staff, etc. which helps in the efficient retrieval, insertion, and
deletion of data from it.
There are four types of Data Languages
 Data Definition Language (DDL)
 Data Manipulation Language(DML)
 Data Control Language(DCL)
 Transactional Control Language(TCL)

Database Management Systems (DBMS), SCOPE, VIT-AP University, India 02/03/2025 3


DDL is the short name for Data Definition Language, which deals with
database schemas and descriptions, of how the data should reside in the
database.
 CREATE: to create a database and its objects like (table, index, views, store
procedure, function, and triggers)
 ALTER: alters the structure of the existing database
 DROP: delete objects from the database
 TRUNCATE: remove all records from a table, including all spaces allocated
for the records are removed
 COMMENT: add comments to the data dictionary
 RENAME: rename an object

Database Management Systems (DBMS), SCOPE, VIT-AP University, India 02/03/2025 4


DML is the short name for Data Manipulation Language which deals with data
manipulation and includes most common SQL statements such SELECT, INSERT,
UPDATE, DELETE, etc., and it is used to store, modify, retrieve, delete and
update data in a database.
 SELECT: retrieve data from a database
 INSERT: insert data into a table
 UPDATE: updates existing data within a table
 DELETE: Delete all records from a database table
 MERGE: UPSERT operation (insert or update)
 CALL: call a PL/SQL or Java subprogram
 EXPLAIN PLAN: interpretation of the data access path
 LOCK TABLE: concurrency Control
Database Management Systems (DBMS), SCOPE, VIT-AP University, India 02/03/2025 5
DCL is short for Data Control Language which acts as an access specifier to the
database.(basically to grant and revoke permissions to users in the database
 GRANT: grant permissions to the user for running DML(SELECT, INSERT,
DELETE,…) commands on the table
 REVOKE: revoke permissions to the user for running DML(SELECT, INSERT,
DELETE,…) command on the specified table

TCL is short for Transactional Control Language which acts as an manager for all
types of transactional data and all transactions. Some of the command of TCL
are
 Roll Back: Used to cancel or Undo changes made in the database
 Commit: It is used to apply or save changes in the database
 Save Point: It is used to save the data on the temporary basis in the database

Database Management Systems (DBMS), SCOPE, VIT-AP University, India 02/03/2025 6


Database Management System: The software which is used to manage
databases is called Database Management System (DBMS). For Example,
MySQL, Oracle, etc. are popular commercial DBMS used in different applications.
DBMS allows users the following tasks:
 Data Definition: It helps in the creation, modification, and removal of definitions
that define the organization of data in the database.
 Data Updation: It helps in the insertion, modification, and deletion of the actual
data in the database.
 Data Retrieval: It helps in the retrieval of data from the database which can be
used by applications for various purposes.
 User Administration: It helps in registering and monitoring users, enforcing data
security, monitoring performance, maintaining data integrity, dealing with
concurrency control, and recovering information corrupted by unexpected
failure.

Database Management Systems (DBMS), SCOPE, VIT-AP University, India 02/03/2025 7


MOTIVATION
File System manages data using files on a hard disk. Users are allowed to create, delete,
and update the files according to their requirements.
Let us consider the example of file-based University Management System. Data of students
is available to their respective Departments, Academics Section, Result Section, Accounts
Section, Hostel Office, etc. Some of the data is common for all sections like Roll No, Name,
Father Name, Address, and Phone number of students but some data is available to a
particular section only like Hostel allotment number which is a part of the hostel office.
 Redundancy of data
 Inconsistency of Data
 Difficult Data Access
 Unauthorized Access
 No Concurrent Access
 No Backup and Recovery

Database Management Systems (DBMS), SCOPE, VIT-AP University, India 02/03/2025 8


DATA INDEPENDENCE
 Data independence can be explained using the three-schema architecture.
 Data independence refers characteristic of being able to modify the schema at one
level of the database system without altering the schema at the next higher level.
There are two types of data independence:
Logical Data Independence
 Logical data independence refers characteristic of being able to change the
conceptual schema without having to change the external schema.
 Logical data independence is used to separate the external level from the
conceptual view.
 If we do any changes in the conceptual view of the data, then the user view of the
data would not be affected.
 Logical data independence occurs at the user interface level.

Database Management Systems (DBMS), SCOPE, VIT-AP University, India 02/03/2025 9


Physical Data Independence
 Physical data independence can
be defined as the capacity to
change the internal schema
without having to change the
Conceptual Schema
conceptual schema.
 If we do any changes in the
storage size of the database
system server, then the
Conceptual structure of the Internal Schema
database will not be affected.
 Physical data independence is
used to separate conceptual
levels from the internal levels.
 Physical data independence
occurs at the logical interface
level.

Database Management Systems (DBMS), SCOPE, VIT-AP University, India 02/03/2025 10


THREE SCHEMA
ARCHITECTURE
 The three schema
architecture is also called
ANSI/SPARC architecture or
three-level architecture.
 This framework is used to
describe the structure of a
specific database system.
 The three schema
architecture is also used to
separate the user
applications and physical
database.
 The three schema
architecture contains three-
levels. It breaks the
database down into three
different categories.

Database Management Systems (DBMS), SCOPE, VIT-AP University, India 02/03/2025 11


In the above diagram: The main objective of three level architecture is to
enable multiple users to access the same data with
 It shows the DBMS architecture. a personalized view while storing the underlying
 Mapping is used to transform the request data only once. Thus it separates the user's view
and response between various database from the physical structure of the database. This
levels of architecture. separation is desirable for the following reasons:
 Mapping is not good for small DBMS
• Different users need different views of the same
because it takes more time.
data.
 In External / Conceptual mapping, it is • The approach in which a particular user needs to
necessary to transform the request from see the data may change over time.
external level to conceptual schema. • The users of the database should not worry
 In Conceptual / Internal mapping, DBMS about the physical implementation and internal
transform the request from the workings of the database such as data
conceptual to internal level. compression and encryption techniques,
hashing, optimization of the internal structures
etc.
• All users should be able to access the same data
according to their requirements.
• DBA should be able to change the conceptual
structure of the database without affecting the
user's
• Internal structure of the database should be
Database Management Systems (DBMS), SCOPE, VIT-AP University, India 02/03/2025 12
unaffected by changes to physical aspects of the
CENTRALIZED
ARCHITECTURE
In the centralized DBMS architecture, all the DBMS
functionality, application program execution, and
user interface processing are carried out on one
central machine where user terminals are
connected. Architectures for DBMSs have followed
trends similar to those for general computer system
architectures.

Earlier architectures used mainframe computers to


provide the main processing for all system
functions, including user application programs and
user interface programs, as well as all the DBMS
functionality. The reason was that most users
accessed such systems via computer terminals that
did not have processing power and only provided
display capabilities. As prices of hardware declined,
most users replaced their terminals with PCs and
workstations. Gradually, DBMS systems started to
exploit the available processing power at the user
Database Management Systems (DBMS), SCOPE, VIT-AP University, India 02/03/2025 13
side, which led to client/server DBMS architectures.
CLIENT-SERVER
ARCHITECTURE
 The concept of client/server architecture assumes an underlying framework
that consists of many PCs as well as a smaller number of mainframe
machines, connected via LANs and other types of computer networks.
 A client in this framework is typically a user machine that provides user
interface capabilities and local processing. When a client requires access to
additional functionality, such as database access which does not exist at
that machine, it connects to a server that provides the needed
functionality.
 A Server is a system which contains both Hardware and Software which
provides services to client Machines like file access, printing and database
access.

Database Management Systems (DBMS), SCOPE, VIT-AP University, India 02/03/2025 14


1)Two Tier Client/Server Architecture for DBMS:
 Here Two-tier means that our Architecture has two
layers, which are client layer and Data-layer. In
Client layer we have several Client machines
which can have the access to the database server.
The API present on the client machine will
establish the connection between the machine
and the Database server through JDBC something
else. This is because Clients and Database Server
may be at different locations. Once this
connection gets established, the Interface present
on the client machine contains an Application
Program on the back-side which contains a query.
This query will be processed by the Database
server and in turn the queried information will be
sent to the client machine.
 For example if we query the database to retrieve
some information, the query will be Processed by
Database server and that information will be sent
to the client by Database server itself!!!

Database Management Systems (DBMS), SCOPE, VIT-AP University, India 02/03/2025 15


2) Three-Tier client/server Architecture
for DBMS:
 Here there is an additional layer which
acts as an intermediate between Client
layer and Data layer called Business
logic layer. Business logic layer is the
layer where the Application Programs
are processed. Here the Application
Programs are processed in the
Application server itself, which makes it
different from Two-tier Architecture
where queries are processed in the
database server.
 Simply the Client machines will contact
Application Server which in turn
processes our Application Programs
and fetches the Required Data from
Database and then sends this
Information back to the client machine
in the suitable format only.
Database Management Systems (DBMS), SCOPE, VIT-AP University, India 02/03/2025 16
 Even it is easy to maintain Two-Tier Architecture of DBMS it is still not
scalable when we have large number of clients and also not secure
because the clients are having direct access to database server.
 But Three-Tier Architecture ensures Scalability and Security of the data
because of the presence of this Intermediate layer which processes the
queries and it just retrieves data from server instead of processing in the
server to take place.

Database Management Systems (DBMS), SCOPE, VIT-AP University, India 02/03/2025 17


DATABASE COMPONENTS

Database Management Systems (DBMS), SCOPE, VIT-AP University, India 02/03/2025 18


 Hardware, Software, Data, Database Access Language, Procedures and Users all
together form the components of a DBMS.
Hardware
 The hardware is the actual computer system used for keeping and accessing the
database. The conventional DBMS hardware consists of secondary storage devices such
as hard disks. Databases run on the range of machines from micro computers to
mainframes.
Software
 Software is the actual DBMS between the physical database and the users of the
system. All the requests from the user for accessing the database are handled by DBMS.
Data
 It is an important component of the database management system. The main task of
DBMS is to process the data. Databases are used to store the data, retrieved, and
updated to and from the databases.
Database Management Systems (DBMS), SCOPE, VIT-AP University, India 02/03/2025 19
Users
 There are a number of users who can access or retrieve the data on
demand using the application and the interfaces provided by the DBMS.
 The users of the database can be classified into different groups −
 Native Users
 Online Users
 Sophisticated Users
 Specialized Users
 Application Users
 DBA- Database Administrator

Database Management Systems (DBMS), SCOPE, VIT-AP University, India 02/03/2025 20


DATABASE USERS

Classification of Users
DBMS mainly classified into three users

 End Users.
 Application Programmers.
 Database Administrator.

The classification of users in DBMS is


pictorially represented below −

Database Management Systems (DBMS), SCOPE, VIT-AP University, India 02/03/2025 21


 Database users are categorized based up on their interaction with the database. These
are seven types of database users in DBMS.
 Database Administrator (DBA) : Database Administrator (DBA) is a person/team who
defines the schema and also controls the 3 levels of database. The DBA will then create
a new account id and password for the user if he/she need to access the database. DBA
is also responsible for providing security to the database and he allows only the
authorized users to access/modify the data base. DBA is responsible for the problems
such as security breaches and poor system response time.
1. DBA also monitors the recovery and backup and provide technical support.
2. The DBA has a DBA account in the DBMS which called a system or superuser account.
3. DBA repairs damage caused due to hardware and/or software failures.
4. DBA is the one having privileges to perform DCL (Data Control Language) operations
such as GRANT and REVOKE, to allow/restrict a particular user from accessing the
database.
Database Management Systems (DBMS), SCOPE, VIT-AP University, India 02/03/2025 22
 Naive / Parametric End Users : Parametric End 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. For examples,
Railway’s ticket booking users are naive users. Clerks in any bank is a naive
user because they don’t have any DBMS knowledge, but they still use the
database and perform their given task.
 System Analyst :
System Analyst is a user who analyzes the requirements of parametric end
users. They check whether all the requirements of end users are satisfied.
 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 Management Systems (DBMS), SCOPE, VIT-AP University, India 02/03/2025 23
 Database Designers : Data Base Designers are the users who design the structure of
database which includes tables, indexes, views, triggers, stored procedures and
constraints which are usually enforced before the database is created or populated with
data. He/she controls what data must be stored and how the data items to be related. It
is responsibility of Database Designers to understand the requirements of different user
groups and then create a design which satisfies the need of all the user groups.
 Application Programmers : Application Programmers also referred as System Analysts
or simply 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. Application programmers design, debug, test, and maintain set of programs
called “canned transactions” for the Naive (parametric) users in order to interact with
database.
 Casual Users / Temporary Users : Casual Users are the users who occasionally
use/access the database but each time when they access the database they require the
new information, for example, Middle or higher level manager.
Database Management Systems (DBMS), SCOPE, VIT-AP University, India 02/03/2025 24
ENTITY TYPES
The ER model is a very important concept in
DBMS, and it is used for the modeling of the
Example :
logical view of the system from a data • A student with a particular roll number is an
perspective. The entity, Entity Set, and Entity entity.
Type all these terms are very important • A company with a particular registration number
concepts of ER Model.
is an entity.
Entity : An entity is a thing in a real-world with
independent existence. An entity can exist
independently and is distinguishable from Note :
other objects. It can be identified uniquely. • An entity may be concrete like a student, a
An entity can be of two types :
book, or abstract like a holiday or a particular
concept.
 Tangible Entity : Entities that exist in the real
• An entity is represented by a set of attributes.
world physically. Example: Person, car, etc.
• In a particular relation in RDBMS, a particular
 Intangible Entity : Entities that exist only
record is called an entity.
logically and have no physical existence.
Example: Bank Account, etc.

Database Management Systems (DBMS), SCOPE, VIT-AP University, India 02/03/2025 25


Entity Type : It refers to the category that a Entity Set : An entity set is a
particular entity belongs to.
collection or set of all entities of
Example : a particular entity type at any
 A table named student in a university database. point in time. The type of all the
 A table named employee in a company entities should be the same.
database. Example :
• The collection of all the students
Note :
from the student table at a
 The category of a particular entity in the particular instant of time is an
relation in RDBMS is called the entity type. example of an entity set.
 It is represented by the name of the table and • The collection of all the
its schema. employees from the employee
table at a particular instant of time
is an example of an entity set.
Note :
• Entity sets need not be disjoint.
For example, the entity set of
Article Writer (all content creators
for articles) and the entity set of
Article Reader (all students who
read the articles) may have
members in common.
•The collection of all the entities in
the relation of RDBMS is called an
entity set.
Database Management Systems (DBMS), SCOPE, VIT-AP University, India 02/03/2025 26
Relation With Table : Entity : Each row is an
 Consider a table student as follows : entity.
Entity Type : Each entity belongs
to the student type. Hence, the
type of entity here is a student.

Entity Set : The complete data


set of all entities is called entity
set. For the above table, the
records with student id 1, 2, 3, 4
are the entity set.

Database Management Systems (DBMS), SCOPE, VIT-AP University, India 02/03/2025 27


ENTITY TYPES
 The following are the types
of entities in DBMS −
Strong Entity
 The strong entity has a
primary key. Weak entities
are dependent on strong
entity. Its existence is not Weak Entity
dependent on any other
entity. • The weak entity in DBMS do not have a primary
 Strong Entity is key and are dependent on the parent entity. It
represented by a single mainly depends on other entities.
rectangle − • Weak Entity is represented by double rectangle

Database Management Systems (DBMS), SCOPE, VIT-AP University, India 02/03/2025 28


The Strong Entity is Professor, whereas Dependent is a Weak Entity.
ID is the primary key (represented with a line) and the Name in Dependent entity is
called Partial Key (represented with a dotted line).
Database Management Systems (DBMS), SCOPE, VIT-AP University, India 02/03/2025 29
ER DIAGRAM
CONSTRUCTION
 ER-Diagram is a pictorial
representation of data which
describes how the data is
communicated and related to
one another. Any object, like
entities, attributes of an
entity, sets of relationship
and other attributes of
relationship are
characterized with the help
of the ER diagram.
E-R Diagram Components
 The Entity Relationship (ER)
diagram components are as
follows −

Database Management Systems (DBMS), SCOPE, VIT-AP University, India 02/03/2025 30


Database Management Systems (DBMS), SCOPE, VIT-AP University, India 02/03/2025 31
Database Management Systems (DBMS), SCOPE, VIT-AP University, India 02/03/2025 32
STRUCTURAL CONSTRAINTS
 Structural Constraints are also called Structural properties of a database
management system (DBMS). Cardinality Ratios and Participation
Constraints taken together are called Structural Constraints. The name
constraints refer to the fact that such limitations must be imposed on the
data, for the DBMS system to be consistent with the requirements.
 The Structural constraints are represented by Min-Max notation. This is a
pair of numbers(m, n) that appear on the connecting line between the
entities and their relationships. The minimum number of times an entity
can appear in a relation is represented by m whereas, the maximum time it
is available is denoted by n. If m is 0 it signifies that the entity is
participating in the relation partially, whereas, if m is either greater than or
equal to 1, it denotes total participation of the entity. Note – Number of
times an entity participates in a relationship is same as the number
appearance of the entity in the tuples.
Database Management Systems (DBMS), SCOPE, VIT-AP University, India 02/03/2025 33
There are 4 types of cardinality

Database Management Systems (DBMS), SCOPE, VIT-AP University, India 02/03/2025 34


CREATE AN ER DIAGRAM
 Following are the steps to create an ER Diagram:

Entity Relationship Diagram Example:


 In a university, a Student enrols in Courses. A student must be assigned to
at least one or more Courses. Each course is taught by a single Professor.
To maintain instruction quality, a Professor can deliver only one course

Database Management Systems (DBMS), SCOPE, VIT-AP University, India 02/03/2025 35


EXAMPLE

Database Management Systems (DBMS), SCOPE, VIT-AP University, India 02/03/2025 36


Step 1) Entity
Identification
 We have three entities
 Student
 Course
 Professor
Step 2) Relationship Identification
We have the following two relationships
• The student is assigned a course
• Professor delivers a course

Database Management Systems (DBMS), SCOPE, VIT-AP University, India 02/03/2025 37


Step 3) Cardinality Identification
 For them problem statement we
know that,
 A student can be
assigned multiple courses
 A Professor can deliver
only one course
Step 4) Identify Attributes
 We need to study the files, forms,
reports, data currently maintained by
the organization to identify attributes.
We can also conduct interviews with
various stakeholders to identify
entities. Initially, it’s important to
identify the attributes without mapping
them to a particular entity.
 Once, we have a list of Attributes, we
need to map them to the identified
entities. Ensure an attribute is to be
paired with exactly one entity. If you
think an attribute should belong to
more than one entity, use a modifier to
make it unique.
For Course Entity, attributes could be Duration, Credits,
 Once the mapping is done, identify the Assignments, etc. For the sake of ease we have considered
primary Keys. If a unique key is not
readily available, createSystems just one attribute.
one. (DBMS), SCOPE, VIT-AP University, India
Database Management 02/03/2025 38
Step 5) Create the ERD Diagram
 A more modern representation of Entity Relationship Diagram Example

Best Practices for Developing Effective ER Diagrams

• Here are some best practice or example for Developing Effective ER Diagrams.
• Eliminate any redundant entities or relationships
• You need to make sure that all your entities and relationships are properly labeled
• There may be various valid approaches to an ER diagram. You need to make sure that
the ER diagram supports all the data you need to store
• You should assure that each entity only appears a single time in the ER diagram
• Name every relationship, entity, and attribute are represented on your diagram
• Never connect relationships to each other
• You should use colors to highlight important portions of the ER diagram

Database Management Systems (DBMS), SCOPE, VIT-AP University, India 02/03/2025 39

You might also like