+ All Categories
Home > Technology > Comp107 chep6

Comp107 chep6

Date post: 12-Nov-2014
Category:
Upload: bala-ganesh
View: 826 times
Download: 0 times
Share this document with a friend
Description:
 
14
Subject Name Code Credit Hours FUNDAMENTAL COMPUTER PRINCIPLE & PROGRAMMING DBMS
Transcript
Page 1: Comp107 chep6

Subject Name Code Credit HoursFUNDAMENTAL COMPUTER PRINCIPLE & PROGRAMMING

DBMS

Page 2: Comp107 chep6

Subject Name Code Credit HoursFUNDAMENTAL COMPUTER PRINCIPLE & PROGRAMMING

D.Balaganesh LINCOLN UNIVERSITY COLLGE

2

Database Management System (DBMS)

• Collection of interrelated data• Set of programs to access the data • DBMS contains information about a particular enterprise• DBMS provides 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– Manufacturing: production, inventory, orders, supply chain– Human resources: employee records, salaries, tax deductions

• Databases touch all aspects of our lives

Page 3: Comp107 chep6

Subject Name Code Credit HoursFUNDAMENTAL COMPUTER PRINCIPLE & PROGRAMMING

D.Balaganesh LINCOLN UNIVERSITY COLLGE

3

Purpose of Database System• In the early days, database applications were built 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 part of program code

• Hard to add new constraints or change existing ones

Page 4: Comp107 chep6

Subject Name Code Credit HoursFUNDAMENTAL COMPUTER PRINCIPLE & PROGRAMMING

D.Balaganesh LINCOLN UNIVERSITY COLLGE

4

Purpose of Database Systems (Cont.)• Drawbacks of using file systems (cont.)

– Atomicity of updates• Failures may leave database in an inconsistent state with partial

updates carried out• E.g. 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

– E.g. two people reading a balance and updating it at the same time

– Security problems• Database systems offer solutions to all the above

problems

Page 5: Comp107 chep6

Subject Name Code Credit HoursFUNDAMENTAL COMPUTER PRINCIPLE & PROGRAMMING

5

Three-Level Architecture

© Pearson Education Limited 1995, 2005

Page 6: Comp107 chep6

Subject Name Code Credit HoursFUNDAMENTAL COMPUTER PRINCIPLE & PROGRAMMING

6

Three-Level Architecture• External Level– Users’ view of the database. – Describes that part of database that is

relevant to a particular user.

• Conceptual Level– Community view of the database. – Describes what data is stored in database

and relationships among the data.

Page 7: Comp107 chep6

Subject Name Code Credit HoursFUNDAMENTAL COMPUTER PRINCIPLE & PROGRAMMING

7

Three-Level Architecture• Internal Level– Physical representation of the database on

the computer. – Describes how the data is stored in the

database.

Page 8: Comp107 chep6

Subject Name Code Credit HoursFUNDAMENTAL COMPUTER PRINCIPLE & PROGRAMMING

8

Data Independence• Logical Data Independence– Refers to immunity of external schemas to

changes in conceptual schema.– Conceptual schema changes (e.g.

addition/removal of entities).– Should not require changes to external

schema or rewrites of application programs.

Page 9: Comp107 chep6

Subject Name Code Credit HoursFUNDAMENTAL COMPUTER PRINCIPLE & PROGRAMMING

9

Data Independence• Physical Data Independence– Refers to immunity of conceptual schema to

changes in the internal schema.– Internal schema changes (e.g. using different

file organizations, storage structures/devices).– Should not require change to conceptual or

external schemas.

Page 10: Comp107 chep6

Subject Name Code Credit HoursFUNDAMENTAL COMPUTER PRINCIPLE & PROGRAMMING

10

Data Independence and the Three-Level Architecture

© Pearson Education Limited 1995, 2005

Page 11: Comp107 chep6

Subject Name Code Credit HoursFUNDAMENTAL COMPUTER PRINCIPLE & PROGRAMMING

11

Database Languages• Data Definition Language (DDL)– Allows the DBA or user to describe and

name entities, attributes, and relationships required for the application

– plus any associated integrity and security constraints.

© Pearson Education Limited 1995, 2005

Page 12: Comp107 chep6

Subject Name Code Credit HoursFUNDAMENTAL COMPUTER PRINCIPLE & PROGRAMMING

12

Database Languages• Data Manipulation Language (DML)– Provides basic data manipulation operations

on data held in the database.

• Procedural DML – allows user to tell system exactly how to

manipulate data.TCL transmission Control Language

Page 13: Comp107 chep6

Subject Name Code Credit HoursFUNDAMENTAL COMPUTER PRINCIPLE & PROGRAMMING

D.Balaganesh LINCOLN UNIVERSITY COLLGE

13

Entity-Relationship ModelExample of schema in the entity-relationship model

Page 14: Comp107 chep6

Subject Name Code Credit HoursFUNDAMENTAL COMPUTER PRINCIPLE & PROGRAMMING

• An ER model is an abstract way to describe a database. Describing a database usually starts with a relational database, which stores data in tables. Some of the data in these tables point to data in other tables - for instance, your entry in the database could point to several entries for each of the phone numbers that are yours. The ER model would say that you are an entity, and each phone number is an entity, and the relationship between you and the phone numbers is 'has a phone number'. Diagrams created to design these entities and relationships are called entity–relationship diagrams or ER diagrams


Recommended