0% found this document useful (0 votes)
18 views16 pages

Unit 1

Unit-1 of the document provides an overview of database architecture, including definitions of databases, data, and metadata, as well as the functions of Database Management Systems (DBMS). It discusses the advantages of using a DBMS over traditional file processing systems, such as controlled redundancy, security, and efficient query processing, while also outlining the roles of various users and administrators within a database system. Additionally, it highlights the characteristics of database approaches, the importance of data models, and scenarios where a DBMS may not be necessary.

Uploaded by

omkarkamble892
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)
18 views16 pages

Unit 1

Unit-1 of the document provides an overview of database architecture, including definitions of databases, data, and metadata, as well as the functions of Database Management Systems (DBMS). It discusses the advantages of using a DBMS over traditional file processing systems, such as controlled redundancy, security, and efficient query processing, while also outlining the roles of various users and administrators within a database system. Additionally, it highlights the characteristics of database approaches, the importance of data models, and scenarios where a DBMS may not be necessary.

Uploaded by

omkarkamble892
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/ 16

Unit-1 DATABASE ARCHITECTURE

UNIT-1
DATABASE ARCHITECTURE

Introduction to Database System Applications:


Database: A database is a collection of related data.
Example: student database, company database, banking database.
Data: data means known facts that can be recorded and that have implicit meaning.
Example: consider the names, telephone numbers, and addresses of the people.
Meta-data: it is a catalog or dictionary that stores the database definition or description
of the database structure and various constraints on the data.
Mini-world: Some part of the real world about which the data is stored in the database.
Example: college database, railway reservation database.
• A database has the following implicit properties:
1. Database represents some aspect of the real world, sometimes called the miniworld or
the universe of discourse (UoD). Changes to the mini-world are reflected in the database.
2. 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.
3. A database is designed, built, and populated with data for a specific purpose. It has an
intended group of users and some preconceived applications in which these users are
interested.
• 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.
Example: SQL, MySQL, SQL Server, MS Access
Basic Tasks(or Functions) of DBMS:
• 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.

MAYURI AND SHUBHADA 1


Unit-1 DATABASE ARCHITECTURE

• 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 mini-world, and generating
reports from the data.
Sharing a database allows multiple users and programs to access the database
simultaneously.
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.
Maintain: The DBMS must be able to maintain the database system by allowing the
system to evolve as requirements change over time.
Application program: accesses the database by sending queries or requests for data to
the DBMS.
• Query: A Query causes some data to be retrieved from the database.
Example: select roll no, name, address from student;
The above query retrieves student rollno, name and address from the student database.
• Transaction may cause some data to be read and some data to be written into the
database.

Database System: The database and DBMS system together constitute the database
system.
A simplified database system environment.
Give an explanation using the following diagram.

MAYURI AND SHUBHADA 2


Unit-1 DATABASE ARCHITECTURE

Figure 1.1 A simplified database system environment.

• Difference between database approach Vs file processing

• In traditional file processing, each user defines and implements the files needed for a
specific software application as part of programming the application.
For example: one user may keep files on students and their grades and second user may
keep track of student's fee and their payments. Although both users are interested in
student data each user maintains separate files and programs to manipulate these files.
This redundancy in defining and storing data results in wasted storage space.
But in database approach, a single repository maintains data that is defined once and
assessed by various users.
• In file systems, each application is free to name data elements independently. In
contrast, in a database, the names or labels of data are defined once, and used repeatedly
by queries, transactions, and applications.

Characteristics of Database Approach:


The main characteristics of the database approach versus the file-processing approach
are the following:
1. Self-describing nature of a database system
2. Insulation between programs and data, and data abstraction
3. Support of multiple views of the data
4. Sharing of data and multiuser transaction processing.

MAYURI AND SHUBHADA 3


Unit-1 DATABASE ARCHITECTURE

1. Self-describing nature of database system:


