Survey
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
Database Models and Introduction to Access University 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) Application 1 External Model Application 2 Application 3 Application 4 External Model External Model External Model Application 1 Conceptual requirements Application 2 Conceptual requirements Application 3 Conceptual requirements Conceptual Model Logical Model Application 4 Conceptual requirements 8/31/99 Database Management -- Fall 1999 -- R. Larson Internal Model 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 Physical Creation 2 Conversion 3 Design 1 Growth, Change, & Maintenance 6 Integration 4 Operations 5 8/31/99 Database Management -- Fall 1999 -- R. Larson Today • Models(2): DBMS types – – – – 8/31/99 Hierarchical Network Relational Object-Oriented Database Management -- Fall 1999 -- R. Larson Database Data Models • Hierarchical Model – Similar to data structures in programming languages. Books (id, title) Authors (first, last) 8/31/99 Publisher Database Management -- Fall 1999 -- R. Larson Subjects Database Data Models • Network Model – Provides for single entries of data and navigational “links” through chains of data. Authors Subjects Books 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. pubid Book ID 1 2 3 4 5 Title pubid Introductio The history New stuff ab Another title And yet more 8/31/99 2 4 3 2 1 Author id 1 2 3 4 5 1 2 3 4 Book ID pubname Harper Addison Oxford Que Authorid 1 2 3 4 5 Author name Smith Wynar Jones Duncan Applegate Subid 1 2 3 4 4 2 1 3 2 3 Database Management -- Fall 1999 -- R. Larson Subid Subject 1 cataloging 2 history 3 stuff Database Data Models • Object Oriented Data Model – Encapsulates data and operations as “Objects” Books (id, title) Authors (first, last) 8/31/99 Publisher Database Management -- Fall 1999 -- R. Larson Subjects 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 Site Highlight Site Notes Site Name Destination no Distance From Town (M) Distance From Town (Km) Depth (ft) Sites Depth (m) Site no Visibility(ft) Skill Level 8/31/99 Visibility (m) Database Management -- Fall 1999 -- R. Larson Diveshop ER Entities City State/Prov ZIP/Postal Code Country Street Name DiveCust First Contact Customer no 8/31/99 Phone Database Management -- Fall 1999 -- R. Larson Diveshop ER Entities Avg Temp (C) Spring Temp (F) Avg Temp (F) Destination name Summer Temp (C) Summer Temp (F) Fall Temp (C) Dest Fall Temp (F) Destination no Accommodations Travel Cost Body of Water 8/31/99 Winter Winter Temp (C) Temp (F) Night Life Database Management -- Fall 1999 -- R. Larson Diveshop ER Entities Species Name Length (cm) Length (in) Common Name Notes external Category Graphic external BioLife Species no 8/31/99 Database Management -- Fall 1999 -- R. Larson Diveshop ER Entities Type Interest Tonnage Length (ft) Category Site no Length (m) Shipwrck Beam (ft) Ship Name Graphic external 8/31/99 Condition Passengers/ Crew Survivors Comments external Cause Date Sunk Database Management -- Fall 1999 -- R. Larson Beam (m) Diveshop ER Entities On Hand Reorder Point Equipment Class Description Sale Price DiveStok Item No 8/31/99 Cost Database Management -- Fall 1999 -- R. Larson Diveshop ER Entities Ship Via Subtotal Sale Date Total Invoice Customer No Payment Method DiveOrds Order no Vacation Cost CCNumber Destination Return Date 8/31/99 No of People Depart Date Database Management -- Fall 1999 -- R. Larson CCExpDate Diveshop ER diagram Price Qty Rental/ Sale Item no Line Note DiveItem Order no 8/31/99 Line Total Database Management -- Fall 1999 -- R. Larson Diveshop ER diagram Species No Site No BioSite 8/31/99 Database Management -- Fall 1999 -- R. Larson Diveshop ER diagram Ship Via Ship Cost ShipVia 8/31/99 Database Management -- Fall 1999 -- R. Larson DiveShop ER Diagram Customer No DiveCust 1 Destination Name Destination no Customer No 1 n Dest Destination no Site No 1 Site No Species No n BioSite ShipVia n DiveOrds n 1 1 1 Destination n Sites Order No n 1 1/n DiveItem ShipWrck n Site No 1 8/31/99 Order No Item No n 1 Species No ShipVia BioLife DiveStok Database Management -- Fall 1999 -- R. Larson Item No ShipVia 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 8/31/99 Database Management -- Fall 1999 -- R. Larson