S-Advance Database Management System 1
S-Advance Database Management System 1
DATABASE
MANAGEMENT
SYSTEM
Sukesh Kumar Bhagat
Assistant Professor
DBUU, Dehradun
INTRODUCTION
TO DATABASE
SYSTEM
A database system is a structured collection of data organized to provide efficient retrieval, storage, and
management of information. It is a crucial component in modern computing, used in a wide range of
applications to store and retrieve data in a structured and organized manner.
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.
DATABASE
A database is an organized collection of data, so that it can be easily accessed and managed.
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.
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.
EVOLUTION OF DATABASES
File-Based
1968 -File-Based database were introduced. In file-based databases, data was maintained in a
flat file. Though files have many advantages, there are several limitations.
One of the major advantages is that the file system has various access methods, e.g.,
sequential, indexed, and random.
It requires extensive programming in a third-generation language such as COBOL, BASIC.
HIERARCHICAL DATA MODEL
1968-1980 was the era of the Hierarchical Database. Prominent hierarchical database model was
IBM's first DBMS. It was called IMS (Information Management System).
In this model, files are related in a parent/child manner.
Below diagram represents Hierarchical Data Model. Small circle represents objects.
Like file system, this model also had some limitations like complex implementation, lack
structural independence, can't easily handle a many-many relationship, etc.
NETWORK DATA MODEL
Charles Bachman developed the first DBMS at Honeywell called Integrated Data Store
(IDS).
In this model, files are related as owners and members, like to the common network model.
Network data model identified the following components:
• Network schema (Database organization)
• Sub-schema (views of database per user)
• Data management language (procedural)
This model also had some limitations like system complexity and difficult to design and
maintain.
RELATIONAL DATABASE
1970 - Present:
In 1970, the relational model was proposed by E.F. Codd.
Relational database model has two main terminologies called instance and schema.
The instance is a table with rows or columns
Schema specifies the structure like name of the relation, type of each column and name
This model uses some mathematical concept like set theory and predicate logic.
The first internet database application had been created in 1995.
During the era of the relational database, many more models had introduced like object-
oriented model, object-relational model, etc.
CLOUD DATABASE
Cloud database facilitates you to store, manage, and retrieve their structured, unstructured data via a
cloud platform. This data is accessible over the Internet. Cloud databases are also called a database as
service (DBaaS) because they are offered as a managed service.
Some best cloud options are:
• AWS (Amazon Web Services)
• Snowflake Computing
• Oracle Database Cloud Services
• Microsoft SQL server
• Google cloud spanner
it highly available because, in case of any failure, data GUI tools for NoSQL database are not easily available in the market.
replicates itself to the previous consistent state. Backup
Backup is a great weak point for NoSQL databases. Some databases, like
MongoDB, have no powerful approaches for data backup.
THE OBJECT-ORIENTED DATABASES
The object-oriented databases contain data in the form of object and classes. Objects are the real-
world entity, and types are the collection of objects. An object-oriented database is a combination of
relational model features with objects oriented principles. It is an alternative implementation to that of
the relational model.
Object-oriented databases hold the rules of object-oriented programming. An object-oriented database
management system is a hybrid application.
The object-oriented database model contains the following properties.
Graph databases are very useful when the database contains a complex relationship and
dynamic schema.
It is mostly used in supply chain management, identifying the source of IP telephony.
DBMS (DATA BASE MANAGEMENT SYSTEM)
Database management System is software which is used to store and retrieve the database.
For example, Oracle, MySQL, etc.; these are some popular DBMS tools.
• DBMS provides the interface to perform the various operations like creation, deletion,
modification, etc.
• DBMS allows the user to create their databases as per their requirement.
• DBMS accepts the request from the application and provides specific data through the
operating system.
• DBMS contains the group of programs which acts according to the user instruction.
ADVANTAGE OF DBMS
• It provides security to the database. DISADVANTAGE OF DBMS
Controls redundancy Size
It stores all the data in a single database file, so it can
control data redundancy. It occupies large disk space and large memory to run
Data sharing efficiently.
An authorized user can share the data among multiple users. Cost
Backup DBMS requires a high-speed data processor and
It providesBackup and recovery subsystem. This recovery larger memory to run DBMS software, so it is costly.
system creates automatic data from system failure and
restores data if required.
Complexity
Multiple user interfaces DBMS creates additional complexity and
It provides a different type of user interfaces like GUI, requirements.
application interfaces.
RDBMS (RELATIONAL DATABASE MANAGEMENT
SYSTEM)
The word RDBMS is termed as 'Relational Database Management
System.' It is represented as a table that contains rows and column.
RDBMS is based on the Relational model; it was introduced by E. F.
Codd.
A relational database contains the following components:
• Table
• Record/ Tuple
• Field/Column name /Attribute
• Instance
• Schema
• Keys
An RDBMS is a tabular DBMS that maintains the security, integrity,
accuracy, and consistency of the data.
RDBMS (RELATIONAL DATABASE MANAGEMENT
SYSTEM)
The word RDBMS is termed as 'Relational Database Management
System.' It is represented as a table that contains rows and column.
RDBMS is based on the Relational model; it was introduced by E. F.
Codd.
A relational database contains the following components:
• Table
• Record/ Tuple
• Field/Column name /Attribute
• Instance
• Schema
• Keys
An RDBMS is a tabular DBMS that maintains the security, integrity,
accuracy, and consistency of the data.
DATA PROCESSING
REQUIREMENT
Data processing requirements refer to the specific needs and criteria that must be met
in order to effectively and efficiently process data within a system or application.
These requirements2 are crucial for designing, implementing, and maintaining
systems that handle data in various industries and domains.
Here are key considerations for data processing requirements:
Clear and well-defined data processing requirements are essential for building robust and effective systems that
meet the needs of users and stakeholders while ensuring the integrity and security of the processed data.
DATA BASE SYSTEM APPLICATIONS
Database systems are a fundamental component of various
applications across different domains. They provide a structured and
organized way to store, manage, and retrieve data.
Here are some common types of database system applications:
ENTERPRISE RESOURCE PLANNING (ERP) SYSTEMS:
ERP systems integrate and manage various business processes, including finance, human resources, supply chain, and manufacturing.
Databases in ERP systems store and retrieve data to support the overall functioning of an organization.
Data Independence Changes in data structures or file formats Database systems provide a level of
often require modifications to multiple abstraction called data independence.
application programs. Programs are Changes in the database structure do not
closely tied to the data format. affect application programs, ensuring a higher
degree of flexibility.
Data Redundancy Redundancy is common, as the same data Redundancy is minimized through
may be stored in multiple files. normalization techniques. Data is stored in a
Maintaining consistency across files can centralized and structured manner, reducing
be challenging. duplication and improving data consistency.
DATA BASE SYSTEM VS TRADITIONAL FILE-
File-Based System Database System
BASED
Data RetrievalSYSTEM
and Retrieving and querying data in a file- Database management systems (DBMS)
Querying based system often involves writing provide a standardized language (SQL) for
custom programs for each query. There is querying data. Users can retrieve information
limited support for complex queries. using powerful and flexible queries without
the need to write custom programs.
Concurrency and Data Ensuring data consistency and integrity Database systems use sophisticated
Integrity in concurrent access situations is concurrency control mechanisms to manage
challenging. File locking mechanisms simultaneous access to data. ACID properties
may be employed. (Atomicity, Consistency, Isolation,
Durability) ensure data integrity in
transactions.
Scalability Scalability can be limited, especially as Database systems are designed to handle large
the volume of data and the number of volumes of data and users. They provide
users increase. mechanisms for optimizing performance and
scalability.
DATA BASE SYSTEM VS TRADITIONAL FILE-
BASED SYSTEM
File-Based System Database System
Data Security Security measures are typically Database systems offer centralized and robust
implemented on individual files, making security features. Access control is managed
it challenging to manage security at the database level, ensuring a unified and
consistently. controlled security environment.
Data Relationships Establishing and managing relationships Relationships between data are explicitly
between data in different files is the defined in the database schema, facilitating
responsibility of individual programs. easier management and navigation of
complex data relationships.
DATA ABSTRACTION
Data abstraction is the procedure of concealing irrelevant or unwanted data from the end user.
• The database system contains intricate(complicated) data structures and relations. The
developers keep away the complex data from the user and remove the complications so that
the user can comfortably access data in the database and can only access the data they want,
which is done with the help of data abstraction.
• The main purpose of data abstraction is to hide irrelevant data and provide an abstract view
of the data. With the help of data abstraction, developers hide irrelevant data from the user
and provide them the relevant data. By doing this, users can access the data without any
hassle, and the system will also work efficiently.
• In DBMS, data abstraction is performed in layers which means there are levels of data
abstraction in DBMS that Based on these levels, the database management system is
designed.
LEVELS OF DATA
ABSTRACTIONS
1. PHYSICAL OR INTERNAL LEVEL:
The physical or internal layer is the lowest level of data abstraction in the database management
system. It is the layer that defines how data is actually stored in the database. It defines methods to
access the data in the database. It defines complex data structures in detail, so it is very complex to
understand, which is why it is kept hidden from the end user.
Data Administrators (DBA) decide how to arrange data and where to store data. The Data
Administrator (DBA) is the person whose role is to manage the data in the database at the physical or
internal level. There is a data center that securely stores the raw data in detail on hard drives at this
level.
2. LOGICAL OR CONCEPTUAL LEVEL:
The logical or conceptual level is the intermediate or next level of data abstraction. It explains what
data is going to be stored in the database and what the relationship is between them.
It describes the structure of the entire data in the form of tables. The logical level or conceptual level is
less complex than the physical level. With the help of the logical level, Data Administrators (DBA)
abstract data from raw data present at the physical level.
3. VIEW OR EXTERNAL LEVEL:
View or External Level is the highest level of data abstraction. There are different views at this level
that define the parts of the overall data of the database. This level is for the end-user interaction; at this
level, end users can access the data based on their queries.
ADVANTAGES OF DATA
ABSTRACTION INqueries.
•Users can easily access the data based on their DBMS
•It provides security to the data stored in the database.
•Database systems work efficiently because of data abstraction.
DBMS SCHEMA
DBMS schema means designing the database.
For example, if we take the example of the employee table. The employee table contains the following attributes.
These attributes are EMP_ID, EMP_ADDRESS, EMP_NAME, EMP_CONTACT. These are the schema of the
employee table.
Schema is further divided into three types. These three are as follows.
1.Logical schema.
2.View schema.
3.Physical schema.
The schema defines the logical view of the database. It provides some knowledge about the database and what data
needs to go where.
We can understand the relationship between the data present in the database. With the help of this schema, we can
implement the DBMS function such as delete, insert, search, update, etc.
Let us understand this by the below diagram. There are three diagrams, i.e., section, course, and student. This diagram
shows the relationship between the section and the course diagram. Schema is the only type of structural view of the
database that is shown below.
1. PHYSICAL SCHEMA:
In the physical schema, the database is designed at the physical level. At this level, the schema describes how the
data block is stored and how the storage is managed.
2. LOGICAL SCHEMA:
In the logical schema, the database is designed at a logical level. At this level, the programmer and data
administrator perform their work. Also, at this level, a certain amount of data is stored in a structured way. But the
internal implementation data are hidden in the physical layer for the security proposed.
3. VIEW SCHEMA:
In view schema, the database is designed at the view level. This schema describes the user interaction with the
database system.
Data Definition Language (DDL) statements help to denote the schema of a database. The schema represents the
name of the table, the name of attributes, and their types; constraints of the tables are related to the schema.
Therefore, if users want to modify the schema, they can write DDL statements.
DBMS INSTANCE
In DBMS, the data is stored for a particular amount of time and is called an instance of the database.
The database schema defines the attributes of the database in the particular DBMS. The value of the particular
attribute at a particular moment in time is known as an instance of the DBMS.
For example, in the above example, we have taken the example of the attribute of the schema. In this example,
each table contains two rows or two records. In the above schema of the table, the employee table has some
instances because all the data stored by the table have some instances.
Let's take another example: Let's say we have a single table student in the database; today, the table has 100
records, so today, the instance of the database has 100 records. We are going to add another 100 records to this
table by tomorrow, so the instance of the database tomorrow will have 200 records in the table. In short, at a
particular moment, the data stored in the database is called the instance; this change over time as and when we
add, delete or update data in the database.
DIFFERENCES BETWEEN DATABASE
SCHEMA
Database Schema
AND INSTANCE
Database Instance
It is the definition of the database, or it is defined as the It is a snapshot of a database at a specific moment.
description of the database.
Defines the basic structure of the database, i.e., how the It is the set of Information stored at a particular time.
data will be stored in the database.
Schema is same for whole database. Data in instances can be changed using addition,
deletion, updation.
There are following four data models used for understanding the structure of the database
RELATIONAL DATA MODEL
This type of model designs the data in the form of rows and columns within a table. Thus, a
relational model uses tables for representing data and in-between relationships. Tables are also
called relations.
This model was initially described by Edgar F. Codd, in 1969.
The relational data model is the widely used model which is primarily used by commercial
data processing applications.
INSTANCE
The overall design of a database is called schema.
A database schema is the skeleton structure of the database. It represents the logical view of the entire database.
A schema contains schema objects like table, foreign key, primary key, views, columns, data types, stored
procedure, etc.
A database schema can be represented by using the visual diagram. That diagram shows the database objects
and relationship with each other.
A database schema is designed by the database designers to help programmers whose software will interact with
the database. The process of database creation is called data modeling.
A schema diagram can display only some aspects of a schema like the name of record type, data type, and
constraints. Other aspects can't be specified through the schema diagram.
For example, the given figure neither show the data type of each data item nor the relationship among
various files.
In the database, actual data changes quite frequently.
For example, in the given figure, the database changes whenever we add a new grade or add a student.
The data at a particular moment of time is called the instance of the database.
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.
5. System Administrators:
Manage the server infrastructure on which the database system operates.
6. Security Administrators:
• Specialize in enforcing security measures within the database system.
• Manage user access, define roles and permissions, and monitor for security threats.
7. Database Developers:
• Design and implement the database schema and structures.
• Write SQL queries, stored procedures, triggers, and other database objects.
• Collaborate with application developers to ensure effective integration with databases.
8. Data Stewards:
• Ensure the quality, accuracy, and consistency of data within the database.
• Define and enforce data quality standards.
• Monitor and resolve data quality issues.
9. Executive Users:
• Executives and top-level management who use summary-level information for decision-making.
• May access dashboards or reports providing key performance indicators (KPIs).
10. Database Designers:
• Responsible for creating the initial database design, including tables, relationships, and constraints.
• Work on translating business requirements into an effective database structure.
DATA BASE ADMINISTRATOR
A Database Administrator (DBA) is a professional responsible for the overall management, maintenance, and performance of
a database system.
DBAs play a crucial role in ensuring the integrity, security, and availability of data, as well as optimizing the performance of
the database. Their responsibilities can vary depending on the size of the organization and the complexity of the database
system.
Some key aspects of the role of a Database Administrator:
Database Design:
Security Management:
Backup and Recovery:
Performance Tuning:
Database Maintenance:
User Management:
Data Migration:
Disaster Recovery Planning:
Database Upgrades and Patching:
Capacity Planning:
Documentation:
1. Database Design:
Collaborate with database designers and developers to design the logical and physical structure of the database.
Define tables, relationships, constraints, and indexes based on business requirements.
2. Security Management:
Control access to the database by managing user accounts, roles, and permissions.
Implement security measures to protect sensitive data.
Enforce authentication mechanisms to ensure authorized access.
4. Performance Tuning:
Optimize the database for efficient and fast query performance.
Monitor and analyze system performance to identify and address bottlenecks.
Tune SQL queries and database configurations for optimal efficiency.
5. Database Maintenance:
• Perform routine maintenance tasks, such as updating statistics, rebuilding indexes, and cleaning up unnecessary
data.
• Monitor system logs for errors and address issues promptly.
6. User Management:
• Create, modify, and delete user accounts.
• Assign roles and permissions based on job responsibilities.
• Ensure compliance with security policies.
7. Data Migration:
• Plan and execute data migration and transformation processes.
• Ensure data integrity and consistency during migration.
8. Disaster Recovery Planning:
• Develop and document disaster recovery plans to minimize downtime in the event of a system failure or disaster.
• Test and validate the effectiveness of recovery procedures.
9. Database Upgrades and Patching:
• Plan and execute database upgrades to newer versions.
• Apply patches and updates to address security vulnerabilities and improve system stability.
10. Capacity Planning:
Monitor and analyze database growth trends.
Plan for future capacity requirements and scaling.
11. Documentation:
Maintain comprehensive documentation of the database schema, configurations, and procedures.
Provide documentation for troubleshooting and knowledge sharing.
12. Collaboration:
Collaborate with developers, system administrators, and other stakeholders to ensure the smooth operation of the
database system.
Participate in cross-functional teams for project planning and implementation.
Database Administrators may specialize in different database management systems (e.g., Oracle, MySQL, Microsoft
SQL Server) and may work in various industries, including finance, healthcare, e-commerce, and more.
Their expertise is essential for maintaining a secure, efficient, and reliable database environment.
DATABASE ARCHITECTURE
A Database Architecture is a representation of DBMS design.
It helps to design, develop, implement, and maintain the database management system.
A DBMS architecture allows dividing the database system into individual components that can be independently
modified, changed, replaced, and altered.
It also helps to understand the components of a database.
TYPES OF DBMS
ARCHITECTURE
There are mainly three types of DBMS architecture:
• One Tier Architecture (Single Tier Architecture)
• Two Tier Architecture
• Three Tier Architecture
1-TIER ARCHITECTURE
• 1 Tier Architecture in DBMS is the simplest architecture of Database in which the client, server, and
Database all reside on the same machine.
• A simple one tier architecture example would be anytime you install a Database in your system and
access it to practice SQL queries. But such architecture is rarely used in production.
• 3-Tier database Architecture design is an extension of the 2-tier client-server architecture. A 3-tier architecture has
the following layers:
• Presentation layer (your PC, Tablet, Mobile, etc.)
• Database Server
The Application layer resides between the user and the DBMS, which is responsible for communicating the user’s
request to the DBMS system and send the response from the DBMS to the user. The application layer(business
logic layer) also processes functional logic, constraint, and rules before passing data to the user or down to the
DBMS.
STRUCTURE OF DATABASE
MANAGEMENT
but it is different from the tier architecture of SYSTEM
Structure of Database Management System is also referred to as Overall System Structure or Database Architecture
Database.
Database Management System (DBMS) is software that allows access to data stored in a database and provides an
easy and effective method of –
• Defining the information.
• Data Theft: When somebody steals the information stored on databases, and servers, this process is
known as Data Theft.
The database system is divided into three components: Query Processor, Storage Manager, and Disk Storage.
1. Query Processor: It interprets the requests (queries) received from end user via an application program into
instructions. It also executes the user request which is received from the DML compiler.
Query Processor contains the following components –
•DML Compiler: It processes the DML statements into low level instruction (machine language), so that they can be
executed.
•DDL Interpreter: It processes the DDL statements into a set of table containing meta data (data about 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.
The database system is divided into three components: Query Processor, Storage Manager, and Disk Storage.
2. Storage Manager: Storage Manager is a program that provides an interface between the data stored in the database
and the queries received. It is also known as Database Control System. It maintains the consistency and integrity of the
database by applying the constraints and executing the DCL statements. It is responsible for updating, storing, deleting,
and retrieving data in the database.
It contains the following components –
•Authorization Manager: It ensures role-based access control, i.e,. checks whether the particular 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.
3. Disk Storage: It contains the following components –
•Data Files: It stores the data.
•Data Dictionary: It contains the information about the structure of any database object. It is the repository of
information that governs the metadata.
•Indices: It provides faster retrieval of data item.
The structure of a Database Management System (DBMS) can be divided into three main components: the Internal Level,
the Conceptual Level, and the External Level.
1.Internal Level: This level represents the physical storage of data in the database. It is responsible for storing and
retrieving data from the storage devices, such as hard drives or solid-state drives. It deals with low-level implementation
details such as data compression, indexing, and storage allocation.
2.Conceptual Level: This level represents the logical view of the database. It deals with the overall organization of data in
the database and the relationships between them. It defines the data schema, which includes tables, attributes, and their
relationships. The conceptual level is independent of any specific DBMS and can be implemented using different DBMSs.
3.External Level: This level represents the user’s view of the database. It deals with how users access the data in the
database. It allows users to view data in a way that makes sense to them, without worrying about the underlying
implementation details. The external level provides a set of views or interfaces to the database, which are tailored to meet
the needs of specific user groups.
The three levels are connected through a schema mapping process that translates data from one level to another. The
schema mapping process ensures that changes made at one level are reflected in the other levels.
In addition to these three levels, a DBMS also includes a Database Administrator (DBA) component, which is
responsible for managing the database system. The DBA is responsible for tasks such as database design, security
management, backup and recovery, and performance tuning.
Overall, the structure of a DBMS is designed to provide a high level of abstraction to users, while still allowing low-
level implementation details to be managed effectively. This allows users to focus on the logical organization of data
in the database, without worrying about the physical storage or implementation details.
QUESTION
ANSWER
1. Define the terms data and information?
2. Define (i) Database (ii)DBMS
3. What are the disadvantages of file processing system?
4. Define instances and schemas of database?
5. What is data model? List the types of data models?
6. What is data Abstraction?
7. Who is DBA? What are the responsibilities of DBA?
8. Discuss Data Independence?
9. Explain Application of DBMS
10. What are the advantages of DBMS?
11. Define the terms: 1. Physical schema 2. logical schema
12. Give the levels of data abstraction?
13. What is the purpose of storage manager?
14. Differentiate between database system and file system?
15. Define Database Recovery.
16. Define Two Tier and Three Tier Architecture?
17. Discuss Transaction management?
18. Define Relationship and Relationship set?
19. Explain the architecture of DBMS?
1. Define Data Abstraction and discuss levels of Abstraction?
2. Discuss about different types of Data models?
3. Describe the architecture of DBMS?
4. Compare and Contrast file Systems with database system?
5. Discuss additional features of the ER-Models?
6. Discuss about the logical database Design?
7. What is physical, logical and view level data abstraction.
8. What is constraint in database? Explain types of constraints with suitable example?
9. Describe Relational model.
10. Difference between 2-Tier and 3-Tier architecture?
11. Explain the purpose of the database system. Explain different database users. What are the responsibilities of a
DBA?
12. Define Database Management System. What is the role of Database administrator ?
13. Draw and explain System structure of Database management system.
14. What are the disadvantages of file-processing system?
15. Define and explain following terms. Levels of data abstraction, Instances, Schema, Physical data independence,
Logical data independence.
16. What is dbms? List and explain various database user.
1.DEFINE THE TERMS DATA AND INFORMATION?
2 DEFINE (I) DATABASE (II)DBMS