Database Systems Concepts: Introduction To Databases

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

Database Systems Concepts

Introduction to Databases

Objectives
Some common uses of database systems. Characteristics of file-based systems. Database and Database Management System (DBMS). Advantages and disadvantages of DBMSs.

Purpose of three-level database architecture.


Contents of external, conceptual, and internal levels. Meaning of logical and physical data independence. Distinction between DDL and DML.

Examples of Database Applications


Purchases from the supermarket Purchases using your credit card Booking a holiday at the travel agents Using the local library Taking out insurance Renting a video Using the Internet Studying at university
Pearson Education Limited 1995, 2005

File-Based Systems
Collection of application programs that perform services for the end users (e.g. reports). Each program defines and manages its own data.

File-Based Processing

Limitations of File-Based Approach


Separation and isolation of data
Each program maintains its own set of data. Users of one program may be unaware of potentially useful data held by other programs.

Duplication of data
Same data is held by different programs. Wasted space and potentially different values and/or different formats for the same item.
6

Limitations of File-Based Approach


Data dependence
File structure is defined in the program code.

Incompatible file formats


Programs are written in different languages, and so cannot easily access each others files.

Fixed Queries/Proliferation of application programs


Programs are written to satisfy particular functions. Any new requirement needs a new program.
7

Database Approach
Arose because:
Definition of data was embedded in application programs, rather than being stored separately and independently. No control over access and manipulation of data beyond that imposed by application programs.

Result:
the database and Database Management System (DBMS).

Database
Shared collection of logically related data (and a description of this data), designed to meet the information needs of an organization.

System catalog (metadata) provides description of data to enable programdata independence.


Logically related data comprises entities, attributes, and relationships of an organizations information.
9

Database Management System (DBMS)


A software system that enables users to define, create, maintain, and control access to the database.

(Database) application program: a computer program that interacts with database by issuing an appropriate request (SQL statement) to the DBMS.

10

Database Management System (DBMS)

11

Database Approach
Controlled access to database may include:
a security system an integrity system a concurrency control system a recovery control system a user-accessible catalog.

12

Components of DBMS Environment

13

Components of DBMS Environment


Hardware
Can range from a PC to a network

Software
DBMS, operating system, application programs.

Data
and a description of this data (schema)

Procedures
Instructions and rules that should be applied to the design and use of the database and DBMS.

People
14

Roles in the Database Environment


Data Administrator (DA) Database Administrator (DBA) Database Designers (Logical and Physical) Application Programmers End Users (naive and sophisticated)

15

Advantages of DBMSs
Control of data redundancy Data consistency More information from the same amount of data Sharing of data Improved data integrity Improved security Enforcement of standards Economy of scale
16

Advantages of DBMSs
Balance conflicting requirements Improved data accessibility and responsiveness Increased productivity Improved maintenance through data independence Increased concurrency Improved backup and recovery services

17

Disadvantages of DBMSs
Complexity Size Cost of DBMS Additional hardware costs Cost of conversion Performance Higher impact of a failure

18

Database Environment Three Level Architecture

19

Objectives of Three-Level Architecture


All users should be able to access same data.
A users view is immune to changes made in other views. Users should not need to know physical database storage details.
20

Objectives of Three-Level Architecture


DBA should be able to change database storage structures without affecting the users views. Internal structure of database should be unaffected by changes to physical aspects of storage. DBA should be able to change conceptual structure of database without affecting all users.
21

ANSI-SPARC Three-Level Architecture

22

ANSI-SPARC 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.

23

ANSI-SPARC Three-Level Architecture


Internal Level
Physical representation of the database on the computer. Describes how the data is stored in the database.

24

Differences between Three Levels of ANSI-SPARC Architecture

25

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.

26

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.

27

Data Independence and the ANSISPARC Three-Level Architecture

28

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.

29

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.

Non-Procedural DML
allows user to state what data is needed rather than how it is to be retrieved.

Fourth Generation Languages (4GLs)


30

You might also like