56
Course Introduction Ria Mae G. Corda ITB322 (Lecture) 2 nd Semeseter, AY 2009 - 2010

Course Introduction Ria Mae G. Corda ITB322 (Lecture) 2 nd Semeseter, AY 2009 - 2010

Embed Size (px)

Citation preview

Course Introduction

Ria Mae G. CordaITB322 (Lecture)

2nd Semeseter, AY 2009 - 2010

Outline

Introducing the database and related terms A REAL LIFE example The database approach The database actors

Outline

Behind the scene The DBMS advantage When NOT to use DBMS Summary

Introducing the database and related terms

Traditional Database Applications– Information is stored textually or numerically

Multimedia Database Applications– Images, audio clips and video streams can be

stored– Geographic information systems– Data warehouses– Online analytical processing (OLAP)– Real-time/Active database technology

Introducing the database and related terms

Database– Collection of related data

Data– Known facts– Can be recorded– Have implicit meaning

Introducing the database and related terms

Properties of a database– Represents some aspect of the real world– Logically coherent collection of data with inherent

meaning– Designed, built and populated for a specific

purpose

Introducing the database and related terms

A database may be maintained manually or it may be computerized– In this course we are only concerned about

computerized databases– A computerized database may be created an

manipulated using application programs or by a database management system

Introducing the database and related terms

Database Management System (DBMS)– A collection of programs that enables users to

create and maintain a database– A general-purpose software system that facilitates

the processes of defining, constructing, manipulating, and sharing databases among various users and applications

Introducing the database and related terms

Defining a database– Involves specifying the data type, structures,

and constraints of the data to be stored in the database.

– The database definition is also stored in the database

Meta-data is the database catalog or dictionary

Introducing the database and related terms

Constructing the database– The process of storing the data on some storage

medium controlled by the DBMS

Introducing the database and related terms

Manipulating a database– Includes querying the database for information

retrieval, updating the database to reflect changes in the real world, and generating reports from the data.

Introducing the database and related terms

Sharing a database– Allows multiple users and programs to access the

database simultaneously.

Introducing the database and related terms

Application program– Accesses the database by sending queries or

requests for data to the DBMS

Introducing the database and related terms

Query– Typically causes for some data to be retrieved.

Transaction– Causes some data to be read and some data to

be written into the database.

Introducing the database and related terms

Protection– System protection against hardware or software

malfunction,– Security protection against unauthorized or

malicious access.

Maintenance– Allowing the system to evolve as requirements

change over time

Introducing the database and related terms

It is not necessary to use general-purpose DBMS software to implement a computerized database.

Database system– The database and the DBMS software together

A REAL LIFE example

The SCENARIO– A UNIVERSITY database for maintaining

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

– Has five files: STUDENT, COURSE, SECTION, GRADE_REPORT, PREREQUISITE

A REAL LIFE example

Defining the database– We must define the data types of each data

element in each record

A REAL LIFE example

Constructing the database– We store the data regarding each student,

course, section, grade report, and prerequisite

A REAL LIFE example

Manipulating the database– Involves querying and updating– Example: retrieving the transcript, changing

sections, creating a new course, etc

A REAL LIFE example

Requirements definition and analysis– Identifying business rules and needs

Conceptual design– A model of the requirements to be able to

transform it into a database implementation

A REAL LIFE example

Logical design– Expression of the model in a DBMS software

implementation

Physical design– Specifications for physical storage and access of

the database

The database approach

File-processing system vs. database system

File Processing System Database System

Each user defines and implements the files needed for the application

A data repository is defined once then accessed by various users

Each application is free to name data elements independently

The names and labels of data are defined one

The database approach

Self-describing nature of a database system– The database system does not just contain the

database itself but even the database definition called meta-data

– Should work with any number of database applications as long as the database definition is available

The database approach

Insulation between programs and data, and data abstraction– DBMS access programs do not require changing

all programs that access the database when a structural change happens (program-data independence)

The database approach

Insulation between programs and data, and data abstraction– User application programs can operate on the

data by invoking operations regardless of how the operation is implemented (program-operation independence)

Operation is a function or method made up of– Interface which contains the name and parameters– Implementation which defines the operation

The database approach

Insulation between programs and data, and data abstraction– Data abstraction

Characteristic that allows program-data independence and program-operation independence

Data model is a type of data abstraction– Hides storage and implementation details that are not of

interest to most database users

The database approach

Support of multiple views of the data– Although there is a single repository of data, only

a subset of this data may be made available to a particular set of users

A view is virtual data derived from the database but not explicitly stored

The database approach

Sharing of data and multi-user transaction processing– Transaction

An executing program or process that includes one or more database accesses such as reading or updating the database

Needs to have concurrency control, isolation, and atomicity

The database approach

Sharing of data and multi-user transaction processing

– Concurrency control Ensures that several users trying to update the same data do

so in a controlled manner– Isolation

Ensures that each transaction appears to execute in isolation from other transactions

– Atomicity Ensures that either all the database operations in a transaction

are executed or none are.

The database actors

