Search for notes by fellow students, in your own course and all over the country.
Browse our notes for titles which look like what you need, you can preview any of the notes via a sample of the contents. After you're happy these are the notes you're after simply pop them into your shopping cart.
Document Preview
Extracts from the notes are below, to see the PDF you'll receive please use the links above
Database Management System
Database Management Systems
UNIT -1
1
...
1
Characteristics of database
1
...
1
...
4
Functions of DBMS
1
...
6
Simplified Database System Environment
1
...
8
Architecture of DBMS
1
...
10 Types of database applications
1
...
12 The database system environment
1
...
0 Introduction
Database is a collection of related data
...
DBMS
came into existence in 1960 by Charles
...
Again in 1960 IBM brought IMS-Information management
system
...
In 1980
then came SQL Architecture- Structure Query Language
...
g
...
Data
•
Data is raw fact or figures or entity
...
Information
•
•
Processed data is called information
The purpose of data processing is to generate the information required for
carrying out the business activities
...
•
Data classification: Captured data has to be classified based on the nature and
intended usage
...
•
Data arranging: It is very important to arrange the data properly
•
Data retrieval: Data will be required frequently for further processing,
Hence it is very important to create some indexes so that data can be retrieved
VTU-EDUSAT
Page 2
Database Management System
easily
...
•
Data Verification: Before storing the data it must be verified for any error
...
•
Data Editing: Editing means re-arranging the data or modifying the data for
presentation
...
•
Data transmission: This is a function where data is forwarded to the place where it
would be used further
...
An item of metadata may describe a collection of data including multiple
content items and hierarchical levels, for example a database schema
...
The term should be used with
caution as all data is about something, and is therefore metadata
...
•
The database can be of any size and of varying complexity
...
Database Management System
•
A Database Management System (DBMS) is a collection of program that enables
user to create and maintain a database
...
VTU-EDUSAT
Page 3
Database Management System
1
...
•
Information systems should allow interactive access to data to obtain new
information without writing fresh programs
...
•
An independent central repository, which gives information and meaning of
available data is required
...
•
The stored data should be made available for access by different users
simultaneously
...
DBMS Utilities
•
A data loading utility:
Which allows easy loading of data from the external format without writing
programs
...
•
Recovery utility:
Which allows to reconstruct the correct state of database from the backup and
history of transactions
...
VTU-EDUSAT
Page 4
Database Management System
•
File organization:
Which allows restructuring the data from one type to another?
1
...
File system is a collection of data
...
File system gives the details of the data representation and Storage of data
...
In File system storing and retrieving of data cannot be done efficiently
...
Concurrent access to the data in the file system has many problems like
a
...
File system doesn’t provide crash recovery mechanism
...
While we are entering some data into the file if System crashes then content of the
file is lost
...
Protecting a file under file system is very difficult
...
DBMS is a collection of data and user is not required to write the procedures for
managing the database
...
DBMS provides an abstract view of data that hides the details
...
DBMS is efficient to use since there are wide varieties of sophisticated techniques to
store and retrieve the data
...
DBMS takes care of Concurrent access using some form of locking
...
DBMS has crash recovery mechanism, DBMS protects user from the effects of system
failures
...
DBMS has a good protection mechanism
...
A relational database management system is a database management system used to
manage relational databases
...
1
...
Due to its centralized nature, the database system can overcome the disadvantages
of the file system-based system
1
...
2
...
:
DBMS utilizes a variety of sophisticated techniques to store and retrieve data
efficiently
...
Data integrity and security:
Data is accessed through DBMS, it can enforce integrity constraints
...
g
...
4
...
5
...
DBMS protects user from the effects of
system failure
...
Reduced application development time
...
VTU-EDUSAT
Page 6
Database Management System
1
...
These include defining and modifying the record structure, the
type and size of fields and the various constraints to be satisfied by the data in
each field
...
These functions which perform these operations are part of
DBMS
...
Plashud queries are those which form part of the application
...
•
Data Security & Integrity: The DBMS contains modules which handle the
security and integrity of data in the application
...
•
Data Dictionary Maintenance: Maintaining the data dictionary which contains the
data definition of the application is also one of the functions of DBMS
...
1
...
Typically there are three types of users for a DBMS:
1
...
Ultimately he is the one who actually
puts the data into the system into use in business
...
2
...
He/She has
more knowledge about the data and its structure
...
He/she also need not have access and knowledge of the
complete data in the system
...
The Data base Administrator (DBA) who is like the super-user of the system
...
•
Defining the schema: The DBA defines the schema which contains the
structure of the data in the application
...
•
Liaising with users: The DBA needs to interact continuously with the
users to understand the data in the system and its use
...
Data
Integrity checks are defined by the DBA
...
Defining backup procedure includes specifying
what data is to be backed up, the periodicity of taking backups and also
the medium and storage place to backup data
...
VTU-EDUSAT
Page 8
Database Management System
1
...
The DBMS is a general purpose software system that
facilitates the process of defining, constructing, manipulating and sharing databases
among various users and applications
...
The descriptive information is also stored in the database in the form
database catalog or dictionary; it is called meta-data
...
An application program accesses the database by sending the qurries or requests for data
to DBMS
...
VTU-EDUSAT
Page 9
Database Management System
1
...
•
Some mini-world entities:
STUDENTs
COURSEs
SECTIONs (of COURSEs)
(academic) DEPARTMENTs
INSTRUCTORs
Example of a Database (with a Conceptual Data Model)
•
Some mini-world relationships:
SECTIONs are of specific COURSEs
STUDENTs take SECTIONs
COURSEs have prerequisite COURSEs
INSTRUCTORs teach SECTIONs
COURSEs are offered by DEPARTMENTs
STUDENTs major in DEPARTMENTs
VTU-EDUSAT
Page 10
Database Management System
Example of a simple Database
VTU-EDUSAT
Page 11
Database Management System
Example of a simple Database
Example of a Student File
VTU-EDUSAT
Page 12
Database Management System
Example of a Student File
VTU-EDUSAT
Page 13
Database Management System
Example of a simplified database catalog
1
...
ANSI/SPARC produced an interim report in 1972 followed
by a final report in 1977
...
Under this approach, a database is considered as containing data about an enterprise
...
A database system that is able to separate the three different views of
data is likely to be flexible and adaptable
...
We now briefly discuss the three different views
...
This view is
often a restricted view of the database and the same database may provide a number of
different views for different classes of users
...
For example, a
department head may only be interested in the departmental finances and student
enrolments but not the library information
...
The payroll office would have no
interest in student enrolments
...
This view is
normally more stable than the other two views
...
The conceptual view is the overall community view of
the database and it includes all the information that is going to be represented in the
database
...
The internal view is the view about the actual physical storage of data
...
At least the following aspects are considered at
this level:
Storage allocation e
...
B-trees, hashing etc
...
g
...
Miscellaneous e
...
data compression and encryption techniques, optimization of
the internal structures
...
The internal view does not deal
with the physical devices directly
...
The separation of the conceptual view from the internal view enables us to
provide a logical description of the database without the need to specify physical
structures
...
Separating the external views
from the conceptual view enables us to change the conceptual view without affecting the
external views
...
Assuming the three level view of the database, a number of mappings are needed to
enable the users working with one of the external views
...
VTU-EDUSAT
Page 16
Database Management System
Staff tax information e
...
number of dependents
...
Staff employment status, salary level, leave information etc
...
A mapping will need to be created where all the staff in the different categories
are combined into one category for the payroll office
...
This will need to be mapped to the salary level for the salary office
...
1
...
There are two types of data
Independence
...
Logical data independence
...
Physical data independence
...
Logical data independence is the capacity to change the conceptual schema
without having to change the external schema
...
Physical data independence is the capacity to change the internal schema without
changing the conceptual schema
...
•
Overhead for providing generality, security, concurrency control, recovery, and
integrity functions When a DBMS may be unnecessary:
VTU-EDUSAT
Page 17
Database Management System
•
If the database and applications are simple, well defined and not expected to
change
...
•
If access to data by multiple users is not required
...
1
...
11 Data Model
A model is an abstraction process that hides superfluous details
...
Data model and different types of Data Model
Data model is a collection of concepts that can be used to describe the structure of a
database which provides the necessary means to achieve the abstraction
...
data types
VTU-EDUSAT
Page 18
Database Management System
relationships
constraints
Types of Data Models
1
...
2
...
3
...
Object-oriented Data Models:
5
...
High Level-conceptual data model: User level data model is the high level or
conceptual model
...
2
...
Low level data model is only for Computer
specialists not for end-user
...
Representation data model: It is between High level & Low level data model
Which provides concepts that may be understood by end-user but that are not too
far removed from the way data is organized by within the computer
...
Relational Model
The Relational Model uses a collection of tables both data and the relationship
among those data
...
Relational database comprising of two tables
Customer –Table
...
00
1200
...
00
1234
...
00
Customer Preethi and Rocky share the same account number A-111
Advantages
1
...
2
...
3
...
2
...
Preethi
111-222-3456
A-101
A-111
VTU-EDUSAT
yelhanka
Bangalore
1000
...
00
Page 20
Database Management System
The records in the database are organized as collection of arbitrary groups
...
Representation of relationship between entities is implemented using pointers
which allows the representation of arbitrary relationship
2
...
3
...
3
...
The structure allows repeating information using parent/child relationships:
each parent can have many children but each child only has one parent
...
Advantages:
1
...
2
...
3
...
This result in a stable database especially when
modification of the data base is made
...
0 Object-oriented Data Models
•
Several models have been proposed for implementing in a database system
...
g
...
g
...
•
Additionally, systems like O2, ORION (at MCC – then ITASCA), IRIS (at H
...
used in Open OODB)
...
0 Object-Relational Models
•
Most Recent Trend
...
Relational systems incorporate concepts from object databases leading to objectrelational
...
0,ODMG-version 3
...
•
Exemplified in the latest versions of Oracle-10i,DB2, and SQL Server and other
DBMSs
...
Schemas versus Instances
•
Database Schema:
The description of a database
...
•
Schema Diagram:
An illustrative display of (most aspects of) a database schema
...
g
...
VTU-EDUSAT
Page 22
Database Management System
•
Database State:
The actual data stored in a database at a
particular moment in time
...
Also called database instance (or occurrence or snapshot)
...
g
...
Database State
•
Database State:
Refers to the content of a database at a moment in time
...
•
Valid State:
A state that satisfies the structure and constraints of the database
...
The database state changes every time the database is updated
•
Schema is also called intension
• State is also called extension
VTU-EDUSAT
Page 23
Database Management System
Example of a Database Schema
Example of a database state
VTU-EDUSAT
Page 24
Database Management System
DBMS Languages
•
Data Definition Language (DDL)
•
Data Manipulation Language (DML)
•
High-Level or Non-procedural Languages: These include the relational language
SQL
•
May be used in a standalone way or may be embedded in a programming
language
•
Low Level or Procedural Languages:
These must be embedded in a programming language
Data Definition Language (DDL)
Used by the DBA and database designers to specify the conceptual schema of a
database
...
VTU-EDUSAT
Page 25
Database Management System
•
In some DBMSs, separate storage definition language (SDL) and view
definition language (VDL) are used to define internal and external schemas
...
•
A library of functions can also be provided to access the DBMS from a
programming language
•
Alternatively, stand-alone DML commands can be applied directly (called a query
language)
...
Also called declarative languages
...
DBMS Interfaces
•
Stand-alone query language interfaces
Example: Entering SQL queries at the DBMS interactive SQL interface (e
...
SQL*Plus in ORACLE)
VTU-EDUSAT
Page 26
Database Management System
•
Programmer interfaces for embedding DML in programming languages
•
User-friendly interfaces
•
Menu-based, forms-based, graphics-based, etc
...
g embedded SQL (for C,C++, etc
...
g
...
g
...
)
•
Natural language: requests in written English
•
Combinations of the above:For example, both menus and forms usedextensively
in Web database interfaces
Other DBMS Interfaces
•
Speech as Input and Output
•
Web Browser as an interface
•
Parametric interfaces, e
...
, bank tellers using function keys
...
0 The database system environment
The DBMS is a complex software system
...
The top half of the figure refers to the various users
of the database environment and their interfaces
...
The database and the DBMS catalog are usually stored on disk
...
which inclues disk input/Output
...
VTU-EDUSAT
Page 28
Database Management System
If we consider the top half of the figure, It shows interfaces to DBA staff, casual users,
application programmers and parametric users
The DDL compiler processes schema definitions, specified in the DDL,and stores the
description of the schema in the DBMS Catalog
...
Storage
details of each file, mapping information among schemas and constraints
...
The queries are parsed,
analysed for correctness of the operations for
the model
...
The internal query is subjected to query optimization
...
Application programmer writes programs in host languages
...
1Centralized and Client-Server DBMS Architectures
Centralized DBMS:
•
Combines everything into single system including- DBMS software, hardware,
application programs, and user interface processing software
...
VTU-EDUSAT
Page 29
Database Management System
A Physical Centralized Architecture
Architectures for DBMS have followed trends similar to those generating computer
system architectures
...
The reason was that most users
accessed such systems via computer terminals that did not have processing power and
only provided display capabilities
...
As prices of hardware declined, most users replaced their terminals with PCs and
workstations
...
VTU-EDUSAT
Page 30
Database Management System
Basic 2-tier Client-Server Architectures
•
Specialized Servers with Specialized functions
•
Print server
•
File server
•
DBMS server
•
Web server
•
Email server
•
Clients can access the specialized servers as needed
Logical two-tier client server architecture
Clients
•
Provide appropriate interfaces through a client software module to access and
utilize the various server resources
...
•
Connected to the servers via some form of a network
...
)
DBMS Server
•
Provides database query and transaction services to the clients
•
Relational DBMS servers are often called SQL servers, query servers, or
transaction servers
•
Applications running on clients utilize an Application Program Interface (API) to
access server databases via standard interface such as:
VTU-EDUSAT
Page 31
Database Management System
•
ODBC: Open Database Connectivity standard
•
JDBC: for Java programming access
•
Client and server must install appropriate client module and server module
software for ODBC or JDBC
Two Tier Client-Server Architecture
•
A client program may connect to several DBMSs, sometimes called the data
sources
...
Other variations of clients are possible: e
...
, in some object DBMSs, more
functionality is transferred to clients including data dictionary functions,
optimization and recovery across multiple servers, etc
...
•
Three-tier Architecture Can Enhance Security:
•
Database server only accessible via middle tier
•
Clients cannot directly access database server
VTU-EDUSAT
Page 32
Database Management System
Classification of DBMSs
•
Based on the data model used
•
Traditional: Relational, Network, Hierarchical
...
•
Other classifications
•
Single-user (typically used with personal computers) vs
...
•
Centralized (uses a single computer with one database) vs
...
Cost considerations for DBMSs
•
Cost Range: from free open-source systems to configurations costing millions of
dollars
•
Examples of free relational DBMSs: MySQL, PostgreSQL, others
VTU-EDUSAT
Page 34