0% found this document useful (0 votes)
11 views75 pages

Module 1

Uploaded by

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

Module 1

Uploaded by

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

Database Management System

● A database is a collection of related data. By data, we mean known facts that can be recorded and that
have implicit meaning.
● For example, consider the names, telephone numbers, and addresses of the people you know.
● This collection of related data with an implicit meaning is a database.
● A database is a logically coherent collection of data with some inherent meaning. A random assortment
of data cannot correctly be referred to as a database.
● A database is designed, built, and populated with data for a specific purpose.
● In other words, a database has some source from which data is derived
● The end users of a database may perform business transactions (for example, a customer buys a
camera) or events may happen (for example, an employee has a baby) that cause the information in the
database to change.
● A database can be of any size and complexity.
● An example of a large commercial database is Amazon.com.
● It contains data for over 20 million books, CDs, videos, DVDs, games, electronics, apparel, and other
items. The database occupies over 2 terabytes (a terabyte is 1012 bytes worth of storage) and is stored
on 200 different computers (called servers). About 15 million visitors access Amazon.com each day
and use the database to make purchases.
A database management system (DBMS) is a collection of programs that enables users to create and maintain a database. The
DBMS is a general-purpose software system that facilitates the processes of defining, constructing, manipulating, and sharing
databases among various users and applications.
Defining a database involves specifying the data types, structures, and constraints of the data to be stored in the
database.The database definition or descriptive information is also stored by the DBMS in the form of a database
catalog or dictionary; it is called meta-data.
Constructing the database is the process of storing the data on some storage medium that is controlled by the DBMS.
Manipulating a database includes functions such as querying the database to retrieve specific data, updating the
database to reflect changes in the miniworld, and generating reports from the data.
Sharing a database allows multiple users and programs to access the database simultaneously.
● An application program accesses the database by sending queries or requests for data to the DBMS. A query typically
causes some data to be retrieved; a transaction may cause some data to be read and some data to be written into the
database.
● Other important functions provided by the DBMS include protecting the database and maintaining it over a long period
of time.
Protection includes system protection against hardware or software malfunction (or crashes) and security protection
against unauthorized or malicious access.
● The DBMS must be able to maintain the database system by allowing the system to evolve as requirements change
over time.
Characteristics of Database Approach
● Traditional file processing system eg:Grade reporting office(keep files on students
and their grades.) and accounting office(may keep track of students fees and their
payments.)
● Each user maintains separate files and programs to manipulate these file
● Redundancy and wastage of space
● Database approach single repository(data that is defined once and then accessed by
various users.)
● In a database, the names or labels of data are defined once, and used repeatedly by
queries, transactions, and applications.
● Names and labels defined once and used repeatedly
1.Self describing nature of database system

