UNIT- I
Overview of Database Systems: Introduction: Database system, Characteristics
(Database Vs File System), Database Users, Advantages of Database systems, Database
applications. Data Models: Introduction; types of data models, Concepts of Schema,
Instance and data independence; Three tier schema architecture for data
independence; Database system structure, environment, Centralized and Client Server
architecture for the database
Explain about data, information, Database, DBMS?
Data:Data are raw facts. The word raw indicates that the facts have not yet been
processed to reveal their meaning. The raw data must be properly formatted for
storage, processing, and presentation.
PROCESS: It is the Actual Interpretation and Execution of the instruction on data Which
carried out by the computer processing unit to obtain the result.
INFORMATION:Information is the result of processing raw data to reveal its meaning.
Data processing can be as simple as organizing data to reveal patterns or as complex as
making forecast or drawing inferences using statistical modelling. To reveal meaning,
information requires context.
DATABASE:Efficient data management typically requires the use of a computer
database. A database is a shared integrated computer structure that stores a collection
of
o End-user data, that is, raw facts of interest to the enduser.
o Metadata or data about data, through which the end-user data are integrated and
managed.
The metadata provide a description of the data characteristics and the set of
relationships that link the data found within the database. For example, the
metadata component stores information such as the name of each data element,
the type of values (numeric, dates or text) stored on each data element, whether or
not the data element can be left empty, and so on. Therefore, the metadata provide
information that complements and expand the value and use of the data.
DBMS National Degree college,Nandyal
DATABASE MANAGEMENT SYSTEM: A database management system (DBMS) is a
collection of programs that manages the database structure and controls access to the
data stored in the database.
DBMS stands for Database Management System. We can break it like this DBMS
= Database + Management System. Database is a collection of data and Management
System is a set of programs to store and retrieve those data.
Based on this we can define DBMS like this: DBMS is a collection of inter-related
data and set of programs to store & access those data in an easy and effective
manner.
OBJECTIVES OF DBMS
Share ability: An ability to share data resources is a fundamental objective of
database management. In its fullest interpretation, this means different people and
different processes using the same actual data at virtually the same time. Rather far
reaching ramifications stem from the stated objective of shareability:
o - Serving differently types of users with varying skill levels
o - Handling different user views of the same stored data.
o - Combining interrelated data
o - Setting standards
o - Controlling concurrent updates so as to maintain data integrity
o - Coordinating restart and recovery operations across multiple users.
This list indicates some of the additional problems which arise in managing shared
data. A central implication of sharing is that compromise will often be required
between conflicting user needs as, for example, in the establishment of a data
structure and corresponding storage structure.
Availability: Availability means bringing the data of an organization to the users of that
data. They system which manages data resources should be easily accessible to the
people within n organization – making the data available when and where it is needed,
and in the manner and form in which it is needed. Availability refers to both the data
and the DBMS which delivers the data. Availability functions make the database
available to users: defining and creating a database, and getting data in and out of a
database. These are the direct functions performed by a DBMS. A DBMS should
accommodate diversity in the data stored.
Evolvability: Evolvability refers to the ability of the DBMS to change in response to
growing user needs and advancing technology. Evolvability is the system characteristic
that enhances future availability of the data resources. Evolvability is not the same as
expandability or extensibility, which imply extending or adding to the system, which
then grows ever larger. Evolvability covers expansion or contraction, both of which
may occur as the system changes to fit the ever changing needs and desires of the
using environment.
DBMS National Degree college,Nandyal
Integrity: The importance and pervasiveness of the need to maintain database
integrity is rooted in the reality that man is perfect. Destruction, errors and improper
disclosure must be anticipated and explicit mechanisms provided for handling them.
The three primary facts of database integrity are:-
protecting the existence of the database
Maintaining the quality of the database
Ensuring the privacy of the database
In developing DBMSs, the accountant’s concept of internal control has been
practically ignored. Computer specialists need such concepts to improve database
integrity and enhance management confidence.
Data Independency: DBMS supports the concept of data independence since it
represents a system for managing data separately from the programs that use the data.
DBMS Allows the user to store, update and retrieve data in an efficient manner. DBMS
provide an abstract view of how the data is stored in the database
Database Vs File System
Basis DBMS File System
DBMS is a collection of data. Over
The file system is a collection of
here, the user is not required to
data, Where the user has to write
Definition
write the procedures. the procedures which can lead to
loss of data also.
It gives the abstract view of data It provides the details of data
Data
that hides the details. representation and storage of
Abstraction
data.
DBMS provides the crash In a file system, it doesn’t have a
Crash
mechanism, i.e., DBMS protects the crash recovery mechanism.
Mechanism
user from system failure.
DBMS provides a good protection It is tough to protect a file system.
Protection
mechanism.
It contains a wide variety of It can’t efficiently store and
Data Storing sophisticated technology to store retrieve the data.
and retrieve the data.
It takes care of concurrent access Concurrent access in file system
of data using some form of locking. has many problems, like
Data
redirecting the file while deleting
Concurrency
some information and updating
some data.
Cost It has a higher cost than the file It is less expensive than DBMS.
DBMS National Degree college,Nandyal
system.
Database Users
Database users interact with data to update, read, and modify the given information
daily. There are various types of database users and we will learn in detail about them.
Database users can be divided into the following types ?
Naive users / Parametric users
Sophisticated users
End Users
Application Programmer or Specialized users or Back-End Developer
System Analyst
Database Administrator (DBA)
Temporary Users or Casual Users
These users can access the database and recover the data using various applications.
Let's have a quick understanding of all the types in detail ?
End Users/Parametric Users
These users access the database from the front end with the help of a pre-developed
application. They have little knowledge about the design and working of databases.
There are two types of end users ?
Naive Users ? These naive users are those users who don't have any database
knowledge. They depend on pre-developed applications like Bank Management
Systems, Library Management Systems, Hospital Management Systems, and
Railway Ticket Booking Systems(IRCTC) and get the desired result.
Sophisticated Users ? These users interact with the system without writing a
program and have separate databases for personal use. In the database, the
user passes each query to the query processor.
Following are two ways to interact with a system ?
i. They use the structure query language to run the query on the database.
ii. They use the tool of data analysis software. For example, data engineers and
data scientists are familiar with databases.
Application programmers
These programmers write the code for an application program that uses the database.
The application programmer can make the application according to user requirements
and control software that runs an entire computer system. The application program is
written in any programming language like C#, .net, JAVA, etc., and focuses on business,
engineering, and science program.
These programmers are categories into four different types ?
DBMS National Degree college,Nandyal
Web Developers
Computer Hardware Programmers
Database Developers
Software Developers
Following are some examples of software related to application programmers ?
Content access software
Educational Software
Information Worker Software
Media Development Software
Product Engineering Software
Enterprise Software
System Analyst
A System Analyst has also known as a business technology analyst. These professionals
are responsible for the design, structure, and properties of databases. The application
programmer uses the specifications provided by the system analyst to construct the
software that is used by end users. The analyst will gather information from the
shareholders as well as end users to understand their requirements and translate it
into functional specifications for the new system.
Following are few points that demonstrates the responsibility of system analyst ?
They serve as a team leaders.
They are responsible for managing projects.
They are the supervisor who manages the lower-level information Staff.
Database Administrator (DBA)
The DBA is the group of people that includes everything required to manage and solve
every complex. The DBA can easily use the database to find the information they need
and to plan the goal of the database. To meet future needs, they are ready for future
scope and provide solutions for end users. Therefore, they are known for high-level
management.
Below are given three points which shows the importance of Database Administrator ?
To handle the data loss.
To secure the privacy of data.
Monitor the recovery and backup of the database.
Temporary Users / Casual Users
These users utilize the database for testing and are only accessible for a limited time.
According to business requirements, these users update a little or new information to
the database with the help of a database administrator. It helps to maintain the
security and integrity of data. For example ? High-level management people are
temporary users with little knowledge of DBMS.
DBMS National Degree college,Nandyal
Evolution Of Databases:
File Based system was the predecessor to the database management System The
Chronological order of the development of the DBMS is as follows:
o Flat file System(1960s-1980s)
o Hierarchical Data model(1970s-1990s)
o Network Data Model (1989s-1990s)
o Relational Data model(1980s-present)
o Object Oriented Data model(OODBMS)(1990s-present)
o Data Ware Housing(1980s-present)
o Web-Enabled(1990s-present)
Early 1960’s: Charles Bachman at GE created the first general purpose DBMS
integrated data store. It creates the basis for the network model which was
standardized by CODASYL(conference on Data System Language).
Late 1960s: IBM Developed the information Management System. IMS used an
alternate model, called Hierarchical data model
1970: Edgar Codd from IBM created the Relational Data model
1976: Peter Chen presented Entity –Relational Data Model, which widely used in
database design
1980: SQL developed by IBM, Became the standard Query language for the
database design
1980s and 1990s: IBM, Oracle, Informix and others developed
powerful DBMS.
Advantages of DBMS:
1. Data Redundancy
2. Data Inconsistency
3. Data Integrity
4. Data Isolation
5. Data Atomicity
6. Data Security
1. Data Redundancy:
Only one copy of data is resides in same location then the data is not
repeated into no of times that eliminate the Data Redundancy
2. Data Inconsistency:
Only one copy of data is resides in same location then the data is
updated automatically to all the locations to eliminate Data
Inconsistency
3. Data Integrity:
DBMS National Degree college,Nandyal
Only one copy of data is resides in same location that automatically
add to all the locations to eliminate Data Integrity problem
4. Data Isolation:
Only one copy of data is resides in same location same format to all
locations easy to access and eliminate Data Isolation problem
5. Data Atomicity:
Only one copy of data is resides in same location if any system is failure easy to
recover the data from another location that eliminate Data Atomicity problem.
6. Data Security:
Only one copy of data is resides in same location that is easy to protect or
provide security to the data through userid and password.
Explain about the Applications of DBMS?
Applications where we use Database Management Systems are:
o Airlines: For reservations and schedule information. Airlines were among
the first to use databases in a geographically distributed manner terminals
situated around the world accessed the central database system through
phone lines and other data networks.
o Telecom: There is a database to keeps track of the information regarding calls
made, network usage, customer details etc. Without the database systems it is
hard to maintain that huge amount of data that keeps updating every
millisecond.
o Industry: Where it is a manufacturing unit, warehouse or distribution center,
each one needs a database to keep the records of ins and outs. For example
distribution center should keep a track of the product units that supplied into
the center as well as the products that got delivered out from the distribution
center on each day; this is where DBMS comes into picture.
o Banking System: For storing customer info, tracking day to day credit and
debit transactions, generating bank statements etc. All this work has been
done with the help of Database management systems.
o Education sector: Database systems are frequently used in schools and colleges
to store and retrieve the data regarding student details, staff details, course
details, exam details, payroll data, attendance details, fees details etc. There is a
hell lot amount of inter-related data that needs to be stored and retrieved in an
efficient manner.
o Online shopping: You must be aware of the online shopping websites such as
Amazon, Flipkart etc. These sites store the product information, your
addresses and preferences, credit details and provide you the relevant list of
products based on your query. All this involves a Database management
DBMS National Degree college,Nandyal
system.
o Credit card Transactions: For purchases on credit cards and generation of monthly
statements
o Sales: For customer, product, and purchase information.
o Manufacturing : For tracking Production of items in factories, inventories of
items in warehouses/stores, and orders for items.
Data Models
Data models define how the logical structure of a database is modeled. Data
Models are fundamental entities to introduce abstraction in a DBMS. Data models
define how data is connected to each other and how they are processed and stored
inside the system.
The very first data model could be flat data-models, where all the data used are
to be kept in the same plane. Earlier data models were not so scientific, hence they
were prone to introduce lots of duplication and update anomalies.
Entity-Relationship Model
Entity-Relationship (ER) Model is based on the notion of real-world entities and
relationships among them. While formulating real-world scenario into the database
model, the ER Model creates entity set, relationship set, general attributes and
constraints.
ER Model is best used for the conceptual design of a database.
ER Model is based on −
Entities and their attributes.
Relationships among entities.
These concepts are explained below.
DBMS National Degree college,Nandyal
Entity − An entity in an ER Model is a real-world entity having properties
called attributes. Every attribute is defined by its set of values called domain. For
example, in a school database, a student is considered as an entity. Student has
various attributes like name, age, class, etc.
Relationship − The logical association among entities is called relationship.
Relationships are mapped with entities in various ways. Mapping cardinalities define
the number of association between two entities.
Mapping cardinalities −
one to one
one to many
many to one
many to many
1. Object based Logical models:
Object based logical models describe the data at two different levels
I. View level
II. Conceptual level
View level describes only one part of the data and
Conceptual level describes the entire data from database
Again the Object based logical models are classified into four types
Object Oriented model
E-R model
Semantic data model
Functional data model
Object Oriented model:
The data are represented in collection of classes and objects are
called as Object oriented model
Here the class is a collection of data members and member functions
into a single unit is called as a class
Object is a duplication of a class or instance of a class. Without
class we can’t create an object.
Ex: class:
Class student
{
int no,sub1,sub2,sub3;
DBMS National Degree college,Nandyal
char sname[20],course[20];
float total,avg;
public:
void read();
voidcaluculate();
void display();
};
Ex: object
Classname obj1,obj2,obj3;
studentmpcs,mecs,mscs;
Relationship or Mapping cardinalities:
The process of communication or link or connection between one or more
entities is called as Relationship
It can be represented by Diamond symbol.
Semantic Data Model:
Semantic data model provides high level description of the data.
But it can’t support DBMS
Functional Data model:
Functional data model it makes easier to understand the data by
using functions
Function is a self contained block or sub program to perform a
specific taskWhen the program is too large that is too difficult to
understand and write then the program is divided into no of
subparts. each sub part is called as a function
Ex:
void student()
{
int
sno,sub1,sub2,sub3;
charsname[20];
floattotal,avg;
printf(“enter a student no\n”);
scanf(“%d”,&sno);
DBMS National Degree college,Nandyal
printf(“enter student name\n”);
scanf(“%s”,sname);
printf(“enter 3 subject marks\n”);
scanf(“%d%d%d”,&sub1,&sub2,&sub3);
total=sub1+sub2+sub3;
avg=total/3;
}
2, Record Based Logical Models:
The data and relationships are represented in collection of records are
called as Record based logical models
Record based logical models describe the data at two different levels
View level
Conceptual level
View level describes only one part of the data and
Conceptual level describes the entire data from database
Record based logical methods are again classified into 3 types
i. Relational model
ii. Network model
iii. Hierarchical model
i. Relational Model:
Relational model the data and relationships are represented
in the form of relations
Each relation consists fixed number of columns and each
column identified by their unique names
It is an extension of Network model and hierarchical models
It is used to overcome the drawbacks of Network model
and hierarchical models
Customer relation:
Cno Cname Address accno
1 Ram Ndl 111
2 Naveen Knl 222
3 krishna Hyd 333
Account relation:
Accno Balance
DBMS National Degree college,Nandyal
111 10000
222 5000
333 7500
In the above example the customer relation describes the customer
related information such as cno, cname, address and accno.
And account table describes the account related information such as accno and
balance. And the accno provides relationship from customer and account relation.
Network model:
Network model the data and relationships are represented with in the form of
records
These records are connected through links
These links can be viewed as a pointer.
1 Ram Ndl 111 10000
Hierarchical model:
hierarchical model the data and relationships are represented with in the form of
records
These records are connected through links
These links can be viewed as a pointer.
It is also same like as Network model but the data is represented in tree or hierarchical
structure.
1 Ram Ndl 2 Naveen Knl
111 10000 222 5000
Physical models:
Physical model describes the specific structure
What data is to be store and how the data is stored in database
The physical models are
Unifying model
Frame memory model
Data abstraction or ANSI spark architecture or Three schema architecture:
DBMS National Degree college,Nandyal
Data abstraction is nothing but hiding the data
Data abstraction represents an essential features without including background details
is called as Data abstraction.
Data can be abstracted into three different levels
View level
Conceptual level
Physical level
1. View Level:
View level is the first highest level of abstraction
It is also called as External level
It describes only one particular part of the data but not entire data
Coming to the physical structure more than one view level is
connected to one conceptual and one physical level
2. Conceptual Level:
Conceptual level is the second highest level of abstraction
It is also called as logical level
It describes entire data from database that can be managed by DBA
Coming to the physical structure conceptual level is also
connected to view level and physical level
3. Physical Level:
Physical level is the lowest level of abstraction
It is also called as Internal level
It describes the specific structure what data is to be store and
how the data is stored into the database
Coming to the physical structure physical level also
connected to conceptual and view level
DBMS National Degree college,Nandyal
Data Independence:
o Data independence can be explained using the three-schema architecture.
o 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:
1. Logical Data Independence
o Logical data independence refers the able to modify or change the
logical schema without effecting into external or physical schema.
o Logical data independence is used to separate the external level from
the conceptual view.
o If we do any changes in the conceptual view of the data, then the user
view of the data would not be affected.
o Logical data independence occurs at the user interface level.
2. Physical Data Independence
o Physical data independence refers the able to modify or change
the physical schema without effecting into conceptual schema.
o 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.
o Physical data independence is used to separate conceptual levels from
the internal levels.
o Physical data independence occurs at the logical interface level.
A database system environment comprises the complete set of elements and
interactions that facilitate the storage, retrieval, and management of data. Its structure
is typically layered, while the environment encompasses all necessary components for
its operation.
Database System Structure (DBMS Architecture):
The structure of a Database Management System (DBMS) is often described in a three-
schema architecture, providing different levels of abstraction:
DBMS National Degree college,Nandyal
Internal Level (Physical Schema):
This level details the physical storage structure of the database. It describes how data
is actually stored on storage devices, including details like data compression,
indexing, and storage allocation.
Conceptual Level (Logical Schema):
This level describes the overall logical structure of the database for the entire
organization. It defines all entities, attributes, and relationships, providing a
comprehensive view of the data without focusing on physical storage details.
External Level (View Level):
This level describes the part of the database relevant to a particular user or
application. It presents a customized view of the data, hiding irrelevant details and
providing data in a format specific to the user's needs.
Database System Environment Components:
The database system environment consists of several key components that interact to
ensure its functionality:
Hardware:
This includes all physical devices like servers, storage devices (hard drives, SSDs),
network devices, and input/output peripherals.
Software:
This encompasses the operating system, the Database Management System (DBMS)
software itself, and application programs that interact with the database.
People:
This includes various roles such as database administrators (DBAs), database
designers, system analysts, application programmers, and end-users.
Procedures:
These are the rules and instructions that govern the design, development, and use of
the database system, ensuring data integrity and adherence to organizational
policies.
Data:
This refers to the actual collection of facts and information stored within the
database, which is the core asset of the system.
Centralized DBMS Architecture
DBMS National Degree college,Nandyal
A centralized system operates through a central node. In a centralized DBMS
architecture, all database operations, user interfaces, and applications are managed by
a single central computer typically a mainframe or a powerful server.
This type of architecture was common in the early days of computing, when most
processing power resided in a central location. Users would access the mainframe
through terminals connected via a network. These terminals had minimal processing
capabilities and served primarily as input/output devices.
Working of Centralized DBMS Architecture
All user interactions in a centralized DBMS take place through the terminals.
Terminals are some basic interfaces connected to the mainframe. These terminals do
not process the data themselves. They send the input commands to the server. The
command handles the execution. The server processes the commands and returns the
results to the terminals for display.
Client-Server DBMS Architecture
The client-server system is evolvement of centralized system. This architecture
divides the workload between clients (user-facing systems) and servers (back-end
systems). The clients handle the user interface and local processing. It is the servers
manage data storage, complex processing, and business logic.
Basic Structure of Client-Server Architecture
In its simplest form, the client-server model has the following objects:
DBMS National Degree college,Nandyal
Clients: Machines or software applications where the users interact. These handle user
inputs and present results.
Servers: Systems that store the database and execute data processing tasks.
For example, a customer service platform where employees use desktop computers
(clients) to access a centralized customer database (server). The client computers send
queries to the server, which processes them and returns the necessary information.
Distributing the workload between client and server helps balance resource use
and reduces the load on a single system. Clients and servers can be located on
different machines, facilitating remote access and distributed data processing.
Two-Tier Client-Server Architecture
In a two-tier client-server architecture, the client handles the user interface and
application logic. On the other hand the server focuses on data storage and retrieval.
The connection between the client and the server allows clients to submit requests
(queries). The queries uses the server processes and returns as results.
For example, a banking application where tellers use client-side software to check
account balances. The client software connects to a centralized database server,
retrieves data, and displays it on the teller's screen.
Three-Tier Client-Server Architecture
The speciality of three-tier architecture is that, it has an additional layer between the
client and the server. This is known as application server. This intermediate layer helps
manage business logic, application rules, and data processing more effectively.
Following are the components of three-tier client-server DBMS architecture −
DBMS National Degree college,Nandyal
o Presentation Layer (Client) − Displays data and collects user input.
o Application Layer (Middle Tier) − Processes user requests and interacts with the
database.
o Data Layer (Server) − Handles database storage and management.
Following are the advantages of using three-tier client-server DBMS architecture −
o Better Load Management − The middle tier processes requests before sending
them to the database server, reducing the server's direct load.
o Enhanced Security − The application server acts as a gatekeeper, validating user
requests and providing controlled database access.
Example − A web-based ordering system for a restaurant. The client (user's web
browser) interacts with a web server (application layer), which processes orders and
retrieves data from the database server (data layer). This structure allows for better
load distribution and supports complex business logic.
DBMS National Degree college,Nandyal