Professional Documents
Culture Documents
neha.bharill@mahindrauniversity.edu.in
Course Code: CS/AI 3103
Content
Basic Concepts of Database Systems.
Functions of DBMS.
Database
Is a logically coherent collection of data with some inherent meaning. It consists of four
elements:
Data
Relationship: Correspondence between the various data elements.
Constraints: Defines correct database status.
Schema: The overall design of the database.
Example
Savings bank enterprise stores information about customers and savings accounts etc.
One way to keep the information on computers is to store in files provided by operating
systems (OS).
Disadvantages
Difficulty in accessing data:possible operations need to be hardcoded in programs.
Data Redundancy and Inconsistency: Data redundancy leads to higher storage and
access cost.
Data Isolation: Data scattered in various files, and files may be different formats.
Integrity Problem: Data value stored in the database must satisfy certain types of
consistency constraints.
Atomicity Problems: The funds transfer should be atomic.
Concurrent-access anamolies: Concurrent access may result in inconsistent data
Enforcing security constraints is difficult.
Real-world Entity: A modern DBMS is more realistic and uses real-world entities to design
its architecture. For Example:a school database may use students as an entity and their
age as an attribute.
Relation-based tables: DBMS allows entities and relations among them to form tables.
Isolation of data and application: A database is an active entity, whereas data is said to be
passive, on which the database works and organizes.
Reduction of redundancy: DBMS follows the rules of normalization, which splits a relation
when any of its attributes is having redundancy in values.
Propagating Updates: Changes made to record of one file, automatically made to other
files related to that record.
Query Language: DBMS is equipped with query language, which makes it more efficient
to retrieve and manipulate data.
Integrity can be Maintained : Data contained in the database is both accurate and
consistent. Example: The balance of a bank account may never fall below a prescribed
amount like 500 Rs.
Atomicity: The transaction must be atomic, i.e., it must happen in its entirely or not at
all. It is difficult to ensure atomicity in a conventional file processing system.
Multiuser and Concurrent Access: DBMS supports multi-user environment and allows
them to access and manipulate data in parallel.
Multiple views: DBMS offers multiple views for different users. A user who is in the Sales
department will have a different view of database than a person working in the Production
department.
Security: DBMS offers methods to impose constraints while entering data into the
database and retrieving the same at a later stage. DBMS offers many different levels of
security features, which enables multiple users to have different views with different
features.
Cost.
Complexity.
Qualified Professional.
Lower Efficiency.
Company Product
Oracle Oracle 8i, 9i, 10g etc.
IBM DB2, Universal Server
Microsoft Access, Sql Server
Sybase Adaptive Server
Informix Dynamic Server
Universities
Hospital
Banking system
Railway Reservation System
Airlines
Human Resources
IT Industry
Credit and Transaction
Sales
Telecommunication
Library Management System
Data View
Level of Abstraction
Database Schema
Database Instance
Data Independence
Database Architectures
Database Language and Interfaces
Meta Data
Data Dictionary
Physical Level
It is the lowest level of abstraction.
It describes how the data are actually stored in the database.
It describes complex low-level data structures in detail.
Logical Level
Higher level than the physical level.
It describes what data are actually stored in the database.
It also describes relationship existing among those data.
View Level
The upper most level is called view level.
It describes only the part of the database.
It simplify the interaction with the system and hide the complexity that arises in the
logical level.
Description
The overall design of the database is called database schema.
It represents the logical view of the entire database.
It defines how the data is organized and relations among them are associated.
It defines the descriptive details of the database, depicted by means of schema diagram.
Definition
The collection of information stored in the database at a particular moment is called instance of
the database.
It 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.
The changes in physical features of storage, i.e., changes to the physical storage format
should not affect schema at conceptual level.
Example: Suppose we want to replace hard-disks with SSD it should not have any impact
on the logical data or schemas.
Key Points
DBMS design depends on its architecture.
It can be centralized or decentralized or hierarchical.
The architecture of DBMS can be seen as either single tier or multi-tier.
The architecture divides the system into related but n independent modules.
1-tier Architecture
The DBMS is the only entity where the user directly sits on the DBMS and uses it.
Any changes done here will directly be done on the DBMS itself.
Database designers and programmers normally prefer to use single-tier architecture.
(a) (b)
Advantages
The advantages of this architecture are its simplicity and seamless
compatibility with existing systems.
Disadvantages
The Two-tier architecture is not scalable because each client requires its
own database session.
Client End
The client machine acts as merely a front end and does not directly connect to the server.
The application client first communicate with the application server usually through any
form of interface.
Application Server
The application layer sits in the middle and acts as a mediator between the end-user and
the database.
The application server communicates with the database system to access data.
Advantages
High Performance, light weight persistent object.
High degree of flexibility in deployment platform and configured.
Disadvantages
This architecture is less standard than Enterprise Java Beans.
Example
Transfer Program, ATM Machine
Application Programmers
Professional Programmers are responsible for developing application program.
Application program could be written in COBOL, PASCAL, etc.
Application programmer can choose many tool to develop user interfaces.
Sophisticated Users
These users interact with the system without writing program.
They generate their request in the form of database query language.
Each query is submitted to the query processor whose function is to break down DML
statement into instruction that the data storage manager understand.
Online Users
These users communicate with database directly via. an online terminal.
Online users can also be navie users but require additional help.
Example
Suppose a users wishes to find account balance over world wide web. They can access the portal
and retrieve the balance.
Specialized Users
Users who are responsible to write specialized database applications that do not fit into the
conventional data processing system.
Example
Expert System, Artificial Intelligence system, Knowledge base system with complex data type.
Role of DBA
The DBA is a special user who is created when the system is installed.
It provides the necessary technical support for implementing the decision taken by
administrator.
It decides the privileges and gives authentication to the user as per the privileges.
Function of DBA
Defining the Schema.
Installing and upgrading.
user interaction.
Defining Integrity Constraint.
Defining Security.
Granting of Authorization of Data Access
Procedural DML
It requires what data the user wants to retrieve and how to get the data.
Non-procedural DML
It requires what data user wants only without indicating how to get that data.
The DML components of SQL Language is non-procedural.
Query Language
Data manipulation is called query that request the retrieval of information.
The portion of a DML that involves information retrieval is called query language.
It acts as a mediator between the disk storage and the query processor.
It translates various DDL and DML statement into low-level system commands for
retrieving data from disk storage.
Buffer Manager
It fetches data from disk storage into main memory and decides what data to cache in main
memory.
File Manager
It manages the allocation of space on disk storage and utilize efficient techniques of data
structure to represent data on the disk.
Privilege Manager
It checks the authentication of the users while accessing or manipulating the data.
Transaction Manager
It is responsible for keeping database in a consistent despite of system failure.
Example
Fetch student name and college name whose roll no. is 125.
Roll no. describes a data that gives you related information about another data which is
collectively known as meta data.
Schema of a table is an example of metadata.