Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 29

DATABASE

MANAGEMENT
SYSTEM
What is a Database Management System ?
• A database management system (DBMS) refers to the technology for creating and managing
databases. DBMS is a software tool to organize (create, retrieve, update, and manage) data in a
database.

• The main aim of a DBMS is to supply a way to store up and retrieve database information that is
both convenient and efficient. By data, we mean known facts that can be recorded and that have
embedded meaning. Usually, people use software such as DBASE, Microsoft ACCESS, or EXCEL
to store data in the form of a database. A datum is a unit of data. Meaningful data combined to
form information. Hence, information is interpreted data - data provided with semantics. MS
ACCESS is one of the most common examples of database management software.
• Knowledge refers to the useful use of information. As you know, that information can be
transported, stored, and shared without any problems and difficulties, but the same cannot be said
about knowledge. Knowledge necessarily involves personal experience and practice.
• Database systems are meant to handle an extensive collection of information. Management of data
involves both defining structures for storage of information and providing mechanisms that can do
the manipulation of those stored information. Moreover, the database system must ensure the safety
of the information stored, despite system crashes or attempts at unauthorized access.
Why use a DBMS ?
 To develop software applications In less time.
 Data independence and efficient use of data.
 For uniform data administration.
 For data integrity and security.
 For concurrent access to data, and data recovery from crashes.
 To use user-friendly declarative query language.
Where is DBMS being used ?

 Airlines: reservations, schedules, etc


 Telecom: calls made, customer details, network usage,
etc
 Universities: registration, results, grades, etc
 Sales: products, purchases, customers, etc
 Banking: all transactions etc
What are the advantages of a DBMS ?
 Data independence: Application programs should be as free or independent as possible
from details of data representation and storage. DBMS can supply an abstract view of the
data for insulating application code from such facts.

 Efficient data access: DBMS utilizes a mixture of sophisticated concepts and techniques
for storing and retrieving data competently. This feature becomes important in cases where
the data is stored on external storage devices.

 Data integrity and security: If data is accessed through the DBMS, the DBMS can enforce
integrity constraints on the data.

 Data administration: When several users share the data, integrating the administration of
data can offer significant improvements. Experienced professionals understand the nature of
the data being managed and can be responsible for organizing the data representation to
reduce redundancy and make the data to retrieve efficiently.
What are the components of a DBMS ?
 Users: Users may be of any kind such as DB
administrator, System developer, or database
users.
 Database application: Database application
may be Departmental, Personal, organization's
and / or Internal.
 DBMS: Software that allows users to create
and manipulate database access,
 Database: Collection of logical data as a
single unit.
Understanding Database environment
One of the primary aims of a database
is to supply users with an abstract
view of data, hiding a certain element
of how data is stored and
manipulated. Therefore, the starting
point for the design of a database
should be an abstract and general
description of the information needs
of the organization that is to be
represented in the database. And
hence you will require an
environment to store data and make it
work as a database.
What is a Database Environment ?
• A database environment is a collective system of components that comprise and
regulates the group of data, management, and use of data, which consist of software,
hardware, people, techniques of handling database, and the data also.
• Here, the hardware in a database environment means the computers and computer
peripherals that are being used to manage a database, and the software means the
whole thing right from the operating system (OS) to the application programs that
include database management software like M.S. Access or SQL Server. Again the
people in a database environment include those people who administrate and use the
system. The techniques are the rules, concepts, and instructions given to both the
people and the software along with the data with the group of facts and information
positioned within the database environment.
Understanding Database Architecture
The design of a DBMS depends on its architecture. It can be
centralized or decentralized or hierarchical. In 1-tier architecture,
the DBMS is the only entity where the user directly sits on the
DBMS and uses it. Any changes done here will directly be done on
the DBMS itself. It does not provide handy tools for end-users. If
the architecture of DBMS is 2-tier, then it must have an application
through which the DBMS can be accessed. Programmers use 2-tier
architecture where they access the DBMS by means of an
application. Here the application tier is entirely independent of the
database in terms of operation, design, and programming.
A three-level architecture includes an external, a conceptual,
and an internal level. The way users recognize the data is
called the external level. The way the DBMS and the
operating system distinguish the data is the internal level,
where the data is stored using the data structures and file. The
conceptual level offers both the mapping and the desired
independence between the external and internal levels.
What is Database Architecture ?
A DBMS architecture is depending on its design and can be of the following types:
 Centralized

 Decentralized

 Hierarchical
