2002.08.29 - slide 1is 257 - fall 2002 database life cycle and introduction to access university of...

40
IS 257 - Fall 2002 2002.08.29 - SLIDE 1 Database Life Cycle and Introduction to Access University of California, Berkeley School of Information Management and Systems SIMS 257: Database Management

Post on 20-Dec-2015

216 views

Category:

Documents


0 download

TRANSCRIPT

IS 257 - Fall 2002 2002.08.29 - SLIDE 1

Database Life Cycle and Introduction to Access

University of California, Berkeley

School of Information Management and Systems

SIMS 257: Database Management

IS 257 - Fall 2002 2002.08.29 - SLIDE 2

Lecture Outline

• Review

• Database Life Cycle

• Access and the Diveshop Database

IS 257 - Fall 2002 2002.08.29 - SLIDE 3

Lecture Outline

• Review

• Database Life Cycle

• Access and the Diveshop Database

IS 257 - Fall 2002 2002.08.29 - SLIDE 4

Database Environment

CASE Tools

DBMS

UserInterface

ApplicationPrograms

Repository Database

IS 257 - Fall 2002 2002.08.29 - SLIDE 5

Database Components

DBMS===============

Design toolsTable CreationForm CreationQuery CreationReport Creation

Procedural language

compiler (4GL)=============

Run timeForm processorQuery processor

Report WriterLanguage Run time

UserInterface

Applications

ApplicationProgramsDatabase

Database contains:User’s DataMetadataIndexesApplication Metadata

IS 257 - Fall 2002 2002.08.29 - SLIDE 6

Terms and Concepts

• Database• DBMS• Enterprise• Entity• Attributes• Data values• Records• File• Key• Primary Key

IS 257 - Fall 2002 2002.08.29 - SLIDE 7

Terms and Concepts

• Data Dictionary

• Data Administration

• Database Administration

• Data Steward

• DA

• DBA

IS 257 - Fall 2002 2002.08.29 - SLIDE 8

Terms and Concepts

• Data Independence• Models

– (1) Levels or views of the Database• Conceptual, logical, physical

– (2) DBMS types• Relational, Hierarchic, Network, Object-

Oriented, Object-Relational

• Metadata

IS 257 - Fall 2002 2002.08.29 - SLIDE 9

Models (1)

ConceptualModel

LogicalModel

External Model

Conceptual requirements

Conceptual requirements

Conceptual requirements

Conceptual requirements

Application 1

Application 1

Application 2 Application 3 Application 4

Application 2

Application 3

Application 4

External Model

External Model

External Model

Internal Model

IS 257 - Fall 2002 2002.08.29 - SLIDE 10

Data Models(2): History

• Hierarchical Model (1960’s and 1970’s)– Similar to data structures in programming

languages.

Books(id, title)

Publisher SubjectsAuthors

(first, last)

IS 257 - Fall 2002 2002.08.29 - SLIDE 11

Data Models(2): History

• Network Model (1970’s)– Provides for single entries of data and

navigational “links” through chains of data.

Subjects Books

Authors

Publishers

IS 257 - Fall 2002 2002.08.29 - SLIDE 12

Data Models(2): History

• Relational Model (1980’s)– Provides a conceptually simple model for data

as relations (typically considered “tables”) with all data visible.

Book ID Title pubid Author id1 Introductio 2 12 The history 4 23 New stuff ab 3 34 Another title 2 45 And yet more 1 5

pubid pubname1 Harper2 Addison3 Oxford4 Que

Authorid Author name1 Smith2 Wynar3 Jones4 Duncan5 Applegate

Subid Subject1 cataloging2 history3 stuff

Book ID Subid1 22 13 34 24 3

IS 257 - Fall 2002 2002.08.29 - SLIDE 13

Data Models(2): History

• Object Oriented Data Model (1990’s)– Encapsulates data and operations as

“Objects”

Books(id, title)

Publisher SubjectsAuthors

(first, last)

IS 257 - Fall 2002 2002.08.29 - SLIDE 14

Data Models(2): History

• Object-Relational Model (1990’s)– Combines the well-known properties of the

Relational Model with such OO features as:• User-defined datatypes• User-defined functions• Inheritance and sub-classing

IS 257 - Fall 2002 2002.08.29 - SLIDE 15

Lecture Outline

• Review

• Database Life Cycle

• Access and the Diveshop Database

IS 257 - Fall 2002 2002.08.29 - SLIDE 16

Database System Life Cycle

Growth,Change, &

Maintenance6

Operations5

Integration4

Design1

Conversion3

PhysicalCreation

2

IS 257 - Fall 2002 2002.08.29 - SLIDE 17

Design

• Determination of the needs of the organization

• Development of the Conceptual Model of the database– Typically using Entity-Relationship

diagramming techniques

• Construction of a Data Dictionary• Development of the Logical Model

IS 257 - Fall 2002 2002.08.29 - SLIDE 18

Physical Creation

• Development of the Physical Model of the Database– data formats and types– determination of indexes, etc.

• Load a prototype database and test• Determine and implement security,

privacy and access controls• Determine and implement integrity

constraints

IS 257 - Fall 2002 2002.08.29 - SLIDE 19

Conversion

• Convert existing data sets and applications to use the new database– May need programs, conversion utilities to

convert old data to new formats.

IS 257 - Fall 2002 2002.08.29 - SLIDE 20

Integration

• Overlaps with Phase 3

• Integration of converted applications and new applications into the new database

IS 257 - Fall 2002 2002.08.29 - SLIDE 21

Operations

• All applications run full-scale

• Privacy, security, access control must be in place.

• Recovery and Backup procedures must be established and used

IS 257 - Fall 2002 2002.08.29 - SLIDE 22