● Database system contains not only database but definition and description of database
structure and constraints
● Catalog:This definition is stored in the DBMS catalog, which contains information
such as the structure of each file, the type and storage format of each data item, and
various constraints on the data it describes the structure of the primary database
● Who uses catalog? DBMS software and also by database users who need information
about the database structure.
● DBMS works well with any no of database applications eg.University db,college
db,company db
● Traditional file processing—-data definition,specific databaseFor example, an
application program written in C++ may have struct or class declarations, and a
COBOL program has data division statements to define its files.
● Eg:To access name of student record DBMS s/w refers catalog
Fig: DB that stores student and course info
Fig:example of a DB catalog
2. Insulation between programs and data and data abstraction
● In traditional file processing, the structure of data files is embedded in the application
programs, so any changes to the structure of a file may require changing all programs
that access that file.
● The structure of data files is stored in the DBMS catalog separately from the access
programs. We call this property program-data independence.
● For example, a file access program may be written in such a way that it can access only
STUDENT records If we want to add another piece of data to each STUDENT record, say the
Birth_date, such a program will no longer work and must be changed. By contrast, in a DBMS
environment, we only need to change the description of STUDENT records in the catalog
● The characteristic that allows program-data independence and program-operation
independence is termed as data abstraction.DBMS provides users with a conceptual
representation of data that does not include many of the details of how the data is stored or how
the operations are implemented.
A data model is a type of data abstraction that is used to provide this conceptual representation.
3. Support of multiple views of the data
● A database typically has many users, each of whom may require a different
perspective or view of the database.
● What is View?A view may be a subset of the database or it may contain virtual data
that is derived from the database files but is not explicitly stored. For example, one
user of the database may be interested only in accessing and printing the transcript of
each student;the view for this user is shown in Figure 1.5(a). A second user, who is
interested only in checking that students have taken all the prerequisites of each
course for which the student registers, may require the view shown in Figure 1.5(b)
4. Sharing of data & Multiuser transaction processing
● Allow multiple user to access database at same time
● Concurrency control system:-software to ensure that several users trying to update the same data
do so in a controlled manner so that the result of the updates is correct.
● For example, when several reservation agents try to assign a seat on an airline flight, the DBMS
should ensure that each seat can be accessed by only one agent at a time for assignment to a
passenger.
● These types of applications are generally called online transaction processing (OLTP)
applications.
● The isolation property ensures that each transaction appears to execute in isolation from other
transactions, even though hundreds of transactions may be executing concurrently.
● The atomicity property ensures that either all the database operations in a transaction are
executed or none are.
Actors on the scene
In large organizations, many people are involved in the design,use, and maintenance of a
large database with hundreds of users. In this section we identify the people whose jobs
involve the day-to-day use of a large database; we call them the actors on the scene.
1. Database Administrators

● In any organization where many people use the same resources, there is a need for a
chief administrator to oversee and manage these resources.
● In a data environment the primary resource is data and secondary resource is DBMS
and related s/w.
● DBA is responsible for authorizing access of database,coordinating & monitoring its
use and acquiring software and hardware resources as needed.
● The DBA is accountable for problems such as security breaches and poor system
response time.
2. Database Designers

● Database designers are responsible for identifying the data to be stored in the database
and for choosing appropriate structures to represent and store this data.
● It is the responsibility of database designers to communicate with all prospective
database users in order to understand their requirements and to create a design that
meets these requirements.
● In many cases, the designers are on the staff of the DBA and may be assigned other
staff responsibilities after the database design is completed.
3.End users
Access the database for querying,updating & generating reports Categories
Casual end users—occasionally access,they may need different information each
time.
Naive/Parametric end users–Their main job function revolves around constantly
querying and updating the database, using standard types of queries and
updates—called canned transactions
Examples
1:Bank tellers check account balances and post withdrawals and deposits.
2: Reservation agents for airlines, hotels, and car rental companies check availability for a
given request and make reservations.
Sophisticated end users include engineers, scientists, business analysts, and others
who thoroughly familiarize themselves with the facilities of the DBMS in order to
implement their own applications to meet their complex requirements.

Standalone users maintain personal databases by using ready-made program packages


that provide easy-to-use menu-based or graphics-based interfaces. An example is the
librarian who manage their own database
4. Database Analysts And Application Programmers
● determine the requirements of end users, especially naive and parametric end users
● Develop Canned transactions
● Application Programmers implement specification like test debug transaction
● Also referred as Developers / Software Engineers
Workers behind the scene

1. DBMS system designers and implementers

Design & implement modules and interfaces as s/w package

A DBMS is a very complex software system that consists of many components, or


modules, including modules for implementing the catalog, query language
processing,interface processing, accessing and buffering data, controlling
concurrency,and handling data recovery and security.

2. Tool developers