DBMS architecture can be seen as either a single-tier or multi-tier. An architecture having n-tier
splits the entire system into related but independent n modules that can be independently customized,
changed, altered, or replaced.
The architecture of a database system is very much influenced by the primary computer system on
which the database system runs. Database systems can be centralized, or client-server, where one
server machine executes work on behalf of multiple client machines. Database systems can also be
designed to exploit parallel computer architectures. Distributed databases span multiple
geographically separated machines.
Understanding the Three-Tier Architecture

A 3-tier application is an application


program that is structured into three major
parts; each of them is distributed to a
different place or places in a network.
These three divisions are as follows:
 The workstation or presentation layer

 The business or application logic layer

 The database and programming related


to managing layer
DBMS Models - Introduction
A Database model defines the logical design and structure of a
database and defines how data will be stored, accessed and updated in
a database management system. While the Relational Model is the
most widely used database model, there are other models too:
• Hierarchical Model
• Network Model
• Entity-relationship Model
• Relational Model
• Object Based Data Model
Hierarchical Model

• This database model organizes data into a tree-like-structure, with a


single root, to which all the other data is linked. The hierarchy starts
from the Root data, and expands like a tree, adding child nodes to the
parent nodes.
• In this model, a child node will only have a single parent node.
• This model efficiently describes many real-world relationships like
index of a book, recipes etc.
• In hierarchical model, data is organized into tree-like structure with
one one-to-many relationship between two different types of data,
for example, one department can have many courses, many
professors and of-course many students.
Hierarchical Model
Network Model
• This is an extension of the Hierarchical model. In this model data is
organized more like a graph, and are allowed to have more than one
parent node.
• In this database model data is more related as more relationships are
established in this database model. Also, as the data is more related,
hence accessing the data is also easier and fast. This database model
was used to map many-to-many data relationships.
• This was the most widely used database model, before Relational
Model was introduced.
Network Model
Relational Model
• The relational model is the theoretical basis of relational databases, which is a
technique or way of structuring data using relations, which are grid-like mathematical
structures consisting of columns and rows. Codd proposed the relational model for
IBM, but the idea became extremely vital and prominent that his work would become
the basis of relational databases. You might be very familiar with the physical
demonstration of a relation in a database - which is known as a table.
• In the relational model, all data is logically structured within relations, i.e., tables, as
mentioned above. Each relation has a name and is formed from named attributes or
columns of data. Each tuple or row holds one value per attribute. The greatest strength
of the relational model is the simple logical structure that it forms. Behind this simple
structure is a sophisticated theoretical foundation that is lacking in the first generation
of DBMSs.
What are the objectives of a Relational Model ?

 To allow a high degree of data independence, application programs


must not be affected by alterations to the internal data representation,
mostly by changes to file organizations or access paths.
 To provide considerable grounds for dealing with data semantics,
reliability, and redundancy problems. In particular, Codd's theory for the
relational model introduced the concept of normalized relations, were
relations that have no repeating groups, and the process is called
normalization.
 To allow the expansion of set-oriented data manipulation languages.
Some Common Relational Model Terms
 Relation: A relation is a
table with columns and
rows.
 Attribute: An attribute is a
named column of a relation.
 Domain: A domain is the
set of allowable values for
one or more attributes.
 Tuple: A tuple is a row of a
relation.
Entity-relationship Model
• In this database model, relationships are created by dividing object of interest
into entity and its characteristics into attributes.
• Different entities are related using relationships.
• E-R Models are defined to represent the relationships into pictorial form to
make it easier for different stakeholders to understand.
• This model is good to design a database, which can then be turned into tables
in relational model(explained below).
• Let's take an example, If we have to design a School Database,
then Student will be an entity with attributes name, age, address etc.
As Address is generally complex, it can be another entity with attributes street
name, pin code, city etc, and there will be a relationship between them.
Entity-relationship Model
Object-based Data Model
• An extension of the ER model with notions of functions,
encapsulation, and object identity, as well. This model supports a rich
type system that includes structured and collection types. Thus, in
1980s, various database systems following the object-oriented
approach were developed. Here, the objects are nothing but the data
carrying its properties.
Database Schema

