0% found this document useful (0 votes)
347 views33 pages

DBMS - Unit 1

This document provides an overview of database systems and architecture. It discusses key concepts like data, databases, database management systems (DBMS), characteristics of DBMS, applications of DBMS, advantages and disadvantages of DBMS. Specifically, it defines what a database is, explains what data and DBMS are used for, lists topics to be covered like data definition language and data manipulation language, and discusses characteristics, applications, and benefits of using a DBMS.

Uploaded by

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

DBMS - Unit 1

This document provides an overview of database systems and architecture. It discusses key concepts like data, databases, database management systems (DBMS), characteristics of DBMS, applications of DBMS, advantages and disadvantages of DBMS. Specifically, it defines what a database is, explains what data and DBMS are used for, lists topics to be covered like data definition language and data manipulation language, and discusses characteristics, applications, and benefits of using a DBMS.

Uploaded by

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

UNIT : 1

DATABASE SYSTEM
ARCHITECTURE
SEMESTER:3rd
PREPARED BY: A/Prof. Aishwarya Divan(SOCET-CE)
Topics to be Covered ..
❖ Data Abstraction,
❖ Data Independence,
❖ Data Definition Language (DDL),
❖ Data Manipulation Language (DML).

DEPARTMENT OF COMPUTER ENGINEERING, *Proprietary


17-08-2022 2
material of SILVER OAK UNIVERSITY
What is Data?
• Data is a collection of a distinct small unit of information. It can be used in a
variety of forms like text, numbers, media, bytes, etc. it can be stored in pieces
of paper or electronic memory, etc.
• Word 'Data' is originated from the word 'datum' that means 'single piece of
information.' It is plural of the word datum.
• In computing, Data is information that can be translated into a form for
efficient movement and processing. Data is interchangeable.

DEPARTMENT OF COMPUTER ENGINEERING, *Proprietary


17-08-2022 3
material of SILVER OAK UNIVERSITY
What is Database?
• A database is an organized collection of data, so that it can be easily accessed and managed.
• The database is a collection of inter-related data which is used to retrieve, insert and delete
the data efficiently. It is also used to organize the data in the form of a table, schema, views,
and reports, etc.
• You can organize data into tables, rows, columns, and index it to make it easier to find
relevant information.
• Database handlers create a database in such a way that only one set of software program
provides access of data to all the users.
• The main purpose of the database is to operate a large amount of information by storing,
retrieving, and managing data.

DEPARTMENT OF COMPUTER ENGINEERING, *Proprietary


17-08-2022 4
material of SILVER OAK UNIVERSITY
• There are many dynamic websites on the World Wide Web nowadays which are handled
through databases. For example, a model that checks the availability of rooms in a hotel. It is
an example of a dynamic website that uses a database.
• There are many databases available like MySQL, Sybase, Oracle, MongoDB, Informix,
PostgreSQL, SQL Server, etc.
• Modern databases are managed by the database management system (DBMS).
• SQL or Structured Query Language is used to operate on the data stored in a database. SQL
depends on relational algebra and tuple relational calculus.
• A cylindrical structure is used to display the image of a database.
• For example: The college Database organizes the data about the admin, staff, students and
faculty etc.
• Using the database, you can easily retrieve, insert, and delete the information.

DEPARTMENT OF COMPUTER ENGINEERING, *Proprietary


17-08-2022 5
material of SILVER OAK UNIVERSITY
Database Management System
• Database management system is a software which is used to manage the database. For
example: MySQL, Oracle, etc are a very popular commercial database which is used in
different applications.
• DBMS provides an interface to perform various operations like database creation, storing
data in it, updating data, creating a table in the database and a lot more.
• It provides protection and security to the database. In the case of multiple users, it also
maintains data consistency.
• any database transaction must only change affected data in allowed ways.
• Data redundancy is defined as the storing of the same data in multiple locations. An example
of data redundancy is saving the same file five times to five different disks.
• The Database Management System (DBMS) is defined as a software system that allows the
user to define, create and maintain the database and provide control access to the data.
• It is a collection of programs used for managing data and simultaneously it supports different
types of users to create, manage, retrieve, update and store information.
DEPARTMENT OF COMPUTER ENGINEERING, *Proprietary
17-08-2022 6
material of SILVER OAK UNIVERSITY
DBMS allows users the following tasks:
• Data Definition: It is used for creation, modification, and removal of
definition that defines the organization of data in the database.
• Data Updation: It is used for the insertion, modification, and deletion of the
actual data in the database.
• Data Retrieval: It is used to retrieve the data from the database which can be
used by applications for various purposes.
• User Administration: It is used for registering and monitoring users,
maintain data integrity, enforcing data security, dealing with concurrency
control, monitoring performance and recovering information corrupted by
unexpected failure.