• The DBMS catalog stores the description of the database structure and constraints.
This information stored in catalog is called as metadata and it describes the structure of
primary database.
• This catalog is used by DBMS software and also by database users who need
information about database structure.
• We must refer to the catalog to know the structure of the files in a specific database,
such as the type and format of data it will access.
2. Insulation between programs and data, and data abstraction:
• In DBMS the structure of data files is stored in the DBMS catalog separately from the
access programs. Thus it allows changing the structure of data file without changing the
DBMS access program. This is known as program-data independence.
But 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.
• Data abstraction: The characteristic that allows program-data independence and
program-operation independence is called data abstraction.
[Note: An operation is specified in two parts. The interface (or signature) of an operation.
The implementation (or method) of the operation. User application programs can operate
on the data by invoking these operations through their names and arguments, regardless
of how the operations are implemented. This may be termed program-operation
independence.]
3. Support of multiple views of the data:
A database has many users who may require a different view of the database. A view
Is a subset of the database that is derived from a database file which describes only the
data of his/her interest to the user.
4. Sharing of data and multiuser transaction processing:
• DBMS allows multiple users to access and update the database simultaneously.
• Concurrency control software in DBMS ensures that several users trying to update the
same data do so in a controlled manner.
• A transaction is an executing program or process that includes one or more database
accesses.

MAYURI AND SHUBHADA 4


Unit-1 DATABASE ARCHITECTURE

• Isolation property of transaction ensures that each transaction executes in isolation


from other transaction.
• Atomicity property ensures that either all the operations in a transaction are executed or
none are executed.

People Associated with Database system:


• Actors on the Scene.
The people whose jobs involve the day-to-day use of a large database are called as actors
on the scene.
1. Database Administrator (DBA):
• The DBA is the chief administrator who oversees and manages the database system.
• The DBA is responsible for authorizing access to the database, coordinating and
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.
• A database designer should communicate with database users in order to understand
their requirements and to create a design that meets these requirements.
3. End Users:
End users are the people who access the database for querying, updating, and generating
reports. There are several categories of end users:
a. Casual end users:
• They occasionally access the database, but they may need different information each
time.
• They use a sophisticated database query language to specify their requests.
b. Naive or parametric end users
• They make up a sizable portion of database end users.
• Their main job is constantly querying and updating the database, using standard types
of queries and updates called as canned transactions.
• Example: Reservation agents for airlines, hotels, and car rental companies check
availability for a given request and make reservations.

MAYURI AND SHUBHADA 5


Unit-1 DATABASE ARCHITECTURE

c. Sophisticated end users


Sophisticated end users include engineers, scientists, business analysts, and others who
thoroughly familiarize themselves with the facilities of the DBMS in order to meet their
complex requirements.
d. Standalone users:
• Standalone users maintain personal databases by using ready-made program
Packages.
• An example is the user of a tax package that stores a variety of personal financial data
for tax purposes.
4. System Analysts and Application Programmers (Software Engineers):
• System analysts determine the requirements of end users, and develop specifications
for standard canned transactions.
• Application programmers implement these specifications as programs; then they test,
debug, document, and maintain these canned transactions.

• Workers behind the scenes:


The people who work to maintain the database system environment but who are not
actively interested in the database contents are called Workers behind the scene, and they
include the following categories:
1. DBMS system designers and implementers:
These are the people who design and implement the DBMS modules and interfaces as a
software package.
2. Tool developers:
• Tool developers design and implement tools.
• Tools are software packages that facilitate database modeling and design, database
system design, and improved performance.
3. Operators and maintenance personnel:
They are responsible for the actual running and maintenance of the hardware and
software environment for the database system.

MAYURI AND SHUBHADA 6


Unit-1 DATABASE ARCHITECTURE

Advantages of using DBMS Approach:


1. Controlled redundancy:
In traditional file processing system, every user group maintains its own files for handling
its data processing applications i.e. data is stored repeatedly. This redundancy in storing
the same data multiple times leads to several problems such as duplication of efforts;
storage space is wasted, inconsistent data.
This problem is overcome using database approach where the views of different user
groups are integrated during database design. i.e., the data is stored in only one location
and accessed by different users. This is known as data normalization and it ensures
consistency and saves storage space.
2. Restricting unauthorized access:
When multiple users share a large database, Most of the users will not be authorized to
access all information in the database. Some users may not be permitted to retrieve the
data, whereas others are allowed to retrieve, update. To achieve this DBMS provides
security and authorization system which the DBA uses to create accounts to specify
account restrictions. Then DBMS enforces these restrictions automatically.
3. Providing persistent storage for program objects:
Programming languages have complex data structures. The values of program
variables or objects are discarded once a program terminates. Hence if the data is no
longer required, the programmer must store them in files by converting these complex
Structures into a format suitable for file storage. Therefore when need arises to read this
data once more, the programmer converts from file format to program variables or
objects.
Object-oriented DBMS systems are compatible with C++, JAVA and the DBMS software
automatically performs such necessary conversions and the data in the form of object
survives even after the termination of program execution. Thus an object is said to be
persistent.
4. Providing storage structures and search techniques for efficient Query
processing:
Database systems provide capabilities for efficiently executing queries and updates
because database is stored in disk. DBMS provides specialized Data structures and search
techniques to speed up disk search for desired records. Auxiliary files called Indexes are
used for this purpose. It also provides buffering and caching techniques.
Query processing and optimization module of DBMS is responsible for choosing an
efficient Query execution plan for each query based on storage structure.