• A database schema is the logical representation of a database, which shows how the data is stored
logically in the entire database. It contains list of attributes and instruction that informs the
database engine that how the data is organized and how the elements are related to each other.
• A database schema contains schema objects that may include tables, fields, packages, views,
relationships, primary key, foreign key etc.
• In actual, the data is physically stored in files that may be in unstructured form, but to retrieve it
and use it, we need to put it in a structured form. To do this, a database schema is used. It provides
knowledge about how the data is organized in a database and how it is associated with other data.
• The schema does not physically contain the data itself; instead, it gives information about the
shape of data and how it can be related to other tables or models.
• The complexity & the size of the schema vary as per the size of the project. It helps developers to
easily manage and structure the database before coding it.
Database Schema
• When you talk about the database, you must distinguish between the database
schema, which is the logical blueprint of the database, and the database instance,
which is a snapshot of the data in the database at a given instant in time. The
concept of a relation corresponds to the programming language notion of a variable.
In contrast, the concept of a relation schema corresponds to the programming
languages' notion of the type definition. In other words, a database schema is a
skeletal structure that represents the logical view of the complete database. It
describes how the data is organized and how the relations among them are associated
and formulates all the constraints that are to be applied to the data.
• In general, a relation schema consists of a directory of attributes and their
corresponding domain.
Database Schema: Example
What is Schema in the Database Management
System?
A schema can be defined as
the design of a database. The
overall description of the
database is called the
database schema. It can be
categorized into three parts.
These are:
 Physical Schema
 Logical Schema
 View Schema
• A physical schema can be defined as the design of a database at its physical level. In this level, it is
expressed how data is stored in blocks of storage.
• A logical schema can be defined as the design of the database at its logical level. In this level, the
programmers, as well as the database administrator (DBA), work. At this level, data can be described as
certain types of data records that can be stored in the form of data structures. However, the internal details
(such as an implementation of data structure) will be remaining hidden at this level.
• View schema can be defined as the design of the database at the view level, which generally describes end-
user interaction with database systems.

• For example: Let suppose you are storing students' information on a student's table. At the physical level,
these records are described as chunks of storage (in bytes, gigabytes, terabytes, or higher) in memory, and
these elements often remain hidden from the programmers. Then comes the logical level; here at a logical
level, these records can be illustrated as fields and attributes along with their data type(s); their relationship
with each other can be logically implemented. Programmers generally work at this level because they are
aware of such things about database systems. At view level, a user can able to interact with the system, with
the help of GUI, and enter the details on the screen. The users are not aware of the fact of how the data is
stored and what data is stored; such features are hidden from them.
Detail Explanation on 3 Layers of Schema.
• As we came to know that there are three different types of schema in the database and these are defined
according to the levels of abstraction of the three-level architecture portrayed in the above figure, at the
highest level, there is multiple external schemas (view level schema) (also called sub-schemas) that match
up to different views of the data. At the conceptual level, there is the conceptual schema or the logical
schema that describes all the entities, attributes, and relationships together with integrity constraints. At the
lowest level of abstraction, there is the internal schema or the physical schema that creates a complete
description of the internal model, containing the classifications of stored records, the methods of
representation, the data fields, storage structures used, etc. The DBMS is responsible for mapping between
these three types of schema.

• It must also check the schemas for consistency; which means, the DBMS must verify that each external
schema is derivable from the conceptual schema, and must use the information in the conceptual schema
for mapping among those external schemas and the internal schema. It also allows any differences in entity
names, attributes names, attributes order, data types, and so on, to be determined. Lastly, each external
schema is related to the conceptual schema by the external/conceptual mapping. This enables the DBMS to
map names in the user's view on the relevant part of the conceptual schema.
• Data Independence.

An important objective of the three-tier architecture is to provide data


independence, which means that the upper levels are unaffected by changes in the
lower levels. There are two kinds of data independence: logical and physical.
• Logical Data Independence.

Logical data independence can be defined as the immunity of the external schemas
to changes in the conceptual schema.
• Physical data independence.

Physical data independence can be defined as the immunity of the conceptual


schema to changes in the internal schema.

You might also like