Sunteți pe pagina 1din 15

Introduction to Databases

1 PA S C A S A R J A N A STMIK NUSA MANDIRI

Dr. Said Mirza Pahlevi, M.Eng.

Pascasarjana STMIK Nusa Mandiri

Lecture 1
2 I N T R O D U C T I O N T O D ATA B A S E S

Dr. Said Mirza Pahlevi, M.Eng.

Pascasarjana STMIK Nusa Mandiri

Objectives
3

Some brief definitions and common uses of database systems. Characteristics and problems of file-based systems. Meaning of the term database and Database Management System

(DBMS).

Components of DBMS Environment Roles in the Database Environment Advantages and disadvantages of DBMSs

Dr. Said Mirza Pahlevi, M.Eng.

Pascasarjana STMIK Nusa Mandiri

Some Definitions
4

Database

A collection of related data.

Database Management System (DBMS)

A software that manages and control accesses to the database.

Database Application

A program that interacts with the database at some point in its execution.

Database System

A collection of application programs that interact with the database.

Dr. Said Mirza Pahlevi, M.Eng.

Pascasarjana STMIK Nusa Mandiri

Examples of Database Applications


5

Purchases from the supermarket

Bar code reader app prog DB (update stock number)

Purchases using your credit card

Card reader app prog customer DB & stolen DB

Booking a holiday at the travel agents

Ensure not to overbook the seat

Using the local library

Bar code reader app prog book DB (borrow & return)

Dr. Said Mirza Pahlevi, M.Eng.

Pascasarjana STMIK Nusa Mandiri

Examples of Database Applications


6

Taking out insurance A broker accesses several insurance company databases Using the Internet Bookstore to buy books and purchase by using a credit card (both uses DB) Studying at university Student database

Dr. Said Mirza Pahlevi, M.Eng.

Pascasarjana STMIK Nusa Mandiri

File-Based Systems
7

Collection of application programs that perform services

for the end users (e.g. reports).


Each program defines and manages its own data.

Dr. Said Mirza Pahlevi, M.Eng.

Pascasarjana STMIK Nusa Mandiri

File-Based Systems
8

Dr. Said Mirza Pahlevi, M.Eng.

Pascasarjana STMIK Nusa Mandiri

Limitations of File-Based Approach


9

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. It costs time & money to enter data more than once. Loss of data integrity.
Dr. Said Mirza Pahlevi, M.Eng. Pascasarjana STMIK Nusa Mandiri

Limitations of File-Based Approach


10

Program Data dependence


File structure is defined in the program code. It is difficult to change the file structure. Need to change both the file and accessing programs. e.g., change PropertyForRent address field from 40 to 41. Creating one-off program & modify all accessing programs

Incompatible file formats

Programs are written in different languages (e.g., COBOL & C), and so cannot easily access each others files.

Fixed Queries of application programs


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

Dr. Said Mirza Pahlevi, M.Eng.

Pascasarjana STMIK Nusa Mandiri

Database Approach
11

The file-based approach limitations arose:

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).

Dr. Said Mirza Pahlevi, M.Eng.

Pascasarjana STMIK Nusa Mandiri

Database
12

Definition: shared collection of logically related data and a description of

this data, designed to meet the information needs of an organization.

Shared large repository of data with metadata (self-describing). This enables programdata independence.

Logically related data comprises entities, attributes, and relationships of an

organizations information.

Entities: branch and staff. Property: branchNo and staffNo. Relationship: a branch has staff.

Dr. Said Mirza Pahlevi, M.Eng.

Pascasarjana STMIK Nusa Mandiri

Database Management System (DBMS)


13

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.

Dr. Said Mirza Pahlevi, M.Eng.

Pascasarjana STMIK Nusa Mandiri

Database Management System (DBMS)


14

Figure 1.5

Dr. Said Mirza Pahlevi, M.Eng.

Pascasarjana STMIK Nusa Mandiri

DBMS Functionalities
15

Data Definition Language (DDL).

Permits specification of data types, structures and any data constraints. All specifications are stored in the database.

Data Manipulation Language (DML).

General enquiry facility (query language) of the data.

Dr. Said Mirza Pahlevi, M.Eng.

Pascasarjana STMIK Nusa Mandiri

DBMS Functionalities
16

Controlled access to database may include:

A security system An integrity system

A concurrency control system


A recovery control system A user-accessible catalog.
Pascasarjana STMIK Nusa Mandiri

Dr. Said Mirza Pahlevi, M.Eng.

Views
17

Allows each user to have his or her own view of the

database.

e.g., contract department wants to see for a rental property shown in Figure 1.5

A view is essentially some subset of the database.

Dr. Said Mirza Pahlevi, M.Eng.

Pascasarjana STMIK Nusa Mandiri

Views - Benefits
18

