Sunteți pe pagina 1din 47

Concepts of Database Management

Eighth Edition
Chapter 1
Introduction to Database Management

Objectives
Introduce TAL Distributors, the company that is
used as the basis for many of the examples
throughout the text
Introduce basic database terminology
Describe database management systems (DBMSs)
Explain the advantages and disadvantages of
database processing

2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as
permitted in a license distributed with a certain product or service or otherwise on a password-protected website for classroom .

Objectives (continued)
Introduce Colonial Adventure Tours, the company
that is used in a case that appears throughout the
text
Introduce Solmaris CondominiumGroup, the
company that is used in another case that appears
throughout the text

2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as
permitted in a license distributed with a certain product or service or otherwise on a password-protected website for classroom .

TAL Distributors Background


TAL Distributors
Wholesaler of wooden toys, games, puzzles
Uses spreadsheet software to maintain important
data
Recent growth has made spreadsheet approach
problematic

2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as
permitted in a license distributed with a certain product or service or otherwise on a password-protected website for classroom .

TAL Distributors Background (continued)

FIGURE 1-1: Sample orders spreadsheet


2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as
permitted in a license distributed with a certain product or service or otherwise on a password-protected website for classroom .

TAL Distributors Background (continued)


Problems using spreadsheet
Redundancy
Duplication of data or the storing of the same data in
more than one place

Difficulty accessing related data


Limited security
Size limitations

2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as
permitted in a license distributed with a certain product or service or otherwise on a password-protected website for classroom .

TAL Distributors Background (continued)


Information TAL Distributors needs to maintain
Sales Reps
Sales rep number, last name, first name, address,
total commission, commission rate

Customers
Customer number, name, address, current balance,
credit limit, number of customers sales rep

Items Inventory
Item number, description, number units on hand, item
category, storehouse number, unit price

2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as
permitted in a license distributed with a certain product or service or otherwise on a password-protected website for classroom .

TAL Distributors Background (continued)

FIGURE 1-2: Sample order


2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as
permitted in a license distributed with a certain product or service or otherwise on a password-protected website for classroom .

TAL Distributors Background (continued)


Items for each customers order
Order
Order number, order date, customer number

Order line
Order number, item number, number of units ordered,
quoted price

Overall order total


Not stored because it can be calculated

2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as
permitted in a license distributed with a certain product or service or otherwise on a password-protected website for classroom .

Database Background
Database
Structure that can store information about:
Different categories of information
Relationships between those categories of information

Entity
Person, place, object, event, or idea
Entities for TAL Distributors: sales reps, customers,
orders, and items

2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as
permitted in a license distributed with a certain product or service or otherwise on a password-protected website for classroom .

10

Database Background (continued)


Attribute
Characteristic or property of an entity
Example: Customer has name, street, city, etc.
May also be called a field or column

Relationship
Association between entities
One-to-many relationship
Each rep is associated with many customers
Each customer is associated with a single rep

2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as
permitted in a license distributed with a certain product or service or otherwise on a password-protected website for classroom .

11

Database Background (continued)

FIGURE 1-3: Entities and attributes


2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as
permitted in a license distributed with a certain product or service or otherwise on a password-protected website for classroom .

12

Database Background (continued)

FIGURE 1-4: One-to-many relationship


2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as
permitted in a license distributed with a certain product or service or otherwise on a password-protected website for classroom .

13

Database Background (continued)


Data file
File used to store data
Computer counterpart to ordinary paper file

Database
Structure that can store information about:
Multiple types of entities
Attributes of those entities
Relationships between the entities

2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as
permitted in a license distributed with a certain product or service or otherwise on a password-protected website for classroom .

14

Database Background (continued)

FIGURE 1-5: Sample data TAL Distributors


2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as
permitted in a license distributed with a certain product or service or otherwise on a password-protected website for classroom .

15

Database Background (continued)

FIGURE 1-5: Sample data for TAL Distributors (continued)


2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as
permitted in a license distributed with a certain product or service or otherwise on a password-protected website for classroom .

16

Database Background (continued)

FIGURE 1-5: Sample data for TAL Distributors (continued)