design & implement tools -s/w package that support Database modelling design and
database system design.Tools are optional packages that are often purchased
separately.They include packages for database design, performance monitoring,
natural language or graphical interfaces.
3. Operators and maintenance personnel– run and maintain h/w & s/w environment,
backup and recovery, security, improved performance, availabilty etc
Advantages of using the DBMS Approach
1. Controlling Redundancy
Every user group maintains its own files for handling its data-processing applications;
this may lead to some duplicate data in their files
This redundancy in storing the same data multiple times leads to several problems.
First, there is the need to perform a single logical update—such as entering data on a
new student—multiple times: once for each file where student data is recorded. This
leads to duplication of effort. Second, storage space is wasted when the same data is
stored repeatedly, and this problem may be serious for large databases. Third, files
that represent the same data may become inconsistent.
For example, one user group may enter a student’s birth date erroneously as
‘JAN-19-1988’, whereas the other user groups may enter the correct value of
‘JAN-29-1988’
2.Restricting unauthorized access
● When multiple users share a large database, it is likely that most users will not be
authorized to access all information in the database.
● For example, financial data such as salaries and bonuses is often considered
confidential, and only authorized persons are allowed to access such data.Some users
are permitted to retrieve and others to update
● Users or user groups are given account numbers protected by passwords, which they
can use to gain access to the database. A DBMS should provide a security and
authorization subsystem, which the DBA uses to create accounts and to specify
account restrictions
3. Providing Persistent Storage for Program Objects
Object oriented database system programming language have complex data structures
like c++ or java
● Traditional file system

i) The values of program variables or objects are discarded once a program terminates, unless the
programmer explicitly stores them in permanent files and later convert them into file format

● DBMS
i)Once the pgm terminates→value of program variable→ not discarded→stores object
permanently.such object is persistent

ii)Automatically converts object can be stored permanently in object oriented database


4.Providing storage structures for efficient query processing
● Database systems must provide capabilities for efficiently executing queries and
updates. Because the database is typically stored on disk, the DBMS must provide
specialized data structures and search techniques to speed up disk search for the
desired records
● Can be done with the help of indexers and cache memory in DB.
● In order to access those records, those records must be copied from disk to main
memory.
● The choice of which indexes to create and maintain is part of physical database
design and tuning, which is one of the responsibilities of the DBA staff.
5.Providing backup and recovery

● A DBMS must provide facilities for recovering from hardware or software failures.
The backup and recovery subsystem of the DBMS is responsible for recovery.
● For example, if the computer system fails in the middle of a complex update
transaction, the recovery subsystem is responsible for making sure that the database is
restored to the state it was in before the transaction started executing
6. Providing multiple user interfaces
● Many types of users with varying knowledge use the DB, therefore DBMS should
support multiple user interfaces
● apps for mobile users
● query language for casual users
● Programming language interface for application programmers
● Forms & command codes for parametric users
● Menu driven & natural language interface for stand alone users
● Both form style interface & menu driven interface known as GUI
7.Representing complex relationships among data

● A database may include numerous varieties of data that are interrelated in many ways
-The record for ‘Brown’ in the STUDENT file is related
to four records in the GRADE_REPORT file.
-A DBMS must have the capability to represent a variety
of complex relationships among the data, to define new
relationships as they arise, and to retrieve and update
related data easily and efficiently.
8.Enforcing Integrity Constraints
● Contraints are the restrictions imposed on the data
● A DBMS should provide capabilities for defining and enforcing these constraints. The
simplest type of integrity constraint involves specifying a data type for each data item
● Eg: Student record ,class have 1integer and name has alphabetical characters
● Enforcing integrity constraints in Database Management Systems (DBMS) is vital for
maintaining data accuracy and consistency. These constraints, including primary key,
foreign key, unique, check, entity integrity, and referential integrity, ensure that data
adheres to predefined rules.
9. Permitting inferencing and action using rules

● Another type of constraint specifies uniqueiness on data item values


