Database and Database Users. Outline Database Introduction An Example Characteristics of the...

33
Database and Database Users

Transcript of Database and Database Users. Outline Database Introduction An Example Characteristics of the...

Page 1: Database and Database Users. Outline Database Introduction An Example Characteristics of the Database Actors on the Scene Advantages of using the DBMS.

Database and Database Users

Page 2: Database and Database Users. Outline Database Introduction An Example Characteristics of the Database Actors on the Scene Advantages of using the DBMS.

Outline

Database Introduction An Example Characteristics of the Database Actors on the Scene Advantages of using the DBMS

approach

Page 3: Database and Database Users. Outline Database Introduction An Example Characteristics of the Database Actors on the Scene Advantages of using the DBMS.

Database Examples Database is involved like everywhere in

our world

For example:If we go to bank to deposit or withdraw Make hotel and airline reservationPurchase something on lineBuy groceries in supermarkets

Page 4: Database and Database Users. Outline Database Introduction An Example Characteristics of the Database Actors on the Scene Advantages of using the DBMS.

Database Applications These examples are what we called

traditional database applications

More Recent Applications: Youtube iTunes Geographic Information Systems (GIS) Data Warehouses Many other applications

Page 5: Database and Database Users. Outline Database Introduction An Example Characteristics of the Database Actors on the Scene Advantages of using the DBMS.

Database can be any size and complexityFor example:

A list of names and address IRS

(assume it has 100 million taxpayers and each taxpayer file 5 forms with 400 characters of information per form=800Gbyte)

Amazon.com (15 million people visit per day; about 100 people are responsible for database update)

Page 6: Database and Database Users. Outline Database Introduction An Example Characteristics of the Database Actors on the Scene Advantages of using the DBMS.

Database System Database:

A collection of related data. Data:

Known facts that can be recorded and have an implicit meaning.

Database Management System (DBMS):A software package/system to facilitate theDefine, Construct, Manipulate and Share functions

of a computerized database.

Page 7: Database and Database Users. Outline Database Introduction An Example Characteristics of the Database Actors on the Scene Advantages of using the DBMS.

Typical DBMS Functionality Define a particular database in terms of its data types,

structures, and constraints

Construct or Load the initial database contents on a secondary storage medium

Manipulate the database: Retrieval: Querying, generating reports Modification: Insertions, deletions and updates to its

content Accessing the database through Web applications

Share a database allows multiple users and programs to access the database simultaneously

Page 8: Database and Database Users. Outline Database Introduction An Example Characteristics of the Database Actors on the Scene Advantages of using the DBMS.

Database System

Database System:DBMS + Database

Page 9: Database and Database Users. Outline Database Introduction An Example Characteristics of the Database Actors on the Scene Advantages of using the DBMS.

Simplified database system environment

Page 10: Database and Database Users. Outline Database Introduction An Example Characteristics of the Database Actors on the Scene Advantages of using the DBMS.

Outline

Database Introduction An Example Characteristics of the Database Actors on the Scene Advantages of using the DBMS

approach

Page 11: Database and Database Users. Outline Database Introduction An Example Characteristics of the Database Actors on the Scene Advantages of using the DBMS.

An UNIVERSITY example A UNIVERSITY database for maintaining

information concerning students, courses, and grades in a university environment

We have:STUDENT file stores data on each studentCOURSE file stores data on each courseSECTION file stores data on each section of

each courseGRADE_REPORT file stores the grades that

students receive PREREQUISITE file stores the prerequisites

Page 12: Database and Database Users. Outline Database Introduction An Example Characteristics of the Database Actors on the Scene Advantages of using the DBMS.

Example of a simple database

Page 13: Database and Database Users. Outline Database Introduction An Example Characteristics of the Database Actors on the Scene Advantages of using the DBMS.

Database manipulation Database manipulation involves querying

and updating

Examples of querying are:Retrieve a transcriptList the prerequisites of the “Database”

course

Examples of updating are:Enter a grade of “A” for “Smith” in

“Database” course

Page 14: Database and Database Users. Outline Database Introduction An Example Characteristics of the Database Actors on the Scene Advantages of using the DBMS.

Outline

Database Introduction An Example Characteristics of the Database Actors on the Scene Advantages of using the DBMS

approach

Page 15: Database and Database Users. Outline Database Introduction An Example Characteristics of the Database Actors on the Scene Advantages of using the DBMS.

Database V.S. File In the database approach, a single repository

of data is maintained that is defined once then accessed by various users

The major differences between DB and File are:

1. Self-describing of a DB2. Insulation between programs and data3. Support of multiple views of the data4. Sharing of data and multiuser transaction

processing

Page 16: Database and Database Users. Outline Database Introduction An Example Characteristics of the Database Actors on the Scene Advantages of using the DBMS.

Flat Files

Data is stored as records in regular files Records usually have a simple structure and

fixed number of fields For fast access may support indexing of fields

in the records No mechanisms for relating data between

files One needs special programs in order to

access and manipulate the data

Page 17: Database and Database Users. Outline Database Introduction An Example Characteristics of the Database Actors on the Scene Advantages of using the DBMS.

DBMS Must write special programs to answer each

question a user may want to ask about data Must protect data from inconsistent changes

made by different users accessing data concurrently

Must cope with system crashes to ensure data consistency

Need to enforce security policies in which different users have permission to access different subsets of the data