DEPARTMENT OF COMPUTER ENGINEERING, *Proprietary


17-08-2022 7
material of SILVER OAK UNIVERSITY
Characteristics of DBMS
• It uses a digital repository established on a server to store and manage the information.
• It can provide a clear and logical view of the process that manipulates data.
• DBMS contains automatic backup and recovery procedures.
• It contains ACID properties which maintain data in a healthy state in case of failure.
• It can reduce the complex relationship between data.
• It is used to support manipulation and processing of data.
• It is used to provide security of data.
• It can view the database from different viewpoints according to the requirements of the user.

DEPARTMENT OF COMPUTER ENGINEERING, *Proprietary


17-08-2022 8
material of SILVER OAK UNIVERSITY
Applications of DBMS
• ACID Properties − DBMS follows the concepts of Atomicity, Consistency, Isolation,
and Durability (normally shortened as ACID). These concepts are applied on transactions,
which manipulate data in a database. ACID properties help the database stay healthy in multi-
transactional environments and in case of failure.
• Multiuser and Concurrent Access − DBMS supports multi-user environment and allows
them to access and manipulate data in parallel. Though there are restrictions on transactions
when users attempt to handle the same data item, but users are always unaware of them.
• Multiple views − DBMS offers multiple views for different users. A user who is in the Sales
department will have a different view of database than a person working in the Production
department. This feature enables the users to have a concentrate view of the database
according to their requirements.

DEPARTMENT OF COMPUTER ENGINEERING, *Proprietary


17-08-2022 9
material of SILVER OAK UNIVERSITY
Applications of DBMS
• Security − Features like multiple views offer security to some extent where users are unable
to access data of other users and departments. DBMS offers methods to impose constraints
while entering data into the database and retrieving the same at a later stage. DBMS offers
many different levels of security features, which enables multiple users to have different
views with different features. For example, a user in the Sales department cannot see the data
that belongs to the Purchase department. Additionally, it can also be managed how much data
of the Sales department should be displayed to the user. Since a DBMS is not saved on the disk
as traditional file systems, it is very hard for miscreants to break the code.

DEPARTMENT OF COMPUTER ENGINEERING, *Proprietary


17-08-2022 10
material of SILVER OAK UNIVERSITY
Advantages of DBMS
• Controls database redundancy: It can control data redundancy because it stores all
the data in one single database file and that recorded data is placed in the database.
• Data sharing: In DBMS, the authorized users of an organization can share the data
among multiple users.
• Easily Maintenance: It can be easily maintainable due to the centralized nature of
the database system.
• Reduce time: It reduces development time and maintenance need.
• Backup: It provides backup and recovery subsystems which create automatic
backup of data from hardware and software failures and restores the data if
required.
• multiple user interface: It provides different types of user interfaces like graphical
user interfaces, application program interfaces

DEPARTMENT OF COMPUTER ENGINEERING, *Proprietary


17-08-2022 11
material of SILVER OAK UNIVERSITY
Disadvantages of DBMS
• Cost of Hardware and Software: It requires a high speed of data processor
and large memory size to run DBMS software.
• Size: It occupies a large space of disks and large memory to run them
efficiently.
• Complexity: Database system creates additional complexity and
requirements.
• Higher impact of failure: Failure is highly impacted the database because in
most of the organization, all the data stored in a single database and if the
database is damaged due to electric failure or database corruption then the
data may be lost forever.

DEPARTMENT OF COMPUTER ENGINEERING, *Proprietary


17-08-2022 12
material of SILVER OAK UNIVERSITY
File System vs. DBMS

DEPARTMENT OF COMPUTER ENGINEERING, *Proprietary