● Some rules needs to be imposed on the DB using triggers and stored procedures
● A trigger is a form of a rule activated by updates to the table, which results in
performing some additional operations to some other tables, sending messages, and so
on. More involved procedures to enforce rules are popularly called stored procedures
● Example: Retain students if they have more than 5 arrears or promote them to next
academic year
Additional Implications of using the database approach
1. Potential for Enforcing Standards
The database approach permits the DBA to define and enforce standards among
database users in a large organization. This facilitates communication and cooperation
among various departments, projects, and users within the organization
2. Reduced application Development Time
Retrieval of certain data from the database for printing a new report—takes very little
time
Designing and implementing a large multiuser database from scratch may take more
time than writing a single specialized file application. However, once a database is up
and running, substantially less time is generally required to create new applications
3. Flexibility
It may be necessary to change the structure of a database as requirements change
The DB should be flexible enough to accept the change/upgradation in the future
Modern DBMS allow certain types of evolutionary changes to the structure of the
database without affecting the stored data and the existing application programs
4. Avaliablitity of up-to-date information (Eg: ticket reservation system)
A DBMS makes the database available to all users. As soon as one user’s update is
applied to the database, all other users can immediately see this update. This
availability of up-to-date information is essential for many transaction-processing
applications, such as reservation systems or banking databases, and it is made
possible by the concurrency control and recovery subsystems of a DBMS
5. Economies of scale:
It means consolidating data and applications into one centralized system, companies
can save money and operate more efficiently.
Instead of each department or project needing its own separate database and
equipment, the DBMS approach allows for sharing resources. This reduces wasteful
duplication of effort and overlap among data-processing personnel across different
areas of the organization.
Moreover, it enables the organization to invest in more powerful processors, storage
devices, rather than each department purchasing its own lower-performing equipment.
This centralized approach lowers overall costs of operation and management, as it
streamlines processes, reduces redundancy, and optimizes resource utilization.
Ultimately, economies of scale in DBMS contribute to improved efficiency and
cost-effectiveness for the organization as a whole.
Demerits of DBMS
Overhead cost of using DBMS
High initial investment
Overhead cost for proving security, recovery
When DBA and DBD does not design DB properly-rather use the file system which is
simple, well defined and no much changes expected
When multiuser access is not required- file processing system would be sufficient
Data Models,Schemas, and Instances
● Data Abstraction: Data abstraction generally refers to the suppression of details of
data organization and storage, and the highlighting of the essential features for an
improved understanding of data
● Data Model: collection of concepts that can be used to describe the structure of a
database provides the necessary means to achieve this abstraction.
By structure of a database we mean the data types, relationships, and constraints that
apply to the data. Most data models also include a set of basic operations for
specifying retrievals and updates on the databaseStructure of database
Allows DBD to specify the User defined operation Eg: Compute_GPA which can be
applied to student object
Generic operations include insert, delete, modify, or retrieve any kind of object are
often included in the basic data model operations.
Categories of Data Models
Data Models are categorized according to the types of concepts use to describe database
structure.
1. High level/Conceptual data models
The famous high level data model is ER data model
Conceptual data models use concepts such as entities, attributes, and relationships
An entity represents a real-world object or concept, such as an employee or a project
from the mini world that is described in the database
An attribute represents some property of interest that further describes an entity, such
as the employee’s name or salary
A relationship among two or more entities represents an association among the
entities, for example, a works-on relationship between an employee and a project.
2. Low level/Physical data models
provide concepts that describe the details of how data is stored on the computer storage
media, typically magnetic disks. Concepts provided by physical data models are
generally meant for computer specialists, not for end users
3. Representational data models
Also called as implementation data model
Fall under both high level and low level data model
which provide concepts that may be easily understood by end users but that are not too
far removed from the way data is organized in computer storage. Representational data
models hide many details of data storage on disk but can be implemented on a
computer system directly
Here everything is in terms of records therefore its called as Record based data models
Types:
a) Relational DB model:
The relational model organizes data into tables consisting of rows and columns, with each row
representing a record and each column representing an attribute. Relationships between tables are
established through keys, such as primary keys and foreign keys. The relational model is widely used in
modern database systems due to its simplicity, flexibility, and powerful querying capabilities provided by
SQL.
b) Hierarchical model:
Here data is organized in a tree-like structure where each record has a single parent and multiple
children. It represents a one-to-many relationship between records, with a strict parent-child
hierarchy. This model was popular in early database systems but is less commonly used today due to its
structure and difficulty in representing complex relationships.
c) Network model:
Extension of hierarchical model; the network model represents data as a collection of records connected
by links. However, in this model, records can have multiple parent and child records, allowing for
more flexible and complex relationships. The network model supports many-to-many relationships
and is more expressive than the hierarchical model.
d) Physical data models describe how data is stored as files in the computer by
representing information such as record formats, record orderings, and access paths
An access path is a search structure that makes the search for particular database records
efficient, such as indexing or hashing
Schemas,Instances and Database state
● Database Schema
The description of a database is called the database schema, which is specified during
database design and is not expected to change frequently
● Schema diagram
A displayed schema is called a schema diagram. Figure below shows a schema
diagram for the database, displays the structure of each record type
A schema diagram displays only some aspects of a schema, such as the names of
record types and data items, and some types of constraints. Other aspects are not
specified in the schema diagram
shows neither the data type of each data item nor the relationships among the various
files. Many types of constraints are not represented in schema diagrams.
The data in the database at a particular moment in time is called a database state or
snapshot
Schema diagram for the DB