2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as
permitted in a license distributed with a certain product or service or otherwise on a password-protected website for classroom .

17

Database Background (continued)

FIGURE 1-6: Alternative Orders table structure


2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as
permitted in a license distributed with a certain product or service or otherwise on a password-protected website for classroom .

18

Database Background (continued)


Entity-relationship (E-R) diagram
Visual way to represent a database
Rectangles represent entities
Lines represent relationships between connected
entities

2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as
permitted in a license distributed with a certain product or service or otherwise on a password-protected website for classroom .

19

Database Background (continued)

FIGURE 1-7: E-R diagram for the TAL Distributors database


2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as
permitted in a license distributed with a certain product or service or otherwise on a password-protected website for classroom .

20

Database Management Systems


Database management system (DBMS)
Program, or collection of programs, through which
users interact with a database

Popular DBMSs: Access, Oracle, DB2, MySQL,


and SQL Server
TAL Distributors decides to use Access
Database design
Determining the structure of the required database

2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as
permitted in a license distributed with a certain product or service or otherwise on a password-protected website for classroom .

21

Database Management Systems


(continued)

FIGURE 1-8: Using a DBMS directly

FIGURE 1-9: Using a DBMS through another program


2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as
permitted in a license distributed with a certain product or service or otherwise on a password-protected website for classroom .

22

Database Management Systems


(continued)
Forms
Screen objects used to maintain, view, and print data
from a database
DBMS creates forms that TAL Distributors needs

Reports
DBMS creates reports for TAL Distributors based on
users answers about the desired content and
appearance of each report

2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as
permitted in a license distributed with a certain product or service or otherwise on a password-protected website for classroom .

23

Database Management Systems


(continued)

FIGURE 1-10: Item form


2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as
permitted in a license distributed with a certain product or service or otherwise on a password-protected website for classroom .

24

Database Management Systems


(continued)

FIGURE 1-11: Orders form


2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as
permitted in a license distributed with a certain product or service or otherwise on a password-protected website for classroom .

25

Database Management Systems


(continued)

FIGURE 1-12: Item report


2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as
permitted in a license distributed with a certain product or service or otherwise on a password-protected website for classroom .

26

Advantages of Database Processing


1. Getting more information from the same amount
of data
2. Sharing data
3. Balancing conflicting requirements
Database administrator or database
administration (DBA): person or group in charge
of the database

4. Controlling redundancy
5. Facilitating consistency
2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as
permitted in a license distributed with a certain product or service or otherwise on a password-protected website for classroom .

27

Advantages of Database Processing


(continued)
6. Improving integrity

Integrity constraint: a rule that data must follow in


the database

7. Expanding security

Security: prevention of unauthorized access

8. Increasing productivity
9. Providing data independence
Data independence: can change structure of a
database without changing the programs that
access the database
2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as
permitted in a license distributed with a certain product or service or otherwise on a password-protected website for classroom .

28

Disadvantages of Database
Processing
1.
2.
3.
4.

Larger file size


Increased complexity
Greater impact of failure
More difficult recovery

2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as
permitted in a license distributed with a certain product or service or otherwise on a password-protected website for classroom .

29

Introduction to Colonial Adventure Tours


Database Case
Colonial Adventure Tours
Small business
Organizes day-long guided trips of New England

Management decided to use database to gather


and store information on:

Guides
Trips
Customers
Reservations

2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as
permitted in a license distributed with a certain product or service or otherwise on a password-protected website for classroom .

30

Introduction to Colonial Adventure Tours


Database Case (continued)

FIGURE 1-15: Sample guide data for Colonial Adventure Tours


2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as
permitted in a license distributed with a certain product or service or otherwise on a password-protected website for classroom .

31

Introduction to Colonial Adventure Tours


Database Case (continued)

FIGURE 1-16: Sample trip data for Colonial Adventure Tours


2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as
permitted in a license distributed with a certain product or service or otherwise on a password-protected website for classroom .

32

Introduction to Colonial Adventure Tours


Database Case (continued)

FIGURE 1-17: Sample customer data for Colonial Adventure Tours


2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as
permitted in a license distributed with a certain product or service or otherwise on a password-protected website for classroom .

33

