introduction databases
TRANSCRIPT
-
8/3/2019 Introduction Databases
1/30
1
Introduction to Databases
Database Systems Concepts
-
8/3/2019 Introduction Databases
2/30
2
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.
-
8/3/2019 Introduction Databases
3/30
3
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
-
8/3/2019 Introduction Databases
4/30
4
File-Based Systems Collection of application programs that
perform services for the end users (e.g. reports).
Each program defines and manages its owndata.
-
8/3/2019 Introduction Databases
5/30
5
File-Based Processing
-
8/3/2019 Introduction Databases
6/30
6
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 valuesand/or different formats for the same item.
-
8/3/2019 Introduction Databases
7/30
7
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 applicationprograms Programs are written to satisfy particular functions. Any new requirement needs a new program.
-
8/3/2019 Introduction Databases
8/30
8
Database Approach Arose because:
Definition of data was embedded in applicationprograms, rather than being stored separately andindependently.
No control over access and manipulation of databeyond that imposed by application programs.
Result: the database and Database Management System
(DBMS).
-
8/3/2019 Introduction Databases
9/30
9
Database Shared collection of logically related data (and
a description of this data), designed to meet theinformation needs of an organization.
System catalog (metadata) provides descriptionof data to enable program data independence.
Logically related data comprises entities,attributes, and relationships of anorganizations information.
-
8/3/2019 Introduction Databases
10/30
10
Database Management System
(DBMS) A software system that enables users to define,create, maintain, and control access to thedatabase.
(Database) application program: a computerprogram that interacts with database by
issuing an appropriate request (SQLstatement) to the DBMS.
-
8/3/2019 Introduction Databases
11/30
11
Database Management System
(DBMS)
-
8/3/2019 Introduction Databases
12/30
12
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.
-
8/3/2019 Introduction Databases
13/30
13
Components of DBMS Environment
-
8/3/2019 Introduction Databases
14/30
14
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 designand use of the database and DBMS.
People
-
8/3/2019 Introduction Databases
15/30
15
Roles in the Database Environment
Data Administrator (DA ) Database Administrator (DBA)
Database Designers (Logical and Physical) Application Programmers End Users (naive and sophisticated)
-
8/3/2019 Introduction Databases
16/30
16
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
-
8/3/2019 Introduction Databases
17/30
17
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
-
8/3/2019 Introduction Databases
18/30
18
Disadvantages of DBMSs Complexity Size Cost of DBMS Additional hardware costs Cost of conversion Performance Higher impact of a failure
-
8/3/2019 Introduction Databases
19/30
19
Database EnvironmentThree Level Architecture
-
8/3/2019 Introduction Databases
20/30
20
Objectives of Three-Level
Architecture All users should be able to access same data.
A users view is immune to changes made inother views.
Users should not need to know physicaldatabase storage details.
-
8/3/2019 Introduction Databases
21/30
21
Objectives of Three-LevelArchitecture
DBA should be able to change database storagestructures without affecting the users views.
Internal structure of database should beunaffected by changes to physical aspects of storage.
DBA should be able to change conceptualstructure of database without affecting all users.
-
8/3/2019 Introduction Databases
22/30
22
ANSI-SPARC Three-Level Architecture
-
8/3/2019 Introduction Databases
23/30
23
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.
-
8/3/2019 Introduction Databases
24/30
24
ANSI-SPARC Three-Level
Architecture Internal Level
Physical representation of the database on thecomputer.
Describes how the data is stored in the database.
-
8/3/2019 Introduction Databases
25/30
25
Differences between Three Levels of ANSI-SPARC Architecture
-
8/3/2019 Introduction Databases
26/30
26
Data Independence Logical Data Independence
Refers to immunity of external schemas to changesin conceptual schema.
Conceptual schema changes (e.g. addition/removalof entities).
Should not require changes to external schema orrewrites of application programs.
-
8/3/2019 Introduction Databases
27/30
27
Data Independence Physical Data Independence
Refers to immunity of conceptual schema to changesin the internal schema.
Internal schema changes (e.g. using different fileorganizations, storage structures/devices).
Should not require change to conceptual or externalschemas.
-
8/3/2019 Introduction Databases
28/30
28
Data Independence and the ANSI-SPARC Three-Level Architecture
-
8/3/2019 Introduction Databases
29/30
29
Database Languages Data Definition Language (DDL)
Allows the DBA or user to describe and nameentities, attributes, and relationships required for
the application plus any associated integrity and security
constraints.
-
8/3/2019 Introduction Databases
30/30
30
Database Languages Data Manipulation Language (DML)
Provides basic data manipulation operations ondata 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 thanhow it is to be retrieved.
Fourth Generation Languages (4GLs)