DB
● Instances: refers to a specific occurrence or individual item of data within a defined
structure or schema.
if we have a schema construct called "Student," each individual student record stored
in the database would be considered an instance of the "Student" schema. Similarly, if
we have a schema construct called "Product," each item listed in the database
representing a specific product would be an instance of the "Product" schema.
When we define a new database, we specify its database schema only to the
DBMS. At this point, the corresponding database state is the empty state with no
data. We get the initial state of the database when the database is first populated
or loaded with the initial data. every time an update operation is applied to the
database, we get another database state. At any point in time, the database has
a current state.
● The DBMS is partly responsible for ensuring that every state of the database is a
valid state—that is, a state that satisfies the structure and constraints specified in
the schema
● The DBMS stores the descriptions of the schema constructs and constraints also
called the meta-data—in the DBMS catalog so that DBMS software can refer to the
schema whenever it needs to. The schema is sometimes called the intension, and a
database state is called an extension of the schema.
Three-Schema Architecture
Internal Schema
Conceptual Schema
External Schema
Data Independence
Logical Data Independence
Physical data independence:
Is the capacity to change the internal schema without having to change the conceptual schema.
Hence, the external schemas need not be changed as well. Changes to the internal schema may be
needed because some physical files were reorganized—for example, by creating additional access
structures—to improve the performance of retrieval or update.

Logical data independence

Logical data independence in the three-schema architecture allows modifications to the conceptual
schema without affecting the external or internal schemas, preserving user interfaces and physical
storage mechanisms
These changes at the conceptual level can occur independently, ensuring that modifications do not
disrupt user applications or the physical storage and access mechanisms defined in the internal
schema. This separation of concerns facilitates system maintenance, evolution, and adaptability,
crucial for robust database management.
Database Languages and Interfaces

- Once the design of a database is complete and a DBMS is chosen to implement the
database, the first step is to specify conceptual and internal schemas for the database and
any mappings between the two

● Data Definition Language (DDL)- Create, Alter, Drop, Truncate