Growth, Change & Maintenance

• Change is a way of life– Applications, data requirements, reports, etc.

will all change as new needs and requirements are found

– The Database and applications and will need to be modified to meet the needs of changes

IS 257 - Fall 2002 2002.08.29 - SLIDE 23

The “Cascade” View

Project Identifcation and Selection

ProjectInitiation

and Planning

Analysis

Logical Design

PhysicalDesign

Implementation

MaintenanceSee Hoffer, p. 42

IS 257 - Fall 2002 2002.08.29 - SLIDE 24

Another View of the Life Cycle

Operations5

Conversion3

PhysicalCreation

2Growth, Change

6

Integration4

Design1

IS 257 - Fall 2002 2002.08.29 - SLIDE 25

Lecture Outline

• Review

• Database Life Cycle

• Access and the Diveshop Database

IS 257 - Fall 2002 2002.08.29 - SLIDE 26

Test Database

• The DiveShop database contains information for the business operations of a skin & scuba diving shop that:– Organizes trips to particular locations

(destinations) with various dive sites– Dive sites have various features including

• types of marine life found there• other features (like shipwrecks)

– Rents/Sells equipment to dive customers for particular trips.

IS 257 - Fall 2002 2002.08.29 - SLIDE 27

ER Diagrams

• Entity-Relationship Diagrams are one of the main tools for database design

• We will examine ER diagrams in greater detail later

• ER Diagrams show Entities (rectangles) and their attributes (ovals) and the relationships between entities (diamonds)

IS 257 - Fall 2002 2002.08.29 - SLIDE 28

Diveshop Entities: SITES

Destinationno

Site no

Site Name

SiteNotes

SiteHighlight

DistanceFrom Town (M)

DistanceFrom Town (Km)

Skill Level

Visibility(ft)

Depth (m)

Depth (ft)Sites

Visibility (m)

Current

IS 257 - Fall 2002 2002.08.29 - SLIDE 29

Diveshop Entities: DIVECUST

Name

Customer no

Street

State/ProvCityZIP/Postal

Code

Country

First Contact

PhoneDiveCust

IS 257 - Fall 2002 2002.08.29 - SLIDE 30

Diveshop Entities: DEST

Destinationname

Destination no

Avg Temp (F)

SpringTemp (F) Avg

Temp (C)Summer

Temp (C)

SummerTemp (F)

TravelCost

WinterTemp (C)

FallTemp (F)

FallTemp (C)Dest

WinterTemp (F)

Accommodations

Body ofWater

NightLife

SpringTemp (C)

IS 257 - Fall 2002 2002.08.29 - SLIDE 31

Diveshop Entities: BIOLIFE

Category

Species no

CommonName

Length(cm)

SpeciesName

Length(in)

Notesexternal

GraphicexternalBioLife

IS 257 - Fall 2002 2002.08.29 - SLIDE 32

Diveshop Entities: SHIPWRCK

Site no

Ship Name

Category

InterestType Tonnage

Length (ft)

Beam(m)

Beam(ft)

Length(m)Shipwrck

Cause

Commentsexternal

DateSunk

Passengers/Crew

Graphicexternal

Survivors

Condition

IS 257 - Fall 2002 2002.08.29 - SLIDE 33

Diveshop Entities: DIVESTOK

Description

Item No

EquipmentClass

ReorderPoint

On Hand Cost

SalePrice

DiveStok RentalPrice

IS 257 - Fall 2002 2002.08.29 - SLIDE 34

Diveshop Entities: DIVEORDS

CustomerNo

Order no

SaleDate

ShipVia

DestinationCCExpDate

CCNumber

PaymentMethodDiveOrds

No ofPeople

VacationCost

ReturnDate

DepartDate

IS 257 - Fall 2002 2002.08.29 - SLIDE 35

Diveshop Entities: DIVEITEM

Item no

Order no

Rental/Sale

Qty

Line Note

DiveItem

IS 257 - Fall 2002 2002.08.29 - SLIDE 36

Diveshop Entities: BIOSITE

SpeciesNo

SiteNo

BioSite

IS 257 - Fall 2002 2002.08.29 - SLIDE 37

Diveshop Entities: SHIPVIA

Ship Via

ShipCost

ShipVia

IS 257 - Fall 2002 2002.08.29 - SLIDE 38

DiveShop ER DiagramCustomer

No

ShipVia

Dest

Sites

BioSite

ShipVia

ShipWrck

BioLife DiveStok

DiveItem

DiveOrds

DiveCust

CustomerNo

ShipVia

OrderNo

OrderNo

ItemNo

ItemNo

DestinationName

Destination

SpeciesNo

Site No

Destinationno

Site No

Destinationno

SpeciesNo

Site No

1

1

1

1

1

1

1/n

1

1n

n

n

n

n

n

n

n

1

IS 257 - Fall 2002 2002.08.29 - SLIDE 39

Assignment 1 (also online)

• How many tons was the sunken ship Delaware?• What is customer Karen Ng’s address?• At what destinations and sites might you find a

Spotted Eagle Ray?• Where (what destination) is the site Palancar

Reef?• What sites might Lorraine Vega dive on her trip?• Keith Lucas wants to see a shipwreck on his trip.

Is he going to the right place?• What equipment is Richard Denning getting?• What is the cost of the equipment rental for Louis

Jazdzewski

IS 257 - Fall 2002 2002.08.29 - SLIDE 40

Assignment 1: cont.

• The Database is available on the course web site

• Download your own copy• For each of the questions create a query

in Access.• Create a document (Word, etc.) containing

– The query being answered– The results of your query cut and pasted from

Access

• Due Tuesday Sept. 10