Unit 1
Unit 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.
• 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.
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
COURSE:
Three-Schema 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:
Storage definition language (SDL): is used to specify the internal schema. The
mapping between the two schemas is specified in either of the languages.
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.
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.