Database administrators (DBA)– A chief administrator to oversee and manage the

database, the DBMS, and other related software.– Responsible for:

authorizing access to the database coordinating and monitoring its use, and acquiring software and hardware resources as needed.

– Accountable for breach of security or poor system response time.

The database actors

Database designers– Responsible for

Identifying the data to be stored in the database Choosing appropriate structures to represent and store

data Communicating to prospective database users to

understand the requirements Creating a design that fits user requirements

– Final database design must be capable of supporting the requirements of ALL user groups

The database actors

End users– Casual end users

Occasionally access the database May need different information every time Use sophisticated query language to specify their

requests Typically management level

The database actors

End users– Naïve or parametric end users

Make up the sizeable portion of database end users Constantly querying and updating the database Use canned transaction

– Standard types of queries and updates Examples: bank tellers, reservation clerks, cashiers

The database actors

End users– Sophisticated end users

Engineers, scientists, business analysts– Thoroughly familiarize themselves with the DBMS facilities

to implement their applications

The database actors

End users– Standalone users

Maintain personal databases– Uses ready-made program packages that provide easy-to-

use menu-based or graphics-cased interfaces.

The database actors

End users

User Level of DBMS expertise

Casual Minimal

Naïve or parametric Minimal

Sophisticated Very high

Standalone Proficient in using a specific software package

The database actors

System analysts and application programmers– System analyst

Determine the requirements of end users Develop specifications for canned transactions that

meet these requirements

– Application programmer Implement the specifications as programs Also tests, debugs, documents and maintains

– Also known as software engineers/developers

Behind the scene

Other personnel are associated with the design, development, and operation of the DBMS software itself and the system environment surrounding it

They are instrumental in making the database system available to end users but do not use the database for their own purpose

Behind the scene

DBMS system designers and implementers– Design and implement the DBMS modules and

interfaces as a software package– Ensures that the DBMS can interface with

operating systems and programming language compilers

Behind the scene

Tool developers– Design and implement tools

Tools are software packages that facilitate database modeling and design, database system design, and improved performance.

– Often purchased separately

Behind the scene

Operators and maintenance personnel– System administration personnel– Responsible for the actual running and

maintenance of hardware and software environment for the database system

The DBMS Advantage

Controlling redundancy– Redundancy is storing the same data multiple

times which leads to Duplication of effort Waste of storage space Data inconsistency

– Should allow controlled redundancy in some cases

The DBMS Advantage

Restricting unauthorized access– A database system should have a security and

authorization subsystem– Only certain people can be given privilege to

access confidential data at different levels

The DBMS Advantage

Providing persistent storage for program objects– Persistency

Ability of data to survive even after the program is terminated to enable later access of other programs.

The DBMS Advantage

Providing storage structures for efficient query processing– Indexes

Data structures that allow efficient disk search

– Buffering module Provided by the DBMS to maintain parts of the database

in the main memory

– Query processing and optimization module Enables the choosing of an efficient query execution

plan based on existing storage structures

The DBMS Advantage

Providing backup and recovery– The DBMS should have a recovery facility to

Restore the database in a state before a system failure occurred

Resume the transaction from the point where it was interrupted

The DBMS Advantage

Providing multiple user interfaces– A DBMS should be able to provide:

Query languages for casual users Programming language interfaces for application

programmers Forms and command codes for parametric users Menu-driven interfaces and natural language interfaces

for standalone users

– Graphical user interface (GUI) can be forms-style or menu-style

The DBMS Advantage

Representing complex relationships among data– The DBMS must have the capability to

Represent complex relationships among the data Define new relationships as they arise Retrieve and update related data easily and efficiently

The DBMS Advantage

Enforcing integrity constraints– Integrity constraints

Rules that must hold for the data Example: data type, uniqueness of data

– Some constraints can be specified to the DBMS and automatically enforced

– Others can be checked by the update programs or the applications during data entry

The DBMS Advantage

Permitting inferencing and actions using rules– Deductive database systems

A DBMS which provides capabilities for defining deduction rules for inferencing new information from the stored database facts

– Triggers A form of a rule activated by updates to the table, which

results to operations on other tables, sending messages, etc.

The DBMS Advantage

Permitting inferencing and actions using rules– Stored procedures

Become a part of the overall database definition Invoked when conditions are met

– Active database systems Provide active rules that can automatically initiate

actions when certain events and conditions occur

The DBMS Advantage

Some added advantages– Potential for enforcing standards– Reduced application development time– Flexibility– Availability of up-to-date information– Economies of scale

When NOT to use DBMS

Database overhead costs– Initial investment in hardware, software, and

training– Generality for defining and processing data– Overhead for providing security, concurrency

control, recovery, and integrity functions

When NOT to use DBMS

Circumstances where DBMS is not ideal– Simple, well-defined database applications NOT

expected to change– Stringent, real-time requirements– No multiple-user access to data

When NOT to use DBMS

Industries which do not use general-purpose DBMS– Computer-aided design (CAD) tools– Communication and switching systems– Geographical information systems (GIS)