Date post: | 18-Jan-2018 |
Category: |
Documents |
Upload: | marjory-gray |
View: | 215 times |
Download: | 0 times |
8/31/99 Database Management -- Fall 1999 -- R. Larson
Database Models and Introduction to AccessUniversity of California, Berkeley
School of Information Management and Systems
SIMS 257: Database Management
8/31/99 Database Management -- Fall 1999 -- R. Larson
Last Time
• Database concepts and terminology• Database Life cycle
8/31/99 Database Management -- Fall 1999 -- R. Larson
Terms and Concepts• Database: • Enterprise• Entity• Attributes• Data values• Records• File• Key• Primary Key
8/31/99 Database Management -- Fall 1999 -- R. Larson
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
8/31/99 Database Management -- Fall 1999 -- R. Larson
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
8/31/99 Database Management -- Fall 1999 -- R. Larson
Terms and Concepts
• Data Dictionary• Data Administration• Database Administration• Data Steward• DA• DBA
8/31/99 Database Management -- Fall 1999 -- R. Larson
Database System Life Cycle
Growth,Change, &
Maintenance6
Operations5
Integration4
Design1
Conversion3
PhysicalCreation
2
8/31/99 Database Management -- Fall 1999 -- R. Larson
Today
• Models(2): DBMS types– Hierarchical– Network– Relational– Object-Oriented
8/31/99 Database Management -- Fall 1999 -- R. Larson
Database Data Models
• Hierarchical Model– Similar to data structures in programming
languages.Books
(id, title)
Publisher SubjectsAuthors(first, last)
8/31/99 Database Management -- Fall 1999 -- R. Larson
Database Data Models
• Network Model– Provides for single entries of data and
navigational “links” through chains of data.
Subjects Books
Authors
Publishers
8/31/99 Database Management -- Fall 1999 -- R. Larson
Database Data Models
• Relational Model– 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
8/31/99 Database Management -- Fall 1999 -- R. Larson
Database Data Models
• Object Oriented Data Model– Encapsulates data and operations as “Objects”
Books(id, title)
Publisher SubjectsAuthors(first, last)
8/31/99 Database Management -- Fall 1999 -- R. Larson
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 (or to other dive shops)
8/31/99 Database Management -- Fall 1999 -- R. Larson
ER Diagrams
• We will examine ER diagrams in greater detail later
• ER Diagrams show Entities (rectangles) and their attributes (ovals) and the relationships between entities (diamonds)
8/31/99 Database Management -- Fall 1999 -- R. Larson
Diveshop ER Entities
Destinationno
Site no
Site Name
SiteNotes
SiteHighlight
DistanceFrom Town (M)
DistanceFrom Town (Km)
Skill Level
Visibility(ft)
Depth (m)
Depth (ft)Sites
Visibility (m)
8/31/99 Database Management -- Fall 1999 -- R. Larson
Diveshop ER Entities
Name
Customer no
Street
State/ProvCity ZIP/PostalCode
Country
First Contact
PhoneDiveCust
8/31/99 Database Management -- Fall 1999 -- R. Larson
Diveshop ER Entities
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
8/31/99 Database Management -- Fall 1999 -- R. Larson
Diveshop ER Entities
Category
Species no
CommonName
Length(cm)
SpeciesName
Length(in)
Notesexternal
GraphicexternalBioLife
8/31/99 Database Management -- Fall 1999 -- R. Larson
Diveshop ER Entities
Site no
Ship Name
Category
InterestType Tonnage
Length (ft)
Beam(m)
Beam(ft)
Length(m)Shipwrck
Cause
Commentsexternal
DateSunk
Passengers/Crew
Graphicexternal
Survivors
Condition
8/31/99 Database Management -- Fall 1999 -- R. Larson
Diveshop ER Entities
Description
Item No
EquipmentClass
ReorderPoint On Hand Cost
SalePrice
DiveStok
8/31/99 Database Management -- Fall 1999 -- R. Larson
Diveshop ER Entities
CustomerNo
Order no
SaleDate
ShipVia Subtotal
TotalInvoice
DestinationCCExpDate
CCNumber
PaymentMethodDiveOrds
No ofPeople
VacationCost
ReturnDate
DepartDate
8/31/99 Database Management -- Fall 1999 -- R. Larson
Diveshop ER diagram
Item no
Order no
Rental/Sale
Qty Price LineTotal
Line Note
DiveItem
8/31/99 Database Management -- Fall 1999 -- R. Larson
Diveshop ER diagramSpecies
NoSiteNo
BioSite
8/31/99 Database Management -- Fall 1999 -- R. Larson
Diveshop ER diagramShip Via
ShipCost
ShipVia
8/31/99 Database Management -- Fall 1999 -- R. Larson
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
8/31/99 Database Management -- Fall 1999 -- R. Larson
Diveshop Questions• How many tons was the sunken ship Delaware?• What is customer Karen Ng’s address?• At what site might you find a Spotted Eagle Ray?• Where 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