+ All Categories
Home > Education > Dbms chap i

Dbms chap i

Date post: 12-Nov-2014
Category:
Upload: bala-ganesh
View: 428 times
Download: 0 times
Share this document with a friend
Description:
 
17
Subject Name Code Credit Hours Database System COMP 219 3 DATABASE MANAGEMENT SYSTEM
Transcript
Page 1: Dbms chap i

Subject Name Code Credit HoursDatabase System COMP 219 3

DATABASE MANAGEMENT SYSTEM

Page 2: Dbms chap i

Subject Name Code Credit HoursDatabase System COMP 219 3

Introduction :

• Introduction to Database• Database Systems Vs File Systems • View of data • Data Models • Data base languages • Transaction Management • Database systems Structure • History of Database Systems • Database Systems Applications • Entity Relationship Model

Page 3: Dbms chap i

Subject Name Code Credit HoursDatabase System COMP 219 3

INTRODUCTION

• Data is stored facts.

• Data may be numerical data which may be integers or floating point numbers, and non-numerical data such as characters, date and etc.,

What is Data ?

Page 4: Dbms chap i

Subject Name Code Credit HoursDatabase System COMP 219 3

Example:98898792

phychemmathsbiology

The above numbers may be anything: It may be distance in kms or amount in rupees or no of days or marks in each subject etc.,

Page 5: Dbms chap i

Subject Name Code Credit HoursDatabase System COMP 219 3

What is information ?

Information is RELATED DATA. The data ( information) which is used by an organisation – a college, a library, a bank, a manufacturing company – is one of its most valuable resources.

98898792

phychemmathsbiology

Page 6: Dbms chap i

Subject Name Code Credit HoursDatabase System COMP 219 3What is Database ?

Database is a collection of information organized in such a way that a computer program can quickly select desired pieces of data.

98898792

phychemmathsbiology

76877988

phychemmathsbiology

91678777

phychemmathsbiology

86807988

phychemmathsbiology

Page 7: Dbms chap i

Subject Name Code Credit HoursDatabase System COMP 219 3

Database Management System (DBMS)

• DBMS contains information about a particular enterprise– Collection of interrelated data– Set of programs to access the data – An environment that is both convenient and efficient to use

• Database Applications:– Banking: all transactions– Airlines: reservations, schedules– Universities: registration, grades– Sales: customers, products, purchases– Online retailers: order tracking, customized recommendations– Manufacturing: production, inventory, orders, supply chain– Human resources: employee records, salaries, tax deductions

• Databases touch all aspects of our lives

A collection of programs that enables you to store, modify, and extract information from a database.

Page 8: Dbms chap i

Subject Name Code Credit HoursDatabase System COMP 219 3

Database Systems Vs File Systems

• In the early days, database applications were built directly on top of file systems

• Drawbacks of using file systems to store data:– Data redundancy and inconsistency

• Multiple file formats, duplication of information in different files– Difficulty in accessing data

• Need to write a new program to carry out each new task– Data isolation — multiple files and formats– Integrity problems

• Integrity constraints (e.g. account balance > 0) become “buried” in program code rather than being stated explicitly

• Hard to add new constraints or change existing ones

Page 9: Dbms chap i

Subject Name Code Credit HoursDatabase System COMP 219 3

Database Systems Vs File Systems Cont.

• Drawbacks of using file systems (cont.) – Atomicity of updates

• Failures may leave database in an inconsistent state with partial updates carried out• Example: Transfer of funds from one account to another should either complete or not happen

at all

– Concurrent access by multiple users• Concurrent accessed needed for performance• Uncontrolled concurrent accesses can lead to inconsistencies

– Example: Two people reading a balance and updating it at the same time

– Security problems• Hard to provide user access to some, but not all, data

• Database systems offer solutions to all the above problems

Page 10: Dbms chap i

Subject Name Code Credit HoursDatabase System COMP 219 3

View of data

• Physical level: describes how a record (e.g., customer) is stored.

• Logical level: describes data stored in database, and the relationships among the data.

type customer = recordcustomer_id : string; customer_name : string;customer_street : string;customer_city : integer;

end;(PASCAL CODE)

• View level: application programs hide details of data types. Views can also hide information (such as an employee’s salary) for security purposes.

Data Abstraction:

Page 11: Dbms chap i

Subject Name Code Credit HoursDatabase System COMP 219 3View of data Contd.

An architecture for a database system:

Page 12: Dbms chap i

Subject Name Code Credit HoursDatabase System COMP 219 3

Instances and Schemas

• Similar to types and variables in programming languages• Schema – the logical structure of the database

– Example: The database consists of information about a set of customers and accounts and the relationship between them)

– Analogous to type information of a variable in a program– Physical schema: database design at the physical level– Logical schema: database design at the logical level

• Instance – the actual content of the database at a particular point in time – Analogous to the value of a variable

• Physical Data Independence – the ability to modify the physical schema without changing the logical schema– Applications depend on the logical schema– In general, the interfaces between the various levels and components should be well

defined so that changes in some parts do not seriously influence others.

Page 13: Dbms chap i

Subject Name Code Credit HoursDatabase System COMP 219 3

Instances and Schemas

• DB Schema Diagram for a Company:

Employee:

Eno Ename Salary Address

Page 14: Dbms chap i

Subject Name Code Credit HoursDatabase System COMP 219 3

Instances and Schemas» DB Schema Diagram for a Company:

Department:

Dno Dname Dlocation

Project:

Pno Pname Hours

Page 15: Dbms chap i

Subject Name Code Credit HoursDatabase System COMP 219 3

Instances and Schemas

• Instance Example:

Eno Ename Salary Address

1

2

3

A

B

C

10,000

20,000

30,000

First street

Second street

Third street

Page 16: Dbms chap i

Subject Name Code Credit HoursDatabase System COMP 219 3

Data IndependenceThree schema architecture for a database system:

View1 View2 View n

Conceptual Schema

Internal Schema

Disk

External schema

Conceptual mapping

Internal/Physical level

Page 17: Dbms chap i

Subject Name Code Credit HoursDatabase System COMP 219 3

Data Independence• Two types of Data Independence• Logical Data Independence Capacity to change the conceptual schema without

having to change external schema

• Physical Data Independence Capacity to change the Internal schema without having

to change external schema


Recommended