Unit-1 DBMS
Unit-1 DBMS
MULLANA (AMBALA)
A database management system (DBMS) is a software tool that enables users to manage a
database easily. It allows users to access and interact with the underlying data in the database.
These actions can range from simply querying data to defining database schemas that
fundamentally affect the database structure.
Understanding the distinction between data and information is crucial in today’s digital landscape.
Data comprises raw, unprocessed facts that need context to become useful, while information is
data that has been processed, organized, and interpreted to add meaning and value. This
explanation sets the stage for how businesses can transform data into strategic assets
through effective knowledge management.
What is Data?
Data represents raw elements or unprocessed facts, including numbers and symbols to text and
images. When collected and observed without interpretation, these elements remain just data—
simple and unorganized. When these pieces are analyzed and contextualized, they transform into
something more meaningful.
MULLANA (AMBALA)
• Qualitative data is descriptive but non-numerical, such as a person’s name and sex.
What is Information?
You get information when data is processed, organized, interpreted, and structured. The
comprehensible output derived from raw data helps inform decisions, strategies, and actions.
Information is essentially data made valuable and accessible—an integral component of decision-
making.
For instance, if data points include daily temperature readings over a year, information is
recognizing the trend of temperatures, understanding seasonal changes, and predicting future
weather conditions.
The transformation from data to information is fundamental in harnessing the potential of business
analytics and involves several key distinctions. In its original form, data is raw and often chaotic,
lacking meaningful structure or context. On the other hand, information is the refined, analyzed,
and structured output derived from this data, tailored to provide actionable insights and facilitate
strategic decision-making.
• Data is raw and unstructured, like individual customer interactions or transaction logs.
• Information provides context and insights, like a trend analysis that shows increasing customer
satisfaction or sales figures over time.
• Data is often abundant and readily available but can be overwhelming without interpretation.
• Information is curated and actionable, offering strategic insights to guide business decisions.
MAHARISHI MARKANDESHWAR (DEEMED TO BE UNIVERSITY),
MULLANA (AMBALA)
What Is a Database?
Database defined
File System Vs DBMS: Explore What is the Difference between File System and DBMS
File System helps to store a collection of raw files of data into a hard disk, while DBMS is a
software system, and it helps to store, manipulate or recover data. In this article, attempts have
been made to explain the terms, find their definitions and comparisons, and finally to identify the
difference between File System and DBMS.
• File System
• DBMS
File system is a method of organising the files with a hard disk or other medium of storage. File
system arranges the files and helps in retrieving the files, when required. It is compatible with
MAHARISHI MARKANDESHWAR (DEEMED TO BE UNIVERSITY),
MULLANA (AMBALA)
different file types, such as mp3, doc, txt, mp4,etc and these are also grouped into directories. It
also influences the method of writing and reading data to the hard disk.
Examples are NTFS or the New Technology File System and EXT, the Extended File System.
What is a DBMS?
DBMS, meanwhile, is the acronym for Database Management System. It is also a software used
to store and regain user’s data, while also maintaining the required security measures. This
includes a group of programmes that can help to manipulate the database. In bigger systems,
DBMS helps the users as well as third party software to store and recover the data.
The file system is a collection of data and for any management with it, the user has to write the
procedures, while DBMS is a collection of data and user need not write the procedures for
handling the database. Learn about what is the difference between a file system and DBMS from
the table given.
Used to manage and organise the files A software to store and retrieve the user’s data
stored in the hard disk of the computer
MULLANA (AMBALA)
Less complex, does not support complicated More complexity in managing the data, easier to
transactions implement complicated transactions
Less expensive in comparison to DBMS Higher cost than the File system
Does not support crash recovery Crash recovery mechanism is highly supported
In a database management system (DBMS), a schema is the overall design of a database, while
an instance is the data stored in the database at a specific moment, and a subschema is a view of
the database as seen by an application program:
• Schema
The schema is the overall description of a database, including its structure and how everything
is located. There are three types of schemas: physical, logical, and view.
• Instance
The instance is the collection of data and information stored in the database at a specific
moment in time.
• Subschema
MAHARISHI MARKANDESHWAR (DEEMED TO BE UNIVERSITY),
MULLANA (AMBALA)
A subschema is a view of the database as seen by an application program. It's often a subset of
the schema definition. Subschemas can restrict access to the database, identify accessible areas,
records, and elements, and define logical records.
Here the 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.
MAHARISHI MARKANDESHWAR (DEEMED TO BE UNIVERSITY),
MULLANA (AMBALA)
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.
MAHARISHI MARKANDESHWAR (DEEMED TO BE UNIVERSITY),
MULLANA (AMBALA)
MULLANA (AMBALA)
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.
Moreover, 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.
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.
MAHARISHI MARKANDESHWAR (DEEMED TO BE UNIVERSITY),
MULLANA (AMBALA)
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.
Both of these help in describing the data available in a database, but there is a fundamental
difference between Schema and Instance in DBMS. Schema refers to the overall description of
any given database. Instance basically refers to a collection of data and Information that the
database stores at any particular moment.
MULLANA (AMBALA)
This corresponds to the variable The value of the variable in a program at a point
declaration of a programming language. in time corresponds to an instance of the database
schema.
Defines the basic structure of the database, It is the set of Information stored at a particular
i.e., how the data will be stored in the time.
database.
Schema is same for whole database. Data in instances can be changed using addition,
deletion, updation.
MULLANA (AMBALA)
snapshots. They can even move these backups to third-party locations such as cloud storage
for safekeeping.
• Performance tuning. DBMS can monitor the performance of databases using integrated
tools and enable users to tune databases by creating optimized indexes. It reduces I/O usage to
optimize SQL queries, enabling the best performance from the database.
• Data recovery. In a recovery operation, DBMS provides a recovery platform with the
necessary tools to fully or partially restore databases to their previous state—effortlessly.
All these administrative tasks are facilitated using a single management interface. Most modern
DBMS support handling multiple database workloads from a centralized DBMS software, even
in a distributed database scenario. Furthermore, they allow organizations to have a governable
top-down view of all the data, users, groups, locations, etc., in an organized manner.
MULLANA (AMBALA)
Need of DBMS
A Database Management System (DBMS) is essential for various reasons in modern computing
environments. Here are some key reasons why DBMS is necessary:
1. Data Organization and Management
MAHARISHI MARKANDESHWAR (DEEMED TO BE UNIVERSITY),
MULLANA (AMBALA)
● Structured Data Storage: DBMS allows for the systematic storage of data in tables, making it
easy to organize, retrieve, and manage large volumes of data.
● Efficient Data Retrieval: With a well-designed DBMS, querying and retrieving specific data
becomes efficient and straightforward.
3. Data Security
● Access Control: DBMS provides robust security mechanisms to control access to data,
ensuring that only authorized users can perform certain actions on the database.
● Data Encryption: Sensitive data can be encrypted to protect it from unauthorized access and
breaches.
MULLANA (AMBALA)
6. Data Independence
● Logical Data Independence: The ability to change the logical schema without altering the
physical schema, thus not affecting the applications using the data.
● Physical Data Independence: Changes in the physical storage of data do not impact the
logical schema, ensuring that applications can run without modifications.
7. Transaction Management
● ACID Properties: DBMS ensures that all database transactions adhere to ACID properties
(Atomicity, Consistency, Isolation, Durability), providing reliable and secure transaction
processing.
● Concurrency Control: Mechanisms like locking and timestamping prevent data anomalies in a
multi-user environment.
8. Data Abstraction
● Abstraction Levels: DBMS provides different levels of abstraction (physical, logical, and view
levels) to simplify data management and improve usability.
● User-Friendly Interfaces: Query languages like SQL offer a user-friendly interface to interact
with the database, abstracting the complexities of data handling.
MULLANA (AMBALA)
we will look at the common components that are universal across all DBMS software, including:
• Storage engine
• Query language
• Query processor
• Optimization engine
• Metadata catalog
• Log manager
• Reporting and monitoring tools
• Data utilities
MAHARISHI MARKANDESHWAR (DEEMED TO BE UNIVERSITY),
MULLANA (AMBALA)
MULLANA (AMBALA)
Storage engine
The storage engine is the core component of the DBMS that interacts with the file system at an
OS level to store data. All SQL queries which interact with the underlying data go through the
storage engine.
● Integration with BI Tools: Modern DBMS can integrate with Business Intelligence (BI) tools
for advanced data analytics and visualization.
10. Scalability and Performance
● Handling Large Data Volumes: DBMS is designed to handle large volumes of data efficiently,
ensuring optimal performance even as the data grows.
● Performance Optimization: Techniques such as indexing, caching, and query optimization
enhance the performance of data retrieval and processing.
Data Modeling
Data modeling is the process of creating a visual representation of either a whole information
system or parts of it to communicate connections between data points and structures. Data can be
modeled at various levels of abstraction. The process begins by collecting information about
business requirements from stakeholders and end users. These business rules are then translated
into data structures to formulate a concrete database design. A data model can be compared to a
roadmap, an architect’s blueprint or any formal diagram that facilitates a deeper understanding of
what is being designed. Data modeling employs standardized schemas and formal techniques.
This provides a common, consistent, and predictable way of defining and managing data
resources across an organization, or even beyond.
MAHARISHI MARKANDESHWAR (DEEMED TO BE UNIVERSITY),
MULLANA (AMBALA)
MULLANA (AMBALA)
MULLANA (AMBALA)
MULLANA (AMBALA)
MULLANA (AMBALA)
Data Independence
Data Independence is mainly defined as a property of DBMS that helps you to change the
database schema at one level of a system without requiring to change the schema at the next
level. it helps to keep the data separated from all program that makes use of it.
We have namely two levels of data independence arising from these levels of abstraction:
MULLANA (AMBALA)
Data Independence
MULLANA (AMBALA)
It refers to the characteristic of being able to modify the physical schema without any
alterations to the conceptual or logical schema, done for optimization purposes, e.g., the
Conceptual structure of the database would not be affected by any change in storage size of the
database system server. Changing from sequential to random access files is one such example.
These alterations or modifications to the physical structure may include:
It refers characteristic of being able to modify the logical schema without affecting the external
schema or application program. The user view of the data would not be affected by any
changes to the conceptual view of the data. These changes may include insertion or deletion of
attributes, altering table structures entities or relationships to the logical schema, etc.
A Data Model in Database Management System (DBMS) is the concept of tools that are
developed to summarize the description of the database. Data Models provide us with a
transparent picture of data which helps us in creating an actual database. It shows us from the
design of the data to its proper implementation of data.
MAHARISHI MARKANDESHWAR (DEEMED TO BE UNIVERSITY),
MULLANA (AMBALA)
The conceptual data model describes the database at a very high level and is useful to
understand the needs or requirements of the database. It is this model, that is used in the
requirement-gathering process i.e. before the Database Designers start making a particular
database. One such popular model is the entity/relationship model (ER model). The E/R model
specializes in entities, relationships, and even attributes that are used by database designers. In
MAHARISHI MARKANDESHWAR (DEEMED TO BE UNIVERSITY),
MULLANA (AMBALA)
terms of this concept, a discussion can be made even with non-computer science(non-
technical) users and stakeholders, and their requirements can be understood.
Components of ER Model:
1. Entity: An entity is referred to as a real-world object. It can be a name, place, object, class,
etc. These are represented by a rectangle in an ER Diagram.
2. Attributes: An attribute can be defined as the description of the entity. These are
represented by Ellipse in an ER Diagram. It can be Age, Roll Number, or Marks for a
Student.
3. Relationship: Relationships are used to define relations among different entities. Diamonds
and Rhombus are used to show Relationships.
• This type of Data Models are designed and developed for a business audience.
MULLANA (AMBALA)
Conceptual data models known as Domain models create a common vocabulary for all
stakeholders by establishing basic concepts and scope
This type of data model is used to represent only the logical part of the database and does not
represent the physical structure of the database. The representational data model allows us to
focus primarily, on the design part of the database. A popular representational model is a
Relational model. The relational Model consists of Relational Algebra and Relational Calculus.
In the Relational Model, we basically use tables to represent our data and the relationships
MAHARISHI MARKANDESHWAR (DEEMED TO BE UNIVERSITY),
MULLANA (AMBALA)
The advantage of using a Representational data model is to provide a foundation to form the
base for the Physical model
MULLANA (AMBALA)
The physical Data Model is used to practically implement Relational Data Model. Ultimately,
all data in a database is stored physically on a secondary storage device such as discs and
tapes. This is stored in the form of files, records, and certain other data structures. It has all the
information on the format in which the files are present and the structure of the databases, the
presence of external data structures, and their relation to each other. Here, we basically save
tables in memory so they can be accessed efficiently. In order to come up with a good physical
model, we have to work on the relational model in a better way. Structured Query Language
(SQL) is used to practically implement Relational Algebra.
This Data Model describes HOW the system will be implemented using a specific DBMS
system. This model is typically created by DBA and developers. The purpose is actual
implementation of the database.
• The physical data model describes data need for a single project or application though it
maybe integrated with other physical data models based on project scope.
• Data Model contains relationships between tables that which addresses cardinality and
nullability of the relationships.
• Developed for a specific version of a DBMS, location, data storage or technology to be used
in the project.
• Columns should have exact datatypes, lengths assigned and default values.
MAHARISHI MARKANDESHWAR (DEEMED TO BE UNIVERSITY),
MULLANA (AMBALA)
• Primary and Foreign keys, views, indexes, access profiles, and authorizations, etc. are
defined
1. Hierarchical Model
The hierarchical Model is one of the oldest models in the data model which was developed by
IBM, in the 1950s. In a hierarchical model, data are viewed as a collection of tables, or we can
MAHARISHI MARKANDESHWAR (DEEMED TO BE UNIVERSITY),
MULLANA (AMBALA)
say segments that form a hierarchical relation. In this, the data is organized into a tree-like
structure where each record consists of one parent record and many children. Even if the
segments are connected as a chain-like structure by logical associations, then the instant
structure can be a fan structure with multiple branches. We call the illogical associations as
directional associations.
2. Network Model
The Network Model was formalized by the Database Task group in the 1960s. This model is
the generalization of the hierarchical model. This model can consist of multiple parent
segments and these segments are grouped as levels but there exists a logical association
between the segments belonging to any level. Mostly, there exists a many-to-many logical
association between any of the two segments.
In the Object-Oriented Data Model, data and their relationships are contained in a single
structure which is referred to as an object in this data model. In this, real-world problems are
represented as objects with different attributes. All objects have multiple relationships between
them. Basically, it is a combination of Object Oriented programming and a Relational
Database Model.
The float data model basically consists of a two-dimensional array of data models that do not
contain any duplicate elements in the array. This data model has one drawback it cannot store a
large amount of data that is the tables can not be of large size.
MAHARISHI MARKANDESHWAR (DEEMED TO BE UNIVERSITY),
MULLANA (AMBALA)
The Context data model is simply a data model which consists of more than one data model.
For example, the Context data model consists of ER Model, Object-Oriented Data Model, etc.
This model allows users to do more than one thing which each individual data model can do.
Semi-Structured data models deal with the data in a flexible way. Some entities may have extra
attributes and some entities may have some missing attributes. Basically, you can represent
data here in a flexible way.
2. It helps us in finding the missing data and also in minimizing Data Redundancy.
4. The data model should be detailed enough to be used for building the physical database.
5. The information in the data model can be used for defining the relationship between tables,
primary and foreign keys, and stored procedures.
1. In the case of a vast database, sometimes it becomes difficult to understand the data model.
MAHARISHI MARKANDESHWAR (DEEMED TO BE UNIVERSITY),
MULLANA (AMBALA)
2. You must have the proper knowledge of SQL to use physical models.
3. Even smaller change made in structure require modification in the entire application.
5. To develop Data model one should know physical data stored characteristics.
Conclusion
• Data modeling is the process of developing data model for the data to be stored in a
Database.
• Data Models ensure consistency in naming conventions, default values, semantics, security
while ensuring quality of the data.
• Data Model structure helps to define the relational tables, primary and foreign keys and
stored procedures.
• The main aim of conceptual model is to establish the entities, their attributes, and their
relationships.
• Logical data model defines the structure of the data elements and set the relationships
between them.
• A Physical Data Model describes the database specific implementation of the data model.
MAHARISHI MARKANDESHWAR (DEEMED TO BE UNIVERSITY),
MULLANA (AMBALA)
• The main goal of a designing data model is to make certain that data objects offered by the
functional team are represented accurately.
• The biggest drawback is that even smaller change made in structure require modification in
the entire application.
Users are put into different groups based on how they want to use the system. There are four
different kinds of database users: Naive Users, Application programmers, Analysts, Specialized
Users and Database Programmers. The person in charge of the system as a whole is termed the
database administrator (DBA). The DBA also needs to define schema, storage structure and
access methods. DBA modifies schema and physical organization, grants access to data,
specifies integrity constraints and does regular maintenance.
Database Users
The people who use the system are called users. Users can be categorized into those who actually
use and manage the material (referred to as "Actors on the Scene") and those who make it
possible to create the database and the DBMS software (referred to as "Workers Behind the
Scene").
Users are put into different groups based on how they want to use the system. There are four
different kinds of database users:
1. Naïve-Users:
Naive users are people who don't know much about computers and use the system by
MAHARISHI MARKANDESHWAR (DEEMED TO BE UNIVERSITY),
MULLANA (AMBALA)
calling up one of the application programs that have already been written. For example, a
bank teller uses a program called "initaite_transfer" to move Rs. 15,000 from account A
to account B. This program asks the teller for the amount of money that needs to be
moved, the account that the money is coming from, and the account that the money is
going to.
2. Application-programmers:
These are people who work in computers and write programs for applications.
Application programmers have a lot of tools to choose from when making user interfaces.
E.g., RAD (Rapid Application Development) tools let an application programmer make
forms and reports without having to write a program.
3. Sophisticated-users:
These people know how to use the system without writing programs. They write their
requests in a language for talking to databases. They send each query to a query
processor, whose job is to turn DML statements into instructions that the storage manager
can understand. This group is made up of analysts who use queries to look at data in the
database.
For example, Online Analytical Processing (OLAP) tools make analysts' jobs easier by
letting them see data summaries in different ways. For example, analysts can see total
products by categories, by no. of sales, or by a combination of categories and no. of sales.
4. Specialized-users:
Specialized users are advanced users who write database programs that don't fit into the
traditional way of processing data. Among these applications are computer-aided design
systems, knowledge base and expert systems, systems that store data with complex data
types (like audio/visual data), and systems that model the environment.
MAHARISHI MARKANDESHWAR (DEEMED TO BE UNIVERSITY),
MULLANA (AMBALA)
Database Administrators
One of the main reasons to use DBMS is to have centralized control over both the data and the
programs that access the data. The person in charge of the system as a whole is termed the
database administrator (DBA). The following are some of the duties of the DBA:
1. Defining-Schema:
The DBA makes the original database schema by writing a set of definitions. The DDL
compiler translates these definitions into a set of tables, which are then stored in the data
dictionary.
2. Defining Storage Structure and Access Methods:
The DBA makes the right storage structures and access methods by writing a set of
definitions that the data-storage and data-definition language compiler translates.
3. Modification of Schema and Physical Organization:
The DBA makes changes to the schema and physical organization to reflect how the
organization's needs change or to change the physical organization to make it run better.
4. Giving Permission to Access Data:
The database administrator can control which parts of the database different users can
access by giving different types of permission. The information about who has
permission to access the data is kept in a special system structure that is checked by the
database system every time someone tries to access the data.
5. Fulfilling Integrity-Constraint Requirements:
The values of the data stored in the database must meet certain consistency requirements.
The database administrator must tell the database about this constraint. The integrity
constraints are kept in a special structure that the database system checks every time it
makes a change.
MAHARISHI MARKANDESHWAR (DEEMED TO BE UNIVERSITY),
MULLANA (AMBALA)