- is used by the DBA and by DBD to define both schemas (conceptual & internal).
- The DBMS will have a DDL compiler whose function is to process DDL statements in
order to identify descriptions of the schema constructs and to store the schema
description in the DBMS catalog.
- DDL is used to specify the conceptual schema only
● Storage Definition Language (SDL)
-used to specify the internal schema
-the mapping between two schemas may be specified in either one of these languages
-In RDBMS, there is no specific language that performs role of SDL
-Instead, the internal schema is specified by a combination of functions, parameters and
specifications related to storage of files
-DBA staff will do the indexing and mapping of data to the storage
● View Definition Language (VDL)
-specifies the user views and mapping to the conceptual schema
- In most DBMSs the DDL is used to define both conceptual and external schemas.
- In relational DBMSs, SQL is used in the role of VDL to define user or application views
● Data Manipulation Language (DML)-Select, Insert, Delete, Update
-Once the database schemas are compiled and the database is populated with data, users
must have some means to manipulate the database.
- Manipulations include retrieval, insertion, deletion, and modification of the data.
-The DBMS provides a set of operations or a language called the data manipulation
language (DML) for these purposes.
2 Types:
1) High level/ Non-procedural
2) Low level/Procedural
NOTE
✔ Whenever DML commands, whether high level or low level, are embedded in a
general-purpose programming language(C, C++, java, python, Ruby, JavaScript), that
language is called the host language and DML is called the data sublanguage
✔ A high-level DML used in a standalone interactive manner is called a query language
✔ A query in a high-level DML often specifies which data to retrieve rather than how to
retrieve it; therefore, such languages are also called declarative
DBMS Interfaces
1) Menu-based interfaces for web clients or browsing
-Provide user with lists of options (called menus) that lead the user through the
formulation of a request
- We don’t need to memorize the specific commands and syntax of a query language;
rather, the query is composed step-by step by picking options from a menu that is
displayed by the system.
-Pull-down menus are a very popular technique in Web-based user interfaces.
2) Forms-based interfaces
- forms-based interface displays a form to each user.
- Users can fill out all of the form entries to insert new data, or they can fill out only
certain entries, in which case the DBMS will retrieve matching data for the remaining
entries. Forms are usually designed and programmed for naive users
3) App’s for mobile devices
-These interfaces present mobile users with access to their data.
- For example, banking, reservations, and insurance companies, among many others,
provide apps that allow users to access their data through a mobile phone or mobile
device.
-The apps have built-in programmed interfaces that allow users to login using their
account name and password; the apps then provide a limited menu of options for mobile
access to the user data, as well as options such as paying bills (for banks) or making
reservations (for reservation Web sites).
3) GUI’s
-Schemas will be displayed to the user in a diagrammatic form
-The user then can specify a query by manipulating the diagram. In many cases, GUIs
utilize both menus and forms
4) Natural Language Interfaces
-These interfaces accept requests written in English or some other language and attempt
to understand them.
-A natural language interface usually has its own schema, which is similar to the database
conceptual schema, as well as a dictionary of important words. The natural language
interface refers to the words in its schema, as well as to the set of standard words in its
dictionary, that are used to interpret the request. If the interpretation is successful, the
interface generates a high-level query corresponding to the natural language request and
submits it to the DBMS for processing; otherwise, a dialogue is started with the user to
clarify the request
5) Speech Input and Output
-The speech input is detected using a library of predefined words and used to set up the
parameters that are supplied to the queries. For output, a similar conversion from text or
numbers into speech takes place
- E.g.: inquiries for telephone directory, flight arrival/departure, and credit card account
information, are allowing speech for input and output to enable customers to access this
information
6) Keyword based DB search
-Instead of writing complex queries, based on the search keyword; the system would
search for those keywords from the DB and retrieve the relevant information
-keyword-based querying allows you to search databases using everyday language,
making it more accessible and user-friendly.
-E.g. search of a job………….. ‘multimedia’ ‘jobs’…………..
7) Interfaces for parametric users
-Naïve users often have a small set of operations that they must perform repeatedly
-They have a limited set of actions they need to do over and over again. For instance, a
bank teller might frequently handle account deposits, withdrawals, or balance inquiries.
-systems analysts and programmers create custom interfaces for such naïve users. These
interfaces are designed specifically for the known group of users (like bank tellers). They
often include abbreviated commands—shortcuts that minimize the number of
keystrokes needed for each task.
8) Interfaces for the DBA
-An interface is designed specially for DBA staff which include commands for creating
accounts, setting system parameters, granting account authorization, changing a schema,
and reorganizing the storage structures of a database
DBMS Component Modules
-The top part of the figure refers to the various users of DB environment and its
interfaces.
-Lower part of the figure shows the internal modules of DBMS responsible for storage of
data and processing of transactions
- The DB and DBMS catalog are usually stored on the disk, access to the disk is
controlled by the Operating System ( OS )
-Top part of the figure shows interfaces for the DBA staff, casual users who work with
interactive interfaces to formulate queries, application programmers who create programs
using some host programming languages, and parametric users who do data entry work
by supplying parameters to predefined transactions.
* Once the DB design is completed, the schemas has to be defined by the DBA and DBD
* DBA and DBD use DDL to specify these schemas.
* DDL complier processes the schema and stores it in catalog
* Catalog –info such as file size, datatypes, storage details of files, constraints etc
* Modules (such as DDL complier, Query optimizer, DML complier) access catalog
whenever required
*Query complier: Handles high level queries, analyses and interprets the queries by
creating DB access code then it calls runtime DB processor for executing the code
*Pre Complier: Extracts the DML commands from the application program written in
host language(C, C++, Java etc). The extracted commands are sent to the DML complier
for compilation into an object code for access to the DB.
The remaining Codes will be sent to the host language complier. Then the object code
and the rest of the program is linked together to form canned/complied transactions-used
by naïve users
*Canned transactions generates a call to the Runtime DB processor which receives
retrieval/ update requests and carries them on stored DB
*Stored Data manager: Controls access to the information stored on the disk, carries out
data transfer from the disk to the main memory. Once data is in main memory, it can be
processed by other DBMS modules/ application programs
Database System Utilities
DBMS have database utilities that help the DBA manage the database system.
Common utilities have the following types of functions:
Loading
- used to load existing data files—such as text files or sequential files—into the database
- automatically reformats the data and stores it in the database
- for loading programs, conversion tools are available like IDMS (Computer Associates),
SUPRA (Cincom), and
IMAGE (HP)
Backup
- creates a backup copy of the database, by dumping the entire database onto tape
- used to restore the database in case of catastrophic disk failure
- Incremental backups are also often used, to save space
Database storage reorganization
- used to reorganize a set of database files into different file organizations to improve
performance
Performance monitoring
- monitors database usage and provides statistics to the DBA.
- Statistics used for making decisions