MAYURI AND SHUBHADA 7


Unit-1 DATABASE ARCHITECTURE

5. Providing backup and recovery.


DBMS provides facilities for recovering from hardware and software failure. The backup
and recovery sub-system is responsible for recovery. Example: if computer fails in the
middle of transaction the recovery subsystem makes sure that the database is restored
and resumed from the point at which it was interrupted.
6. Providing multiple user interfaces.
Many types of users with varying (different) level of technical knowledge use a database,
DBMS provides a variety of interfaces such as Query language for casual users,
programming language interfaces for application programmers, forms for parametric
users, menu-driven interfaces for standalone users.
7. Representing complex relationships among data.
A database has varieties of data that are interrelated in many ways. Thus a DBMS
provides a variety of complex relationship among data, defines new relationships and to
retrieve and update data easily and efficiently.
8. Enforcing Integrity constraints.
DBMS applications have integrity constraints that must hold for the data. DBMS
provides capabilities for defining and enforcing these constraints. The different types of
constraints are:
1. Specifying a data type for each data item.
2. Referential integrity constraint specifies that a record in one file must be related to
record in other files.
3. Uniqueness constraint specifies uniqueness on data item values.
It is the responsibility of database designer to identify the integrity constraints during
database design.
9. Permitting inferencing and actions using rules.
Database systems provide capabilities for defining deduction rules for inferencing new
information from the stored database facts. Such systems are known as deductive
database systems.
10. Additional implications of using database approach.
1. Potential for enforcing standards:
Database approach permits the DBA to define and enforce standards among database
users. Standards can be defined for names, formats of data elements, report structures
etc.

MAYURI AND SHUBHADA 8


Unit-1 DATABASE ARCHITECTURE

2.Reduced application developed time:


Designing and implementing a large multiuser takes a long time. But once a database is
up and running less time is required to create new application.
Development time in DBMS is estimated to be 1/6 to ¼ of that for a traditional file
system.
3. Flexibility:
DBMS allows changes to the structure of Database without affecting the stored data and
existing application program.
4. Availability: of up-to-date information:
DBMS makes the database available to all users as soon as one user updates the database
all other users can immediately see this update.
5. Economics of scale:
The DBMS approach allows consolidation of data and application thus reducing memory
space and resources. Thus enables the organization to invest in more powerful processors
storage devices rather than each department purchases its own equipments (lower
performance equipments).

When Not to Use a DBMS:


The overhead costs of using a DBMS are due to the following:
• High initial investment in hardware, software, and training.
• The generality that a DBMS provides for defining and processing data.
• Overhead for providing security, concurrency control, recovery, and integrity functions
Therefore, it may be more desirable to use regular files under the following
circumstances:
• Simple, well-defined database applications that are not expected to change at all.
• Stringent, real-time requirements for some application programs that may not be met
because of DBMS overhead.
• Embedded systems with limited storage capacity, where a general-purpose DBMS
would not fit.
• No multiple-user access to data.

MAYURI AND SHUBHADA 9


Unit-1 DATABASE ARCHITECTURE

Database System Concepts and Architecture:


•A data model a collection of concepts that can be used to describe the structure of a
database.
It provides the necessary means to achieve data abstraction. data models also include a
set of basic operations for specifying retrievals and updates on the database.
• Data Model Operations: These are the operations specifying database retrievals and
updates.
These include basic operations and user-defined operations.
• Categories of Data Models:
Data Models are categorized according to the types of concepts they use to describe the
database structure.
1. High-level or conceptual data models:
• Provide concepts that are close to the way many users perceive data.
• It uses concepts like entities, attributes, and relationships.
• They are also called as entity-based or object-based data models.
• Ex: Entity Relationship Model (ER Model).
2. low-level or 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 low-level data models are generally meant for computer
specialists, not for end users.
3. Representational or implementation data models:
• 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.
• They represent data by using record structures and hence are also called as record-based
data models.
• They include relational data model, the network and hierarchical models.

