Intro to Database
Intro to Database
BS (SOFTWARE ENGINEERING)
PROGRAM
Almost identical:
A First Course in Database Systems, Jeff Ullman
and Jennifer Widom
Database Implementation, Hector Garcia-Molina,
Jeff Ullman and Jennifer Widom
OTHER BOOKS
DatabaseManagement Systems,
Ramakrishnan
very comprehensive
Fundamentals of Database Systems,
Elmasri, Navathe
very widely used
Foundations of Databases, Abiteboul, Hull,
Vianu
Mostly theory of databases
COURSE ASSESSMENTS
Final Exam = 50
Midterm Exam = 30
Quiz = 10
Assignment = 10
Tutorials and Class based Work (For Improved
Grade)
WHAT YOU NEED TO DO
Attend the lectures! (ALSs)
Ask any question you like during the
project
Pass this course with a good grade!
LESSON 1
DATABASE ENVIRONMENT
LESSON OBJECTIVES
Understand and define basic terminologies associated with
database approach;
Know the disadvantages of file processing / manual system
Is to transform
DATABASE
A database is a share
FILES
collection of logically
related data, designed
record 1
to
record 2
record 3
record 4
DATA meet the information
:::::::
needs of multiple users
in an organization.
EXAMPLES OF DATABASE
APPLICATIONS
Purchases from the supermarket (http://www.tesco.com/)
Purchases using your credit card (http://www.amazon.com)
Booking a holiday at the travel agents
(http://www.expedia.com)
Buying ticket (http://www.airasia.com)
Using the local library (http://www.psz.utm.my)
Property management (http://www.rightmove.co.uk)
Banking transaction (http://www.maybank2u.com.my)
TYPES OF DATABASES
Single-user:
Supports only one user at a time
Desktop:
Single-user database running on a personal computer
Multi-user:
Supports multiple users at the same time
BCO
MP1
203
TYPES OF DATABASES
Workgroup:
15
Multi-user database that supports a small group of
DATABASE SYSTEMS
users or a single department
Enterprise:
Multi-user database that supports a large group of
users or an entire organization
BCO
MP1
203
TYPES OF DATABASES (CONTINUED)
16
Centralized:
DATABASE SYSTEMS
Supports data located at a single site
Distributed:
Supports data distributed across several sites
BCO
MP1
203
TYPES OF DATABASES (CONTINUED)
17
Transactional (or production):
DATABASE SYSTEMS
Supports a company’s day-to-day operations
Data warehouse:
Stores data used to generate information required to
make tactical or strategic decisions
Often used to store historical data
Structure is quite different
BCO
MP1
203
WHY DATABASE DESIGN IS
IMPORTANT
Defines the database’s expected use
18
Different approach needed for different types of
DATABASE SYSTEMS
databases
Avoid redundant data
Poorly designed database generates errors leads
to bad decisions can lead to failure of
organization
BCO
MP1
203
BASIC DATABASE CONCEPTS
Table Name: Kiki Lala
– A set of related records College: KIGS
Tel: 2238701
Record
– A collection of data Name: Kiki Lala
College: KIGS
about an individual item Tel: 2238701
Field
Name: Kiki Lala
– A single item of data
common to all records
AN EXAMPLE OF A TABLE
Fields
Records
Student ID FirstName LastName Course
44-0986 Edmond Kevinsean HNDC
12-2365 Cyril Minjohn HNDBM
11-1234 Cynthia Dominic PNDCS
PRIMARY KEYS & FOREIGN
KEYS
Student ID FirstName LastName Course
44-0986 Edmond Kevinsean HNDC
12-2365 Cyril Minjohn HNDBM
11-1234 Cynthia Dominic PNDCS
That is, once relationships are created, tables can “talk”
to each other. We can link (relate) the tables to find:
Which students taking what courses?
Which students are in which subjects?
Which subjects are under the programme?
Relationships
DATABASE OPTIONS
and manipulation
XML, XML databases and messaging systems
QUERIES
A means of asking questions (querying) of your data
Can look across a number of Tables and other Queries
Homogeneous:
OS used at each location same or highly compatible.
The data models used at each location are the same.
The DBMS used at each location are the same or highly
compatible.
The data at the various locations have common
definitions and formats.
Heterogenous
Different computers, OS, data models, DBMS may be
possible
2 APPROACHES IN
KEEPING DATA
2. Database
FILE PROCESSING
APPROACH
A traditional approach to information
system design.
Focuses on the data processing
needs of individual departments in
the organization.
Example: KIGS office, Library
FILE PROCESSING
APPROACH
Disadvantages
Uncontrolled Redundancy
Inconsistent Data
Inflexibility
Redundancy Personnel
Consistency of Data Need for Explicit Backup
Development
Components of the Database Environment
User Application
interface programs
Not knowing
requirements
TWO APPROACHES TO DATABASE
DEVELOPMENT
SDLC
System Development Life Cycle
Detailed, well-planned development process
40
Time-consuming, but comprehensive
Long development cycle
Prototyping
Rapid application development (RAD)
Cursory attempt at conceptual data modeling.
Define database during development of initial
prototype
Repeat implementation and maintenance activities
with new prototype versions
SDLC
SYSTEMS DEVELOPMENT LIFE CYCLE
Project Identification
and Selection
Project Initiation
and Planning
Analysis
Logical Design
Physical Design
Implementation
Maintenance
SYSTEMS DEVELOPMENT LIFE CYCLE
(CONT.)
Project
Project Identification
Identification
and
and Selection
Selection Purpose --preliminary understanding
43
Deliverable –request for project
Project Initiation
and Planning
Analysis
Logical Design
Physical Design
Database activity –
Implementation
enterprise modeling
Maintenance
SYSTEMS DEVELOPMENT LIFE CYCLE
(CONT.)
Project Identification
and Selection Purpose – state business situation and solution
44
Deliverable – request for analysis
Project
Project Initiation
Initiation
and
and Planning
Planning
Analysis
Logical Design
Physical Design
Database activity –
Implementation
conceptual data modeling
Maintenance
SYSTEMS DEVELOPMENT LIFE CYCLE
(CONT.)
Project Identification
and Selection Purpose – thorough analysis
45
Project Initiation
Deliverable – functional system specifications
and Planning
Analysis
Analysis
Logical Design
Physical Design
Database activity –
Implementation
conceptual data modeling
Maintenance
SYSTEMS DEVELOPMENT LIFE CYCLE
(CONT.)
Project Identification
and Selection
Purpose – information requirements structure
Deliverable – detailed design specifications
46
Project Initiation
and Planning
Analysis
Logical
Logical Design
Design
Physical Design
Database activity –
Implementation
logical database design
Maintenance
SYSTEMS DEVELOPMENT LIFE CYCLE
(CONT.)
47
Project Initiation structures, technology purchases,
and Planning
organization redesigns
Analysis
Logical Design
Physical
Physical Design
Design
Database activity –
Implementation
physical database design
Maintenance
SYSTEMS DEVELOPMENT LIFE CYCLE
(CONT.)
48
Project Initiation Deliverable – operational programs,
and Planning documentation, training materials
Analysis
Logical Design
Physical Design
Database activity –
Implementation
Implementation
database implementation
Maintenance
SYSTEMS DEVELOPMENT LIFE CYCLE
(CONT.)
Project Identification
and Selection Purpose – monitor, repair, enhance
49
Deliverable – periodic audits
Project Initiation
and Planning
Analysis
Logical Design
Physical Design
Database activity –
Implementation
database maintenance
Maintenance
Maintenance
Prototyping
The prototyping methodology and database development process
51
The prototyping methodology and database development process
52
The prototyping methodology and database development process
53
The prototyping methodology and database development process
54
The prototyping methodology and database development process
55