Page 18: Database and Database Users. Outline Database Introduction An Example Characteristics of the Database Actors on the Scene Advantages of using the DBMS.

18

RDBMS Market Shares

In 2006, www.gartner.com

Oracle: 47% market share, $7.2BN in sales

IBM: 21% market share with $3.2BN in sales

Microsoft: 17% market with $2.6BN in sales

Page 19: Database and Database Users. Outline Database Introduction An Example Characteristics of the Database Actors on the Scene Advantages of using the DBMS.

Self-describing nature of a database system Database system contains not only the

database itself but also a complete definition of the database structure and constrains

The information stored in the catalog is called Meta-data (data about data), and it describes the structure of the primary database.

Page 20: Database and Database Users. Outline Database Introduction An Example Characteristics of the Database Actors on the Scene Advantages of using the DBMS.

Example of a simplified Meta-data

Page 21: Database and Database Users. Outline Database Introduction An Example Characteristics of the Database Actors on the Scene Advantages of using the DBMS.

Insulation between programs and data In file processing, if any changes to the

structure of a file may require changing all programs that access the file

In database system, the structure of data files is stored in the DBMS catalog separately from the access program

This is called program-data independence

Page 22: Database and Database Users. Outline Database Introduction An Example Characteristics of the Database Actors on the Scene Advantages of using the DBMS.

Support of multiple views of the data

Each user may see a different view of the database, which describes only the data of interest to that user

It may also contain some virtual data that is derived from the database files but its not explicitly stored

Page 23: Database and Database Users. Outline Database Introduction An Example Characteristics of the Database Actors on the Scene Advantages of using the DBMS.

Sharing of data and multi-user transaction processing Allowing a set of concurrent users to

retrieve from and to update the database.

Concurrency control within the DBMS guarantees that each transaction is correctly executed or aborted For example, when several reservation clerks

try to assign a seat on an airplane flight (these types of applications are generally called

online transaction processing (OLTP))

Page 24: Database and Database Users. Outline Database Introduction An Example Characteristics of the Database Actors on the Scene Advantages of using the DBMS.

Outline

Database Introduction An Example Characteristics of the Database Actors on the Scene Advantages of using the DBMS

approach

Page 25: Database and Database Users. Outline Database Introduction An Example Characteristics of the Database Actors on the Scene Advantages of using the DBMS.

Database Users Database administrators:

Responsible for authorizing access to the database, for coordinating and monitoring its use, acquiring software and hardware resources, controlling its use and monitoring efficiency of operations.

Database Designers: Responsible to define the content, the structure, the

constraints, and functions or transactions against the database. They must communicate with the end-users and understand their needs.

End Users System Analysts

Page 26: Database and Database Users. Outline Database Introduction An Example Characteristics of the Database Actors on the Scene Advantages of using the DBMS.

End Users Casual: access database occasionally by

sophisticated query language when needed. (Manager) Naïve: they make up a large section of the end-

user population. Learn only a few facilities that they may use repeatedly

(bank clerk) Sophisticated: These include business

analysts, scientists, engineers, others thoroughly familiar with the system capabilities.

Stand-alone: maintain personal database by using well designed GUI

Page 27: Database and Database Users. Outline Database Introduction An Example Characteristics of the Database Actors on the Scene Advantages of using the DBMS.

Outline

Database Introduction An Example Characteristics of the Database Actors on the Scene Advantages of using the DBMS

approach

Page 28: Database and Database Users. Outline Database Introduction An Example Characteristics of the Database Actors on the Scene Advantages of using the DBMS.

Controlling Redundancy Controlling Redundancy is one of most

important feature to use DBMS

The traditional file approach, each group independently keeps their own file. For example: accounting office keeps data on

registration and billing info; whereas the registration office keeps track of registration, student courses and grades.

Page 29: Database and Database Users. Outline Database Introduction An Example Characteristics of the Database Actors on the Scene Advantages of using the DBMS.

Controlling Redundancy This redundancy in storing the same

data multiple times leads to several problems:

1. Logic update – we need to update several times

2. Storage space is wasted3. The file that represent the same data

may become inconsistent

Page 30: Database and Database Users. Outline Database Introduction An Example Characteristics of the Database Actors on the Scene Advantages of using the DBMS.

Other Advantages of using the DBMS approach

Restricting unauthorized access to data

Providing Storage Structures (e.g. indexes) for efficient Query Processing

Providing backup and recovery services

Page 31: Database and Database Users. Outline Database Introduction An Example Characteristics of the Database Actors on the Scene Advantages of using the DBMS.

Other Advantages of using the DBMS approach Providing multiple interfaces to different

classes of users

Representing complex relationships among data

.

.

.

Page 32: Database and Database Users. Outline Database Introduction An Example Characteristics of the Database Actors on the Scene Advantages of using the DBMS.

When NOT to use DBMS?

The overhead cost of using DBMS: High initial investment in hardware,

software and training The cost of defining and processing

data Overhead for security, concurrency

control, recovery, and integrity functions

Page 33: Database and Database Users. Outline Database Introduction An Example Characteristics of the Database Actors on the Scene Advantages of using the DBMS.

When NOT to use DBMS? Hence, it may be more desirable to use

regular files under the following situations: Simple, well-defined database applications

that are not expected to change Real-time requirements for some programs

that may not be met due to DBMS overheads

No multiple-user access to data