17-08-2022 13
material of SILVER OAK UNIVERSITY
File System vs. DBMS
File System Approach
• File based systems were an early attempt to computerize the manual system.
It is also called a traditional based approach in which a decentralized
approach was taken where each department stored and controlled its own
data with the help of a data processing specialist. The main role of a data
processing specialist was to create the necessary computer file structures,
and also manage the data within structures and design some application
programs that create reports based on file data.

DEPARTMENT OF COMPUTER ENGINEERING, *Proprietary


17-08-2022 14
material of SILVER OAK UNIVERSITY
File System vs. DBMS
DBMS:
• A database approach is a well-organized collection of data that are related in
a meaningful way which can be accessed by different users but stored only
once in a system. The various operations performed by the DBMS system are:
Insertion, deletion, selection, sorting etc.

DEPARTMENT OF COMPUTER ENGINEERING, *Proprietary


17-08-2022 15
material of SILVER OAK UNIVERSITY
Data Abstraction
• Data Abstraction is a process of hiding unwanted or irrelevant details from the end user. It
provides a different view and helps in achieving data independence which is used to enhance
the security of data.
• The database systems consist of complicated data structures and relations. For users to
access the data easily, these complications are kept hidden, and only the relevant part of the
database is made accessible to the users through data abstraction.
• Database systems include complex data-structures. In terms of retrieval of data, reduce
complexity in terms of usability of users and in order to make the system efficient, developers
use levels of abstraction that hide irrelevant details from the users. Levels of abstraction
simplify database design.

DEPARTMENT OF COMPUTER ENGINEERING, *Proprietary


17-08-2022 16
material of SILVER OAK UNIVERSITY
Data Abstraction
• Mainly there are three levels of abstraction for DBMS, which are as follows −
1. Physical or Internal Level :- Actual PHYSICAL storage structure and access
paths.
2. Logical or Conceptual Level :- Structure and constraints for the entire
database.
3. View or External Level :- Describes various user views.

DEPARTMENT OF COMPUTER ENGINEERING, *Proprietary


17-08-2022 17
material of SILVER OAK UNIVERSITY
Data Abstraction

DEPARTMENT OF COMPUTER ENGINEERING, *Proprietary


17-08-2022 18
material of SILVER OAK UNIVERSITY
Data Abstraction
1. Physical or Internal Level
• It is the lowest level of abstraction for DBMS which defines how the data is
actually stored, it defines data-structures to store data and access methods
used by the database. Actually, it is decided by developers or database
application programmers how to store the data in the database.
• So, overall, the entire database is described in this level that is physical or
internal level. It is a very complex level to understand. For example,
customer's information is stored in tables and data is stored in the form of
blocks of storage such as bytes, gigabytes etc.

DEPARTMENT OF COMPUTER ENGINEERING, *Proprietary


17-08-2022 19
material of SILVER OAK UNIVERSITY
Data Abstraction
2.Logical or Conceptual Level
• Logical level is the intermediate level or next higher level. It describes what
data is stored in the database and what relationship exists among those data.
It tries to describe the entire or whole data because it describes what tables
to be created and what are the links among those tables that are created.
• It is less complex than the physical level. Logical level is used by developers or
database administrators (DBA). So, overall, the logical level contains tables
(fields and attributes) and relationships among table attributes.

DEPARTMENT OF COMPUTER ENGINEERING, *Proprietary