Other utilities may be available for sorting files, handling data compression, monitoring
access by users, interfacing with the network, and performing other functions.
Tools, Application Environments, and Communications Facilities
• CASE tools are used in the design phase of database systems
• Data dictionary (or data repository) system for storing catalog information about
schemas and constraints
• Information repository stores information such as design decisions, usage standards,
application program descriptions, and user information
• Application development environment systems provide an environment for
developing database applications, including database design, GUI development,
querying and updating, and application program development
• Communications software, whose function is to allow users at locations remote
from the database system site to access the database through computer terminals,
workstations, or personal computers. These are connected to the database site through
data communications hardware such as Internet routers, phone lines, long-haul
networks, local networks, or satellite communication devices. The integrated DBMS
and data communications system is called a DB/DC system
Centralized and client server Architectures for DBMS
Centralized DBMSs Architecture
• Earlier architectures used mainframe computers to provide the main
processing for all system functions
• These mainframes replaced by users with their terminals with PCs and
workstations
• DB systems used these computers similarly to how they had used display
terminals
• So that the DBMS itself was still a centralized DBMS in which all the DBMS
functionality, application program execution, and user interface processing
were carried out on one machine

• Gradually, DBMS systems started to exploit the available processing power at


the user side, which led to client/server DBMS architectures
Basic client/server architecture
• The client/server architecture was developed to deal with computing environments in which
a large number of PCs, workstations, file servers, printers, database servers, Web servers,
e-mail servers, and other software and equipment are connected via a network.
• The idea is to define specialized servers with specific functionalities it is possible to
connect a number of PCs or small workstations as clients to a file server that maintains the
files of the client machines
• Another machine can be designated as a printer server by being connected to various
printers; all print requests by the clients are forwarded to this machine
• Web servers or e-mail servers also fall into the specialized server category. The resources
provided by specialized servers can be accessed by many client machines
• The client machines provide the user with the appropriate interfaces to utilize these servers,
as well as with local processing power to run local applications.
• This concept can be carried over to other software packages, with specialized
programs—such as a CAD (computer-aided design) package
Physical two-tier client/server architecture
In relational database management systems (RDBMSs), many of which started as centralized systems, the system
components that were first moved to the client side were the user interface and application programs
SQL provided a standard language for RDBMSs, this created a logical dividing point between client and server
hence, the query and transaction functionality related to SQL processing remained on the server side
in such an architecture, the server is often called a query server or transaction server
in an RDBMS, the server is also often called an SQL server;
the user interface programs and application programs can run on the client side.
when DBMS access is required, the program establishes a connection to the DBMS (which is on the server side);
once the connection is created, the client program can communicate with the DBMS
A standard called Open Database Connectivity (ODBC) provides an application programming interface (API)