Introduction to Colonial Adventure Tours


Database Case (continued)

FIGURE 1-18: Sample reservation data for Colonial Adventure Tours


2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as
permitted in a license distributed with a certain product or service or otherwise on a password-protected website for classroom .

34

Introduction to Colonial Adventure Tours


Database Case (continued)

FIGURE 1-19: Table used to relate trips and guides


2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as
permitted in a license distributed with a certain product or service or otherwise on a password-protected website for classroom .

35

Introduction to Colonial Adventure Tours


Database Case (continued)

FIGURE 1-20: E-R diagram for the Colonial Adventure Tours database
2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as
permitted in a license distributed with a certain product or service or otherwise on a password-protected website for classroom .

36

Introduction to the Solmaris


Condominium Group Database Case
Solmaris Condominium Group manages
condominium complexes
Located in Florida
Two locations: Solmaris Ocean and Solmaris
Bayside
Maintains common areas and provides maintenance
services

Database used to store data

2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as
permitted in a license distributed with a certain product or service or otherwise on a password-protected website for classroom .

37

Introduction to the Solmaris


Condominium Group Database Case
(continued)

FIGURE 1-21: Sample location data for Solmaris Condominium Group

2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as
permitted in a license distributed with a certain product or service or otherwise on a password-protected website for classroom .

38

Introduction to the Solmaris


Condominium Group Database Case
(continued)

FIGURE 1-22: Sample owner data for Solmaris Condominium Group


2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as
permitted in a license distributed with a certain product or service or otherwise on a password-protected website for classroom .

39

Introduction to the Solmaris


Condominium Group Database Case
(continued)

FIGURE 1-23: Sample data about condo units for Solmaris Condominium Group
2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as
permitted in a license distributed with a certain product or service or otherwise on a password-protected website for classroom .

40

Introduction to the Solmaris


Condominium Group Database Case
(continued)

FIGURE 1-24: Sample data about service categories for Solmaris Condominium
Group
2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as
permitted in a license distributed with a certain product or service or otherwise on a password-protected website for classroom .

41

Introduction to the Solmaris


Condominium Group Database Case
(continued)

FIGURE 1-25: Sample data about service requests for Solmaris Condominium
Group
2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as
permitted in a license distributed with a certain product or service or otherwise on a password-protected website for classroom .

42

Introduction to the Solmaris


Condominium Group Database Case
(continued)

FIGURE 1-26: E-R diagram for the Solmaris Condominium Group database
2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as
permitted in a license distributed with a certain product or service or otherwise on a password-protected website for classroom .

43

Summary
Problems with nondatabase approaches to data
management: redundancy, difficulties accessing
related data, limited security features, limited data
sharing features, and potential size limitations
Entity: person, place, object, event, or idea for
which you want to store and process data
Attribute, field, or column: characteristic or property
of an entity
Relationship: an association between entities
2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as
permitted in a license distributed with a certain product or service or otherwise on a password-protected website for classroom .

44

Summary (continued)
One-to-many relationship: each occurrence of first
entity is related to many occurrences of the second
entity and each occurrence of the second entity is
related to only one occurrence of the first entity
Database: structure that can store information about
multiple types of entities, attributes of entities, and
relationships among entities
TAL Distributors requires information about reps,
customers, items, orders, and order lines
Entity-relationship (E-R) diagram: represents a
database visually by using various symbols
2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as
permitted in a license distributed with a certain product or service or otherwise on a password-protected website for classroom .

45

Summary (continued)
Database management system (DBMS): program
through which users interact with a database; lets
you create forms and reports quickly and easily
and obtain answers to questions about the data
Advantages of 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, and providing data independence
2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as
permitted in a license distributed with a certain product or service or otherwise on a password-protected website for classroom .

46

Summary (continued)
Disadvantages of database processing: larger file
size, increased complexity, greater impact of
failure, and more difficult recovery
Colonial Adventure Tours needs to store
information about: guides, trips, customers, and
reservations
Solmaris Condominium Group needs to store
information about: condo locations, owners, condo
units, service categories, and service requests

2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as
permitted in a license distributed with a certain product or service or otherwise on a password-protected website for classroom .

47

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