Schema: The description of a database is called the database schema, which is


specified during database design and is not expected to change frequently.

MAYURI AND SHUBHADA 10


Unit-1 DATABASE ARCHITECTURE

Schema Diagram:
• A displayed schema is called a schema diagram.
• The diagram displays the structure of each record type but not the actual instances of
records.
E.g.: STUDENT

Name Student_number Class Major

COURSE:

Course_name Course_number Credit_hours Department

Schema Construct: Components of schema or each object in the schema is called as


schema construct.
E.g.: STUDENT,COURSE etc.
STUDENT construct will contain the set of individual student entities (records) as its
instances.

Database instances/Database state:/


The actual data stored in the Database at a particular movement in time is called a
database state or snapshot. It is also called a current set of occurrences or instances in the
database.
Initial database State: It refers to the database when it is first populated or loaded with
initial data.
Valid database state: A state that satisfies the structure and constraints specified in the
schema is called a valid state.
Empty state: when we define a new database, the corresponding database state is empty
state with no data.

Difference between database schema and database state


Database Schema Database State
The description of a database is called The actual data stored in the database
the database schema. at a particular moment in time is called
a database state.
It does not change frequently It changes frequently
Database schema is also called as Database state is also called as
"instension". "extension".

MAYURI AND SHUBHADA 11


Unit-1 DATABASE ARCHITECTURE

Three-Schema Architecture

Three- Schema Architecture


The goal of the three-schema architecture, is to separate the user applications from the
physical database, In this architecture, schemas can be defined at the following three
levels:
The internal level has an internal schema, which describes the physical storage structure
of the database. Internal schema uses a physical data model and describes the complete
details of data storage and access paths for the database.
The conceptual level has a conceptual schema, which describes the structure of the
whole database for a community of users. The conceptual schema hides the details of
physical storage structures and describes entities, data types, relationships, and
constraints. A representational data model to describe the conceptual schema.
The external or view level includes a number of external schemas or user views. It
describes the part of the database that a particular user group is interested in and hides
the rest of the database from that user group. External schema is implemented using a
representational data model.
Mappings: The process of transforming requests and results between different levels of
schema is called as mappings.
The process of transforming requests and results between conceptual level and internal
level is called as conceptual/internal mapping.
The process of transforming requests and results between external level and conceptual
level is called as external/conceptual mapping.

MAYURI AND SHUBHADA 12


Unit-1 DATABASE ARCHITECTURE

DATA INDEPENDENCE:
Data independence is defined as the capacity to change the schema at one level of a
database system without having to change the schema at the next Higher level.
Two types of data independence:
1. Logical data independence: It is the capacity to change the conceptual schema
without having to change external schemas or application programs.
2. Physical data Independence: It is the capacity to change the internal schema without
having to change the conceptual schema.

Database Languages:
Data Definition Language:
DDL stands for Data Definition Language. It is used to define database structure or
pattern. o It is used to create schema, tables, indexes, constraints, etc. in the database.
is used by the DBA and by database designers to define both the schemas (internal and
conceptual).
In DBMS where a clear separation is maintained between the conceptual and internal
levels, the DDL is used to specify the conceptual schema only.
Using the DDL statements, you can create the skeleton of the database.
Data definition language is used to store the information of metadata like the number of
tables and schemas, their names, indexes, columns in each table, constraints, etc. Here
are some tasks that come under DDL:

• Create: It is used to create objects in the database.


• Alter: It is used to alter the structure of the database. o Drop: It is used to delete objects
from the database. o Truncate: It is used to remove all records from a table.
• Rename: It is used to rename an object.
• Comment: It is used to comment on the data dictionary. These commands are used to
update the database schema that's why they come under Data definition language.
Data Manipulation Language:
DML stands for Data Manipulation Language. It is used for accessing and manipulating
data in a database. It handles user requests.
DML is used to manipulate the database.
Manipulations include retrieval, insertion, deletion, and modification of the data,
two main types of DML:

MAYURI AND SHUBHADA 13


Unit-1 DATABASE ARCHITECTURE

• A high-level or nonprocedural DMIL: is used to specify complex database operations.