Reduce complexity.

A view based on necessities.

Provide a level of security.

Excluding data that some users should not see.

Provide a mechanism to customize the appearance of the database.

Call field rent as Monthly Rent.

Present a consistent, unchanging picture of the structure of the database,

even if the underlying database is changed.

Field added or removed, relationships changed, renamed etc.


Pascasarjana STMIK Nusa Mandiri

Dr. Said Mirza Pahlevi, M.Eng.

Components of DBMS Environment


19

Dr. Said Mirza Pahlevi, M.Eng.

Pascasarjana STMIK Nusa Mandiri

Components of DBMS Environment


20

Hardware

Can range from a PC to a network of computers. Client-server architecture (backend & frontend).

Software

DBMS, operating system, network software (if necessary) and also the application programs (3GL such as Java, VB etc. & 4GL such as SQL embedded in 3GL).
Pascasarjana STMIK Nusa Mandiri

Dr. Said Mirza Pahlevi, M.Eng.

Components of DBMS Environment


21

Data

Operational data used by the organization and a description of this data called the schema.

Procedures

Instructions and rules that should be applied to the design and use of the database and DBMS. Log in, start/stop DBMS, backup etc.

People
Dr. Said Mirza Pahlevi, M.Eng.

Pascasarjana STMIK Nusa Mandiri

Roles in the Database Environment


22

Data Administrator (DA)

Manage the data resource (DB planning, conceptual/logical DB design etc.)

Database Administrator (DBA)

Physical realization of DB (physical DB design & implementation, security and integrity control etc.)

Dr. Said Mirza Pahlevi, M.Eng.

Pascasarjana STMIK Nusa Mandiri

Roles in the Database Environment


23

Database Designers (Logical and Physical)

Conceptual/logical DB
Identifying

the data (entities & attributes), and their relationships & constraints Understand the data and business rules (main characteristics of the data as viewed by the organization)

Physical DB design
Deciding

how the logical DB design is to be physically realized e.g., mapping logical DB design into a set of tables and integrity constraints
Dr. Said Mirza Pahlevi, M.Eng. Pascasarjana STMIK Nusa Mandiri

Roles in the Database Environment


24

Application Programmers

Creating program to access the DB (retrieve, insert, update & delete data)

End Users

Nave: unaware of the DBMS Sophisticated: familiar with the structure of the database and the provided database facilities

Dr. Said Mirza Pahlevi, M.Eng.

Pascasarjana STMIK Nusa Mandiri

Advantages of DBMSs
25

Control of data redundancy

Can be duplicated for performance reason

Data consistency

Store data in one place

More information from the same amount of data

Data integration

Sharing of data

The database belongs to the entire organization; not to departments

Dr. Said Mirza Pahlevi, M.Eng.

Pascasarjana STMIK Nusa Mandiri

Advantages of DBMSs
26

Improved data integrity (constraints) Validity and consistency of stored data Improved security Usernames and passwords for authorization Access by operation types: retrieval, insert, update & delete Enforcement of standards Data formats, naming conventions, document standards, update procedures and access rules Economy of scale Combining operational data into one database and managing them can result in cost savings
Dr. Said Mirza Pahlevi, M.Eng.

Pascasarjana STMIK Nusa Mandiri

Advantages of DBMSs
27

Balance conflicting requirements

The database is under control of a DBA that can make best decisions base on user needs

Improved data accessibility and responsiveness

The integrated data is directly accessible to the end users by using program, query language and report writers

Increased productivity

DBMS provides all the low level file-handling routines (typical in application programs) Also provides 4th generation environment

Dr. Said Mirza Pahlevi, M.Eng.

Pascasarjana STMIK Nusa Mandiri

Advantages of DBMSs
28

Improved maintenance through data independence DBMS separates data descriptions from the applications Increased concurrency DBMS manages concurrent database access Improved backup and recovery services Minimize the amount of processing that is lost following a failure

Dr. Said Mirza Pahlevi, M.Eng.

Pascasarjana STMIK Nusa Mandiri

Disadvantages of DBMSs
29

Complexity

Database design, access policy etc.

Size

A large piece of software requiring substantial memory to run

Cost of DBMS

Depends on the user number, maintenance cost etc.

Additional hardware costs

Disk storage, dedicated machines for DBMS servers etc.

Dr. Said Mirza Pahlevi, M.Eng.

Pascasarjana STMIK Nusa Mandiri

Disadvantages of DBMSs
30

Cost of conversion

Converting existing apps to run on new DBMS & hardware Staff training

Performance

DBMS is developed for general application compared to a file-based system

Higher impact of a failure

Centralization of resource increases the vulnerability of the system.


Pascasarjana STMIK Nusa Mandiri

Dr. Said Mirza Pahlevi, M.Eng.

S-ar putea să vă placă și