The 2nd approach to two-tier client/server architecture was taken by some object-oriented DBMSs, where the
software modules of the DBMS were divided between client and server
The server level may include the part of the DBMS software responsible for handling data storage on disk pages,
local concurrency control and recovery, buffering and caching of disk pages, and other such functions.
the client level may handle the user interface, data dictionary functions, DBMS interactions with programming
language compilers, global query optimization, concurrency control, and recovery across multiple servers,
structuring of complex objects from the data in the buffers

The architectures described here are called two-tier architectures because the software components are distributed
over two systems: client and server. The advantages of this architecture: - simplicity and seamless compatibility
with existing systems
Three-Tier and n-Tier Architectures for Web Applications
• Many Web applications use an architecture called the three-tier architecture, which
adds an intermediate layer between the client and the database server
• This intermediate layer or middle tier is called the application server or the Web
server, depending on the application
• This server plays an intermediary role by running application programs and storing
business rules (procedures or constraints) that are used to access data from the
database server
• It can also improve database security by checking a client’s credentials before
forwarding a request to the database server
• Clients contain GUI interfaces and some additional application-specific business rules
• The intermediate server accepts requests from the client, processes the request and
sends database queries and commands to the database server, and then acts as a
conduit for passing (partially) processed data from the database server to the clients
• Thus, the user interface, application rules, and data access act as the three tiers
• The presentation layer displays information to the user and allows data entry
• The business logic layer handles intermediate rules and constraints before data is
passed up to the user or down to the DBMS
• The bottom layer includes all data management services. The middle layer can also
act as a Web server, which retrieves query results from the database server and
formats them into dynamic Web pages that are viewed by the Web browser at the
client side
• If business logic layer is divided into multiple layer, then called as n-tier architecture
Classification of DBMS
Data Model
- Used in commercial DBMS [eg: relational data model, object data model]
- Many legacy applications still run on database systems based on the hierarchical and
network data models

Number of users
- Single-user systems support only one user at a time and are mostly used with PCs
- Multiuser systems, which include the majority of DBMSs, support concurrent multiple
users
Number of sites
- Centralized DBMS : the data is stored at a single computer site
- Distributed DBMS [DDBMS] : DBMS software distributed over many sites
- Homogeneous DDBMSs use the same DBMS software at all the sites
- Heterogeneous DDBMSs can use different DBMS software at each site

Cost
-Open source like MYSQL & Postgre SQL
- 30 day copy versions
- Sold in form of licenses

Types of access path


- inverted file structures- having a map with directions to find what you're looking for.
- general purpose or special purpose- tool made specifically for one job
- online transaction processing (OLTP) system- dealing with real-time transactions, like buying
something online. super-fast cashier that can handle lots of customers at once.

You might also like