Many DBMS allow high-level DML statements to be entered interactively or to be
embedded in a general-purpose programming language.
• A low-level or procedural DML: must be embedded in a general-purpose
programming language. It uses programming language constructs like looping, to
retrieve and process each record. Low-level DMLs are also called record-at-a-time
DMLs.
Here are some tasks that come under DML:

• Select: It is used to retrieve data from a database.


• Update: It is used to update existing data within a table. o Delete: It is used to delete all
records from a table.
• Insert: The SQL INSERT statement inserts one or more rows of data into a table. You
can also see INSERT written as INSERT INTO , but both behave the same.
• Delete: DELETE is a DML(Data Manipulation Language) command and is used when
we specify the row (tuple) that we want to remove or delete from the table or relation.

Data Control Language:


DCL stands for Data Control Language. It is used to retrieve the stored or saved data.
The DCL execution is transactional. It also has rollback parameters. (But in Oracle
database, the execution of data control language does not have the feature of rolling
back.)
Here are some tasks that come under DCL:

• Grant: It is used to give user access privileges to a database.


• Revoke: It is used to take back permissions from the user. There are the following
operations which have the authorization of Revoke: CONNECT, INSERT, USAGE,
EXECUTE, DELETE, UPDATE and SELECT.

Transaction Control Language:


TCL is used to run the changes made by the DML statement. TCL can be grouped into a
logical transaction. Here are some tasks that come under TCL:

• Commit: It is used to save the transaction on the database.


• Rollback: It is used to restore the database to original since the last Commit.

Storage definition language (SDL): is used to specify the internal schema. The
mapping between the two schemas is specified in either of the languages.

MAYURI AND SHUBHADA 14


Unit-1 DATABASE ARCHITECTURE

View definition language (VDL): is used to specify user views and their mappings to
the conceptual schema. In relational DBMSs, SQL is used in the role of VDL to define
user or application views as results of predefined queries.

DBMS Interfaces
• Menu-Based Interfaces: They are used for browsing on the web. These interfaces
present the user with menus. The user need not memorize the command and syntax of
the query language rather, the query is composed by picking options from the menu. Pull-
down menus are a very popular in Web-based user interfaces.
• Forms-Based Interfaces: They are designed for naive users. They display a form to
each user. Users can fill out all of the form entries to Insert new data, or fill only certain
entries, that will retrieve matching data.
• Graphical User Interfaces: displays schema to the user in diagrammatic form. The
user then can specify a query by manipulating the diagram. GUI utilize both menus and
forms.
• Natural Language Interfaces: These interfaces accept requests written in English or
some other language and attempt to understand them. It has its own schema, and a
dictionary of important words. The interface refers to the words in the dictionary and
interprets the request. If interpretation is successful it generates high level query of
request and submits it to DBMS for processing.
• Speech Input and Output: It uses speech as input query and answers to the question
with a speech. The speech input is detected using a library of predefined words. For
output similar conversion takes place.
• Interfaces for Parametric Users: Parametric users, such as bank tellers, have a small
set of operations that they must perform repeatedly, The bank teller must be able to use
single function key to perform repetitive transactions. A small set of abbreviated
commands is included for the transactions with a goal to minimize the number of
keystrokes required for
• Interfaces for the DBA: They contain privileged commands that are used only by the
DBA. These include commands for creating accounts, setting system parameters,
granting account authorization, changing a schema, and reorganizing the storage
structures of a database.

MAYURI AND SHUBHADA 15


Unit-1 DATABASE ARCHITECTURE

Classification of DBMS:
Several criteria used to classify database management system. There are
A) Data model based:
1) Relational data model: It is used in many commercial database management system.
2) Object data model: It has been implemented in some commercial systems but not
had widespread use.
3) Hierarchical and network data model: Many legacy applications still run on database
systems based on hierarchical and network data models.
B) Number of Users:
1) Single-user system: Support only one user at a time.
2) Multi-user system: This includes the majority of DBMS, supports concurrent
multiple users.
C) Number of sites:
1) Centralized: If the data is stored at a single computer site.
2) Distributed: Can have actual database and DBMS software distributed over many
sites, connected by a computer network.
Homogenous DBMS: uses the same DBMS software at multiple sites
3) Heterogeneous DBMS: A recent trend is to develop software to access several
autonomous preexisting databases stored under heterogeneous DBMS.
This leads to,
4) Federated DBMS: in which participating DBMS are loosely coupled and have a
degree of local autonomy.

MAYURI AND SHUBHADA 16

You might also like