17-08-2022 20
material of SILVER OAK UNIVERSITY
Data Abstraction
3.View or External Level
• It is the highest level. In view level, there are different levels of views and
every view only defines a part of the entire data. It also simplifies interaction
with the user and it provides many views or multiple views of the same
database.
• View level can be used by all users (all levels' users). This level is the least
complex and easy to understand.
• For example, a user can interact with a system using GUI that is view level and
can enter details at GUI or screen and the user does not know how data is
stored and what data is stored, this detail is hidden from the user.

DEPARTMENT OF COMPUTER ENGINEERING, *Proprietary


17-08-2022 21
material of SILVER OAK UNIVERSITY
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.
• Data independence is the ability to modify the scheme without affecting the programs and
the application to be rewritten. Data is separated from the programs, so that the changes
made to the data will not affect the program execution and the application.
• We know the main purpose of the three levels of data abstraction is to achieve data
independence. If the database changes and expands over time, it is very important that the
changes in one level should not affect the data at other levels of the database.
• There are two types of data independence:
1. Physical Data Independence
2. Logical Data Independence

DEPARTMENT OF COMPUTER ENGINEERING, *Proprietary


17-08-2022 22
material of SILVER OAK UNIVERSITY
Data Independence

DEPARTMENT OF COMPUTER ENGINEERING, *Proprietary


17-08-2022 23
material of SILVER OAK UNIVERSITY
Data Independence
1.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.

DEPARTMENT OF COMPUTER ENGINEERING, *Proprietary


17-08-2022 24
material of SILVER OAK UNIVERSITY
• Example –
Changes in the middle level (logical level) are: adding new attributes to a
relation, deleting existing attributes of the relation, etc. Ideally, we would not
want to change any application or programs that do not require to use of the
modified attribute.
• How is Logical Data Independence achieved?
• Logical Data Independence is achieved by modifying the view layer to logical
layer mapping (VL-LL mapping).

DEPARTMENT OF COMPUTER ENGINEERING, *Proprietary


17-08-2022 25
material of SILVER OAK UNIVERSITY
Data Independence
2.Physical Data Independence
• Physical data independence can be defined as the capacity to change the
internal schema without having to change the conceptual schema.
• If we do any changes in the storage size of the database system server, then
the Conceptual structure of the 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.

DEPARTMENT OF COMPUTER ENGINEERING, *Proprietary


17-08-2022 26
material of SILVER OAK UNIVERSITY
• Example –
Changes in the lowest level (physical level) are: creating a new file, storing the new files in the
system, creating a new index, etc.
• Instances of why we may want to do any sort of Data modification at the physical level- We
may want to alter or change the data at the physical level. This is because we may want to add
or remove files and indexes to enhance the performance of the database system and make it
faster. Hence, in this way, Physical Data Independence enables us to do Performance Tuning.
Ideally, when we change the physical level, we would not want to alter the logical and view
level.
• How is Physical Data Independence achieved?
• Physical Data Independence is achieved by modifying the physical layer to logical layer
mapping (PL-LL mapping). We must ensure that the modification we have done is localized.

DEPARTMENT OF COMPUTER ENGINEERING, *Proprietary


17-08-2022 27
material of SILVER OAK UNIVERSITY
DEPARTMENT OF COMPUTER ENGINEERING, *Proprietary
17-08-2022 28
material of SILVER OAK UNIVERSITY
Data Definition Language (DDL)
• DDL is Data Definition Language and is used to define the structures like
schema, database, tables, constraints etc. Examples of DDL are create and
alter statements.
• DDL or Data Definition Language actually consists of the SQL commands that
can be used to define the database schema. It simply deals with descriptions
of the database schema and is used to create and modify the structure of
database objects in the database.DDL is a set of SQL commands used to
create, modify, and delete database structures but not data. These commands
are normally not used by a general user, who should be accessing the
database via an application.

DEPARTMENT OF COMPUTER ENGINEERING, *Proprietary


17-08-2022 29
material of SILVER OAK UNIVERSITY
Data Definition Language (DDL)
• List of DDL commands:
• 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

DEPARTMENT OF COMPUTER ENGINEERING, *Proprietary


17-08-2022 30
material of SILVER OAK UNIVERSITY
Data Manipulation Language (DML)
• DML is Data Manipulation Language and is used to manipulate data.
Examples of DML are insert, update and delete statements.
• The SQL commands that deals with the manipulation of data present in the
database belong to DML or Data Manipulation Language and this includes
most of the SQL statements. It is the component of the SQL statement that
controls access to data and to the database. Basically, DCL statements are
grouped with DML statements.

DEPARTMENT OF COMPUTER ENGINEERING, *Proprietary


17-08-2022 31
material of SILVER OAK UNIVERSITY
Data Manipulation Language (DML)
• List of DML commands:
• 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

DEPARTMENT OF COMPUTER ENGINEERING, *Proprietary


17-08-2022 32
material of SILVER OAK UNIVERSITY
Thank you !!
DEPARTMENT OF COMPUTER ENGINEERING, *Proprietary
17-08-2022 33
material of SILVER OAK UNIVERSITY

You might also like