CS207: Database and Information Systems

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 32

CS207: Database and Information

Systems

By :
Dr. Aruna Tiwari
Associate Professor
Department of Computer Science &
Engineering

1
Course Objectives

• To introduce basic DBMS concepts

• Database Design

• Working with SQL

• Transaction Processing

• Query Optimization

• Physical Database Design

• Working With Case Study


Implementation as Minor Project

2
Books
• “Database system concepts”, Henry F Korth, Abraham Silberschatz, fourth
ed., McGraw-Hill International editions,
• "Fundamentals of Database Systems", Elmasri, Navathe,
Third ed, Addison Wesley
• "An introduction to Database Systems", C.J.Date, Sixth ed., Narosa
Publications

3
Data processing
• Data Collection

• Recording

• Sorting

• Classifying

• Calculating

• Retrieving

• Summarizing

• Communicating

4
Traditional Method of Data Storage

ER/CORP/CRS/DB07/003
Copyright © 2004, 10
Infosys Technologies Ltd Version No: 2.0
5
Ways of storing data in files – customer data

4176 Aniruddha Sarkar SBU1


4181 Manoj Saha SBU1
4183
4203
Moushumi Dharchoudhury
Suryanarayana D.V.S.S.
SBU1
SBU1
Predefined length
4204 Vivek Rai SBU1

4176 AniruddhaSarkar SBU1


4181 ManojSaha SBU1
4183 MoushumiDharchoudhury SBU1
4203 SuryanarayanaD.V.S. SBU1
4204 Vivek Rai SBU1

ER/CORP/CRS/DB07/003
Copyright © 2004, 11
Infosys Technologies Ltd Version No: 2.0
6
Why DBMS ?
Or Need of DBMS
or Comparison with Conventional Data Processing Methods
• Lack of Data Definition

• Data Redundancy

• Data Security

• Atomicity Problems

• Data Integrity

• Adhoc Queries

• Concurrent Access Anomalies

7
Terminologies
• Data redundancy
• Data consistency/
Consistency Constraints /
Integrity Constraints
• Instances
• Schema
• Subschema
8
Database
• Computer based record-keeping system
• Organized collection of interrelated (persistent) data
• Records & maintains data

Database Management System


• Collection of interrelated files and set of programs which allows users to access and
modify files
• Primary Goal is to provide a convenient and efficient way to store, retrieve
and modify information
• Layer of abstraction between the application programs and the file system

9
Where does the DBMS fit in?
Position of DBMS

ER/CORP/CRS/DB07/003
Copyright © 2004, 14
Infosys Technologies Ltd Version No: 2.0
10
Difference Between File and DBMS Operations

ER/CORP/CRS/DB07/003
Copyright © 2004, 15
Infosys Technologies Ltd Version No: 2.0
11
Types of Databases

Centralized Database Distributed Database

ER/CORP/CRS/DB07/003
Copyright © 2004, 16
Infosys Technologies Ltd Version No: 2.0
12
TYPES OF DATABASES
Centralized Distributed
• All data is located at a single site • The database is stored on several
• Allows for greater control over accessing computers - from personal computers up to
and updating data mainframe systems
• Vulnerable to failure as they depend on the • Computers in a distributed system
availability of resources at the central site communicate with one another through
Example: The account information of various communication media, such as high
customers is stored in a particular branch speed networks or telephone lines
office of a bank. This information must be • Distributed databases are geographically
shared across all Automated Teller Machines separated and managed
(ATM), so that customers can withdraw • Distributed databases are separately
money from their accounts. Instead of storing administered
the customer information in every ATM • Distributed databases have a slower
machine it can be stored at a common place interconnection
(the branch office of the bank) and shared Example: Consider the bank system. The
over a network. bank’s head office is located at Chicago and
the branch offices are at Melbourne and
Tokyo. The bank database is distributed
across the branch offices. The branch offices
are connected through a network

ER/CORP/CRS/DB07/003
Copyright © 2004, 17
Infosys Technologies Ltd Version No: 2.0
13
Data Abstraction

External / View Level External External External


(Individual User View) Schema A Schema B Schema C

Conceptual View Conceptual Schema


(Common User View)

Internal Level Internal Schema


(Storage View)

ER/CORP/CRS/DB07/003
Copyright © 2004, 18
Infosys Technologies Ltd Version No: 2.0
14
•Instances

•Schema:
Overall design of the database.

•Subschema

15
Data Independence
• Physical Data Independence

• Logical Data Independence

16
Data Models

Definition of data model :

A conceptual tool used to describe


• Data
• Data relationships
• Data semantics
• Consistency constraints

ER/CORP/CRS/DB07/003
Copyright © 2004, 23
Infosys Technologies Ltd Version No: 2.0
17
Types of data models
• Object based logical model
– Entity relationship model
– Object Oriented Data Model
• Record based logical model
– Hierarchical data model
– Network data model
– Relational data model

ER/CORP/CRS/DB07/003
Copyright © 2004, 24
Infosys Technologies Ltd Version No: 2.0
18
New Data models

•Object oriented
•Object relational
•semistructured

19
Database Languages
• DDL (Data Definition Language)

• DML (Data Manipulation Language)


– Procedural i.e. Relational Algebra
– Nonprocedural i.e. SQL etc.

• DSDL (Data Storage & Definition Language)

20
Data Dictionary
• File Containing metadata (data about data)

• Consulted before any manipulation

21
Detailed System Architecture

ER/CORP/CRS/DB07/003
Copyright © 2004, 19
Infosys Technologies Ltd Version No: 2.0
22
An example of the three levels

Customer_Loan
Cust_ID : 101
Loan_No : 1011 External
Amount_in_Dollars : 8755.00
CREATE TABLE Customer_Loan (
Cust_ID NUMBER(4)
Loan_No NUMBER(4) Conceptual
Amount_in_Dollars NUMBER(7,2))
Cust_ID TYPE = BYTE (4), OFFSET = 0
Loan_No TYPE = BYTE (4), OFFSET = 4 Internal
Amount_in_Dollars TYPE = BYTE (7), OFFSET = 8

ER/CORP/CRS/DB07/003
Copyright © 2004, 20
Infosys Technologies Ltd Version No: 2.0
23
Users of a DBMS

• Database Administrator (DBA)


– Schema definition
– Storage structure and access method definition
– Enforcing security and integrity rules
– Strategizing backup & recovery
– Monitoring performance
– Granting of authorization for data access

• Sophisticated users
• Application programmers

• End (Naïve) users

ER/CORP/CRS/DB07/003
Copyright © 2004, 21
Infosys Technologies Ltd Version No: 2.0
24
System Structure

Query processor

Storage manager

25
Advantages of a DBMS

• Data independence

• Reduction in data redundancy

• Better security

• Better flexibility

• Effective data sharing

• Enforces integrity constraints

• Enables backup and recovery

ER/CORP/CRS/DB07/003
Copyright © 2004, 22
Infosys Technologies Ltd Version No: 2.0
26
Two Tier Architecture

client
User

Application

network

Server
Database system

27
Three Tier Architecture

User

client

Application

network

Application Server
Server

Database system

28
Record based data model – Hierarchical data model

ER/CORP/CRS/DB07/003
Copyright © 2004, 25
Infosys Technologies Ltd Version No: 2.0
29
Record based data model – Network data model

ER/CORP/CRS/DB07/003
Copyright © 2004, 26
Infosys Technologies Ltd Version No: 2.0
30
Record based data model – Relational data model

ER/CORP/CRS/DB07/003
Copyright © 2004, 27
Infosys Technologies Ltd Version No: 2.0
31
Thanks

Any Queries ?

32

You might also like