chapter01

advertisement
Concepts of Database
Management, Fifth Edition
Chapter 1:
Introduction to Database
Management
Objectives
 Introduce
Premiere Products, the company that is
used as the basis for many of the examples
throughout the text
 Introduce
 Describe
basic database terminology
database management systems
 Explain
the advantages and disadvantages of
database processing
 Introduce
Henry Books, the company that is used
in the case that runs throughout the text
Concepts of Database Management, 5th Edition
2
Premiere Products
 Distributor
of appliances, housewares, and
sporting goods
 Uses
spreadsheet software to maintain
important data
 Recent
growth has made spreadsheet approach
problematic
Concepts of Database Management, 5th Edition
3
Figure 1.1: Sample Orders Spreadsheet
Concepts of Database Management, 5th Edition
4
Problems Using Spreadsheet
 Redundancy

Duplication of data or the storing of the same data
in more than one place

Occurs when the same information is stored in
more than one place
 Difficulty
 Limited
 Size
accessing data
security
limitations
Concepts of Database Management, 5th Edition
5
Premiere Products
Required Information
 Sales

Reps
Sales rep number, last name, first name, address,
total commission, commission rate
 Customers

Customer number, name, address, current
balance, credit limit, customer sales rep
 Parts

Inventory
Part number, description, number units on hand,
item class, warehouse number, unit price
Concepts of Database Management, 5th Edition
6
Figure 1.2: Premiere Products Sample Order
Concepts of Database Management, 5th Edition
7
Premiere Products Customer Order
 Order

Order number, order date, customer number
 Order

line
Order number, part number, number units ordered,
unit price
 Overall

order total
Not stored since it can be calculated
Concepts of Database Management, 5th Edition
8
Database Background
 Database

Structure that can store information about
 Multiple
types of entities
 Attributes
of those entities
 Relationships
among entities
 Entity

Person, place, thing, or event

Premiere Products has sales reps, customers,
orders, and parts
Concepts of Database Management, 5th Edition
9
Database Background (con’t)
 Attribute

Property of an entity

Customer has name, street, city, et cetera

May also be called a field or column
Concepts of Database Management, 5th Edition
10
Figure 1.3: Entities and Attributes
Concepts of Database Management, 5th Edition
11
Database Background (con’t.)
 Relationship

Association between entities

One-to-many relationship - rep is related to many
customers

Customer is related to a single rep
 Data
file

File used to store data

Computer counterpart to ordinary paper file
Concepts of Database Management, 5th Edition
12
Figure 1.4: One-to-Many Relationship
Concepts of Database Management, 5th Edition
13
Figure 1.5: Rep and Customer Tables
Concepts of Database Management, 5th Edition
14
Figure 1.5: Orders and OrderLine Tables (con’t.)
Concepts of Database Management, 5th Edition
15
Figure 1.5: Part Table (con’t.)
Concepts of Database Management, 5th Edition
16
Figure 1.6: Alternative Orders Table
Concepts of Database Management, 5th Edition
17
Entity-relationship Diagram
 Visual
way to represent a database

Rectangles represent entities

Lines represent relationships between
connected entities
Concepts of Database Management, 5th Edition
18
Figure 1.7: E-R Diagram
Concepts of Database Management, 5th Edition
19
Database Management Systems
 Program(s)
through which users interact with
database
 Popular
DBMSs include

Access

Oracle

DB2

SQL Server
 Premiere
Products decides to use Access
Concepts of Database Management, 5th Edition
20
Figure 1.8 and 1.9:
Using DBMSs in Different Ways
Concepts of Database Management, 5th Edition
21
Building a Database
 Database
design determines the structure of a
database
 Design
entered into DBMS during construction

Tables – stores data

Forms – screen objects used to maintain, view, and
print from a database

Reports – provides formatted output

Switchboards – a set of special forms used to
provide controlled access to the data, forms, report
and other objects in a database
Concepts of Database Management, 5th Edition
22
Figures 1.10 and 1.11:
Part and Order Forms
Concepts of Database Management, 5th Edition
23
Figure 1.12: Parts Report
Concepts of Database Management, 5th Edition
24
Figure 1.13: Main Switchboard
Concepts of Database Management, 5th Edition
25
Figure 1.14:
Main Data Switchboard
Concepts of Database Management, 5th Edition
26
Figure 1.15: Advantages of
Database Processing
Concepts of Database Management, 5th Edition
27
Figure 1.16:
Disadvantages of Database Processing
Concepts of Database Management, 5th Edition
28
Introduction to Henry Books
Database Case
 Book
store chain operated by Ray Henry
 Henry
decided to use database to gather and
store information on:

Branches

Publishers

Authors

Books
Concepts of Database Management, 5th Edition
29
Figure 1.17: Sample Branch Data
Concepts of Database Management, 5th Edition
30
Figure 1.17: Sample Publisher Data (con’t.)
Concepts of Database Management, 5th Edition
31
Figure 1.18: Sample Author Data
Concepts of Database Management, 5th Edition
32
Figure 1.19: Sample Book Data
Concepts of Database Management, 5th Edition
33
Figure 1.20: Wrote Table Relates Authors to Books
Concepts of Database Management, 5th Edition
34
Figure 1.20:
Inventory Table Relates Branches to Books (con’t.)
Concepts of Database Management, 5th Edition
35
Summary
 Nondatabase
approaches to management have
problems with replication, redundancy, sharing,
limited security, and size limitations
 Entity
- a person, place, object, event, or idea for
which you want to store and process data
 Attribute,
field, or column - a characteristic or
property of an entity
 Relationship
- an association between entities
Concepts of Database Management, 5th Edition
36
Summary
 One-to-many


relationship - exists when
Each occurrence of the first entity is related to many
occurrences of the second entity
Each occurrence of the second entity is related to
only one occurrence of the first entity
 Database
is a structure that can store information
about multiple types of entities
 An entity-relationship (E-R) diagram represents a
database pictorially
 Database management system (DBMS) - a
program, or a collection of programs, through
which users interact with a database
Concepts of Database Management, 5th Edition
37
Summary
 Advantages









to database processing:
Getting more information from the same amount of
data
Sharing data
Balancing conflicting requirements
Controlling redundancy
Facilitating consistency
Improving integrity
Expanding security
Increasing productivity
Providing data independence
Concepts of Database Management, 5th Edition
38
Summary
 Disadvantages
of database processing:

Larger file size

Increased complexity

Greater impact of failure

More difficult recovery
Concepts of Database Management, 5th Edition
39
Download