9/4/2000Database Management -- Fall 2000 -- R. Larson Database Models and Introduction to Access University of California, Berkeley School of Information.

Slides:



Advertisements
Similar presentations
Entity-Relationship (ER) Modeling
Advertisements

Information Systems Planning and the Database Design Process
SLIDE 1IS 257 – Fall 2014 Database Design: Conceptual Model and ER Diagramming Ray R. Larson University of California, Berkeley School of.
11/7/2000Database Management -- R. Larson Network, Object-Oriented and Other Database Models University of California, Berkeley School of Information Management.
SLIDE 1IS Fall 2002 Database Design: Object- Oriented Modeling University of California, Berkeley School of Information Management and.
SLIDE 1IS Fall 2002 Database Management: Introduction University of California, Berkeley School of Information Management and Systems.
Database Design University of California, Berkeley
SLIDE 1IS 257 – Fall 2006 Database Management: Introduction Ray R. Larson University of California, Berkeley School of Information IS 257:
SLIDE 1IS 257 – Fall 2006 Database Design: Conceptual Model and ER Diagramming Ray R. Larson University of California, Berkeley School of.
SLIDE 1IS 257 – Fall 2011 Referential Integrity and Database Design Recap: From Conceptual Design to Physical Relational Implementation University.
9/6/2001Database Management – Fall 2000 – R. Larson Information Systems Planning and the Database Design Process University of California, Berkeley School.
Oct 31, 2000Database Management -- Fall R. Larson Database Management: Introduction to Terms and Concepts University of California, Berkeley School.
SLIDE 1IS Fall 2002 Database Design: Conceptual Model and ER Diagramming University of California, Berkeley School of Information Management.
SLIDE 1IS 257 – Fall 2006 Database Design: Logical Models: Normalization and The Relational Model University of California, Berkeley School.
SLIDE 1IS 257 – Fall 2004 Database Design: Conceptual Model and ER Diagramming Ray R. Larson University of California, Berkeley School of.
SLIDE 1IS 257 – Spring 2004 Object-Oriented Database Development (Hoffer Chap 15) University of California, Berkeley School of Information.
SLIDE 1IS 257 – Fall 2004 Database Design: Logical Model Design & Access DB Creation University of California, Berkeley School of Information.
9/7/1999Information Organization and Retrieval Database Design: Conceptual Model and ER Diagramming University of California, Berkeley School of Information.
11/28/2000Information Organization and Retrieval Introduction to Databases and Database Design University of California, Berkeley School of Information.
SLIDE 1IS 257 – Fall 2010 Database Design: Conceptual Model and ER Diagramming Ray R. Larson University of California, Berkeley School of.
SLIDE 1IS 257 – Fall 2009 Database Design: Conceptual Model (cont.) and UML University of California, Berkeley School of Information IS 257:
SLIDE 1IS 257 – Fall 2005 Database Design: Conceptual and Logical Model Design University of California, Berkeley School of Information Management.
SLIDE 1IS Fall 2002 Database Life Cycle and Introduction to Access University of California, Berkeley School of Information Management.
Chapter 2 Database Environment. Agenda Three-Level ANSI-SPARC Architecture Database Languages Data Models Functions of DBMS Components of DBMS Teleprocessing.
8/29/2000Database Management -- Fall R. Larson Database Management: Introduction University of California, Berkeley School of Information Management.
SLIDE 1IS Fall 2002 Information Systems Planning and the Database Design Process University of California, Berkeley School of Information.
10/2/2001SIMS 257 – Database Management Database Design: From Conceptual Design to Physical Implementation - Relational Model University of California,
9/21/2000SIMS 257 – Database Management Database Design: From Conceptual Design to Physical Implementation University of California, Berkeley School of.
Introduction to Databases Transparencies
8/28/2001Database Management -- Fall R. Larson Database Management: Introduction University of California, Berkeley School of Information Management.
Callie’s Birthday SLIDE 1IS 202 – FALL 2004 Prof. Ray Larson & Prof. Marc Davis UC Berkeley SIMS Tuesday and Thursday 10:30 am - 12:00 pm.
SLIDE 1IS 257 – Fall 2006 Database Design: Conceptual Model (cont.) and UML University of California, Berkeley School of Information IS 257:
SLIDE 1IS 257 – Fall 2005 Database Life Cycle and Introduction to Access University of California, Berkeley School of Information Management.
SLIDE 1IS 257 – Fall 2004 Database Design: Normalization and The Relational Model University of California, Berkeley School of Information.
SLIDE 1IS 257 – Fall 2010 Database Design: Conceptual Model (cont.) and UML University of California, Berkeley School of Information IS 257:
SLIDE 1IS 257 – Fall 2009 Database Management: Introduction Ray R. Larson University of California, Berkeley School of Information IS 257:
SLIDE 1IS 257 – Spring 2004 Information Systems Planning and the Database Design Process Ray R. Larson University of California, Berkeley.
SLIDE 1IS 257 – Spring 2004 Database Design: Conceptual Model and ER Diagramming Ray R. Larson University of California, Berkeley School of.
“DOK 322 DBMS” Y.T. Database Design Hacettepe University Department of Information Management DOK 322: Database Management Systems.
8/28/97Information Organization and Retrieval Files and Databases University of California, Berkeley School of Information Management and Systems SIMS.
Chapter 4 Relational Databases Copyright © 2012 Pearson Education, Inc. publishing as Prentice Hall 4-1.
SLIDE 1IS 257 – Fall 2008 Database Design Recap: From Conceptual Design to Physical Relational Implementation University of California, Berkeley.
SLIDE 1IS Fall 2002 Database Design: From Conceptual Design to Physical Relational Implementation University of California, Berkeley.
SLIDE 1IS 257 – Spring 2004 Database Design: From Conceptual Design to Physical Relational Implementation University of California, Berkeley.
8/28/97Information Organization and Retrieval Database Design University of California, Berkeley School of Information Management and Systems SIMS 202:
10/3/2000SIMS 257: Database Management -- Ray Larson Relational Algebra and Calculus University of California, Berkeley School of Information Management.
SLIDE 1IS 257 – Spring 2004 Database Management: Introduction Ray R. Larson University of California, Berkeley School of Information Management.
SLIDE 1IS Fall 2006 Information Systems Planning and the Database Design Process Ray R. Larson University of California, Berkeley School.
SLIDE 1IS 257 – Spring 2004 Database Design: Object- Oriented Modeling University of California, Berkeley School of Information Management.
Chapter 4 Relational Databases Copyright © 2012 Pearson Education 4-1.
Information Systems Planning and the Database Design Process
LECTURE 2 DATABASE SYSTEM CONCEPTS AND ARCHITECTURE.
9/9/1999Information Organization and Retrieval Database Design: From Conceptual Design to Physical Implementation University of California, Berkeley School.
9/7/1999Information Organization and Retrieval Database Design: Object- Oriented Modeling University of California, Berkeley School of Information Management.
Chapter 2 Database Environment. Agenda Three-Level ANSI-SPARC Architecture Database Languages Data Models Functions of DBMS Components of DBMS Data Dictionary.
1 Chapter 1 Introduction. 2 Introduction n Definition A database management system (DBMS) is a general-purpose software system that facilitates the process.
Relational Database. Database Management System (DBMS)
Lecture # 3 & 4 Chapter # 2 Database System Concepts and Architecture Muhammad Emran Database Systems 1.
3/6: Data Management, pt. 2 Refresh your memory Relational Data Model
Copyright (c) 2014 Pearson Education, Inc. Introduction to DBMS.
8/31/99Database Management -- Fall R. Larson Database Models and Introduction to Access University of California, Berkeley School of Information.
LECTURE TWO Introduction to Databases: Data models Relational database concepts Introduction to DDL & DML.
Data Resource Management Lecture 8. Traditional File Processing Data are organized, stored, and processed in independent files of data records In traditional.
Database Design: Conceptual Model (cont.), UML and The Logical Model
Database Design: Conceptual Model and ER Diagramming
Database Management:.
Chapter 2 Database Environment.
Data Model.
University of California, Berkeley School of Information
Database Design Hacettepe University
Presentation transcript:

9/4/2000Database Management -- Fall R. Larson Database Models and Introduction to Access University of California, Berkeley School of Information Management and Systems SIMS 257: Database Management

9/4/2000Database Management -- Fall R. Larson Last Time Database concepts and terminology Database Life cycle

9/4/2000Database Management -- Fall R. Larson Terms and Concepts Database: Enterprise Entity Attributes Data values Records File Key Primary Key

9/4/2000Database Management -- Fall 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

9/4/2000Database Management -- Fall R. Larson Models (1) Conceptual Model Logical Model External Model Conceptual requirements Conceptual requirements Conceptual requirements Conceptual requirements Application 1 Application 2Application 3Application 4 Application 2 Application 3 Application 4 External Model External Model External Model Internal Model

9/4/2000Database Management -- Fall R. Larson Terms and Concepts Data Dictionary Data Administration Database Administration Data Steward DA DBA

9/4/2000Database Management -- Fall R. Larson Database System Life Cycle Growth, Change, & Maintenance 6 Operations 5 Integration 4 Design 1 Conversion 3 Physical Creation 2

9/4/2000Database Management -- Fall R. Larson Today Models(2): DBMS types –Hierarchical –Network –Relational –Object-Oriented –Object-Relational

9/4/2000Database Management -- Fall R. Larson Database Data Models Hierarchical Model –Similar to data structures in programming languages. Books (id, title) PublisherSubjects Authors (first, last)

9/4/2000Database Management -- Fall R. Larson Hierarchical Model Data items are structured in a Parent-Child hierarchical relationship Data items are grouped into “logical record types”. Each of these approximately corresponds to a table in the relational model. FOCUS permits “virtual segments” that are stored as files.

9/4/2000Database Management -- Fall R. Larson Hierarchical Model for Cookie BIBINFO SUBINFO PUBINFOINDXINFO LIBINFO CALLINFO

9/4/2000Database Management -- Fall R. Larson FOCUS BIBFILE Definition FILENAME = BIBFILE, SUFFIX = FOC, $ SEGNAME = BIBINFO, SEGTYPE = S, $ FIELD = ACCESSION NO, ALIAS = ACCNO, USAGE = A4, $ FIELD = AUTHOR, ALIAS = AU, USAGE = A30, $ FIELD = TITLE, ALIAS = TI, USAGE = A40, $ FIELD = LOCATION, ALIAS = LOC, USAGE = A20, $ FIELD = PUBLISHERID, ALIAS = PUBID, USAGE = A2, $ FIELD = DATE, ALIAS = D, USAGE = A4, $ FIELD = PRICE, ALIAS = PR, USAGE = D6.2, $ FIELD = PAGINATION, ALIAS = PAGIN, USAGE = A13, $ FIELD = ILLUSTRATION, ALIAS = ILL, USAGE = A9, $ FIELD = HEIGHT, ALIAS = HT, USAGE = I2, $ SEGNAME = PUBINFO, PARENT = BIBINFO, SEGTYPE = KU, CRFILE = PUBFILE, CRKEY = PUBLISHERID, $ SEGNAME = INDXINFO, PARENT = BIBINFO, SEGTYPE = S, $ FIELD = SUBID, ALIAS = SID, USAGE = A2, $ SEGNAME = CALLINFO, PARENT = BIBINFO, SEGTYPE = S, $ FIELD = LIBRARYID, ALIAS = LIBID, USAGE = A2, $ FIELD = CALL NUMBER, ALIAS = CALLNO, USAGE = A15, $ FIELD = COPIES, ALIAS = C, USAGE = I4, $ SEGNAME = LIBINFO, PARENT = CALLINFO, SEGTYPE = KU, CRFILE = LIBFILE, CRKEY = LIBRARYID, $ SEGNAME = SUBINFO, PARENT = INDXINFO, SEGTYPE = KU, CRFILE = SUBFILE, CRKEY = SUBID, $

9/4/2000Database Management -- Fall R. Larson PUBFILE Segment FILENAME = PUBFILE, SUFFIX = FOC, $ SEGNAME = PUBINFO, SEGTYPE = S, $ FIELD = PUBLISHERID, ALIAS = PUBID, USAGE = A2, FIELDTYPE = I, $ FIELD = PUBLISHER, ALIAS = PNAME, USAGE = A30, $ FIELD = PUB ADDRESS, ALIAS = PADDRESS, USAGE = A20, $ FIELD = PUB CITY, ALIAS = PCITY, USAGE = A15, $ FIELD = PUB STATE, ALIAS = PSTATE, USAGE = A2, $ FIELD = PUB ZIP, ALIAS = PZIP, USAGE = A5, $ FIELD = PUB PHONE, ALIAS = PPHONE, USAGE = A10, $ FIELD = PUB SHIP, ALIAS = SHIP, USAGE = I3,$

9/4/2000Database Management -- Fall R. Larson SUBFILE Segment FILENAME = SUBFILE, SUFFIX = FOC, $ SEGNAME = SUBINFO, SEGTYPE = S, $ FIELD = SUBID, ALIAS = SID, USAGE = A2, FIELDTYPE = I, $ FIELD = SUBJECT, ALIAS = SUB, USAGE = A32, $

9/4/2000Database Management -- Fall R. Larson LIBFILE Segment FILENAME = LIBFILE, SUFFIX = FOC, $ SEGNAME = LIBINFO, SEGTYPE = S, $ FIELD = LIBRARYID, ALIAS = LIBID, USAGE = A2, FIELDTYPE = I, $ FIELD = LIBRARY, ALIAS = LIB, USAGE = A42, $ FIELD = LIB ADDRESS, ALIAS = LADDRESS, USAGE = A25, $ FIELD = LIB CITY, ALIAS =LCITY, USAGE = A15, $ FIELD = LIB STATE, ALIAS = LSTATE, USAGE = A2, $ FIELD = LIB ZIP, ALIAS = LZIP, USAGE = A5, $ FIELD = LIB PHONE, ALIAS = LPHONE, USAGE = A10, $ FIELD = MONOPEN, ALIAS = MOP, USAGE = I4, $ FIELD = MONCLOSE, ALIAS = MCL, USAGE = I4, $ FIELD = TUEOPEN, ALIAS = TUOP, USAGE = I4, $ FIELD = TUECLOSE, ALIAS = TUCL, USAGE = I4, $ FIELD = WEDOPEN, ALIAS = WOP, USAGE = I4, $ FIELD = WEDCLOSE, ALIAS = WCL, USAGE = I4, $ FIELD = THURSOPEN, ALIAS = THOP, USAGE = I4, $ FIELD = THURSCLOSE, ALIAS = THCL, USAGE = I4, $ FIELD = FRIOPEN, ALIAS = FOP, USAGE = I4, $ FIELD = FRICLOSE, ALIAS = FCL, USAGE = I4, $ FIELD = SATOPEN, ALIAS = SATOP, USAGE = I4, $ FIELD = SATCLOSE, ALIAS = SATCL, USAGE = I4, $ FIELD = SUNOPEN, ALIAS = SUNOP, USAGE = I4, $ FIELD = SUNCLOSE, ALIAS = SUNCL, USAGE = I4, $

9/4/2000Database Management -- Fall R. Larson Hierarchic Querying All searches must proceed from the “root” of the hierarchy, and traverse each segment containing required information

9/4/2000Database Management -- Fall R. Larson Hierarchical Query Processing BIBINFO SUBINFO PUBINFOINDXINFO LIBINFO CALLINFO

9/4/2000Database Management -- Fall R. Larson Database Data Models Network Model –Provides for single entries of data and navigational “links” through chains of data. SubjectsBooks Authors Publishers

9/4/2000Database Management -- Fall R. Larson Network Database Systems Network DBMS are an evolutionary step from Hierarchical systems. Hierarchical systems can be considered a subset of Network systems.

9/4/2000Database Management -- Fall R. Larson History Specifications for network systems came from CODASYL (Conference on Data and Systems Languages) -- The same fine folks who brought you COBOL. The DTBG (Data Base Task Group) was founded in 1965 to specify a “standard language for manipulating records” The result was a report (published in 1971)

9/4/2000Database Management -- Fall R. Larson History The CODASYL DBTG report contained specifications for: –A DDL - Data Definition Language –A DML - Data Manipulation Language –Inherent in the report was the underlying Network database structure.

9/4/2000Database Management -- Fall R. Larson Components of DDL and DML DDL is used to describe or define: –database records –individual data items –the associations that exist between record types –security –record positioning The database definition created by the DDL is called the database schema User views can also be defined in the DDL and are called subschemas

9/4/2000Database Management -- Fall R. Larson DDL Continued DDL is also used by the database designer to define all associations between record types –These associations are called Sets and are sometimes referred to as DTBG Sets. –Sets describe a one to many relationship between two distinct record types. –The record on the “one” side of the set is called the “owner” –The record on the “many” side of the set is called the “member”

9/4/2000Database Management -- Fall R. Larson DDL Definitions Example DDL for a DB (partial) SCHEMA NAME IS SAMPLEDB. AREA NAME IS ORDERS. RECORD NAME IS CUSTOMER; LOCATION MODE IS CALC USING CUSTOMERID DUPLICATES ARE NOT ALLOWED; WITHIN ORDERENTRY; 02 CUSTOMERID PICTURE IS X(5). 02 CUSTOMER-NAME PICTURE IS X(30). 02 CUSTOMER-ADDRESS. 05 STREET PICTURE IS X(25). 05 CITY PICTURE IS X(15). 05 STATE PICTURE IS XX. 05 ZIPCODE PICTURE IS X(10). 02 CUSTOMER-TELEPHONE PICTURE IS X(13). Etc…. RECORD NAME IS INVOICE; LOCATION MODE IS VIA CUSTOMER-INVOICE SET WITHIN ORDERENTRY; 02 INVOICE-ID PICTURE IS X(5). 02 INVOICE-DATE PICTURE IS 9(6). 02 INVOICE-AMOUNT TYPE IS BINARY. Etc... SET NAME IS CUSTOMER-INVOICE; OWNER IS CUSTOMER INSERTION IS FIRST MEMBER IS INVOICE MANDATORY AUTOMATIC LINKED TO OWNER SET SELECTION IS THRU CUSTOMER-INVOICE CURRENT OF SET.

9/4/2000Database Management -- Fall R. Larson Set Definition and Pointers CUSTOMERINVOICE

9/4/2000Database Management -- Fall R. Larson Set Definitions and Pointers INVOICELstFst LINE-ITEMONP ONP ONP ONP ONP

9/4/2000Database Management -- Fall R. Larson Database Data Models Relational Model –Provides a conceptually simple model for data as relations (typically considered “tables”) with all data visible.

9/4/2000Database Management -- Fall R. Larson Database Data Models Object Oriented Data Model –Encapsulates data and operations as “Objects” Books (id, title) PublisherSubjects Authors (first, last)

9/4/2000Database Management -- Fall R. Larson Object-Oriented DBMS Basic Concepts Each real-world entity is modeled by an object. Each object is associated with a unique identifier (sometimes call the object ID or OID)

9/4/2000Database Management -- Fall R. Larson Object-Oriented DBMS Basic Concepts Each object has a set of instance attributes (or instance variables) and methods. –The value of an attribute can be an object or set of objects. Thus complex object can be constructed from aggregations of other objects. –The set of attributes of the object and the set of methods represent the object structure and behavior, respectively

9/4/2000Database Management -- Fall R. Larson Object-Oriented DBMS Basic Concepts The attribute values of an object represent the object’s status. –Status is accessed or modified by sending messages to the object to invoke the corresponding methods

9/4/2000Database Management -- Fall R. Larson Object-Oriented DBMS Basic Concepts Objects sharing the same structure and behavior are grouped into classes. –A class represents a template for a set of similar objects. –Each object is an instance of some class.

9/4/2000Database Management -- Fall R. Larson Object-Oriented DBMS Basic Concepts A class can be defined as a specialization of of one or more classes. –A class defined as a specialization is called a subclass and inherits attributes and methods from its superclass(es).

9/4/2000Database Management -- Fall R. Larson Object-Oriented DBMS Basic Concepts An OODBMS is a DBMS that directly supports a model based on the object-oriented paradigm. –Like any DBMS it must provide persistent storage for objects and their descriptions (schema). –The system must also provide a language for schema definition and and for manipulation of objects and their schema –It will usually include a query language, indexing capabilities, etc.

9/4/2000Database Management -- Fall R. Larson Generalization Hierarchy Employee No Name Address Date hired Date of Birth employee Contract No. Date Hired consultant Annual Salary Stock Option Salaried Hourly Rate Hourly calculateAge AllocateToContractcalculateStockBenefit calculateWage

9/4/2000Database Management -- Fall R. Larson Database Data Models 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

9/4/2000Database Management -- Fall 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)

9/4/2000Database Management -- Fall 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)

9/4/2000Database Management -- Fall R. Larson Diveshop ER Entities: SITES Destination no Site no Site Name Site Notes Site Highlight Distance From Town (M) Distance From Town (Km) Skill Level Visibility(ft) Depth (m) Depth (ft) Sites Visibility (m) Current

9/4/2000Database Management -- Fall R. Larson Diveshop ER Entities: DIVECUST Name Customer no Street State/ProvCity ZIP/Postal Code Country First Contact Phone DiveCust

9/4/2000Database Management -- Fall R. Larson Diveshop ER Entities: DEST Destination name Destination no Avg Temp (F) Spring Temp (F) Avg Temp (C) Summer Temp (C) Summer Temp (F) Travel Cost Winter Temp (C) Fall Temp (F) Fall Temp (C) Dest Winter Temp (F) Accommodations Body of Water Night Life Spring Temp (C)

9/4/2000Database Management -- Fall R. Larson Diveshop ER Entities: BIOLIFE Category Species no Common Name Length (cm) Species Name Length (in) Notes external Graphic external BioLife

9/4/2000Database Management -- Fall R. Larson Diveshop ER Entities: SHIPWRCK Site no Ship Name Category InterestTypeTonnage Length (ft) Beam (m) Beam (ft) Length (m) Shipwrck Cause Comments external Date Sunk Passengers/ Crew Graphic external Survivors Condition

9/4/2000Database Management -- Fall R. Larson Diveshop ER Entities: DIVESTOK Description Item No Equipment Class Reorder Point On HandCost Sale Price DiveStok Rental Price

9/4/2000Database Management -- Fall R. Larson Diveshop ER Entities: DIVEORDS Customer No Order no Sale Date Ship Via Destination CCExpDate CCNumber Payment Method DiveOrds No of People Vacation Cost Return Date Depart Date

9/4/2000Database Management -- Fall R. Larson Diveshop ER diagram: DIVEITEM Item no Order no Rental/ Sale Qty Line Note DiveItem

9/4/2000Database Management -- Fall R. Larson Diveshop ER diagram: BIOSITE Species No Site No BioSite

9/4/2000Database Management -- Fall R. Larson Diveshop ER diagram: SHIPVIA Ship Via Ship Cost ShipVia

9/4/2000Database Management -- Fall R. Larson DiveShop ER Diagram: All Customer No ShipVia Dest Sites BioSite ShipVia ShipWrck BioLife DiveStok DiveItem DiveOrds DiveCust Customer No ShipVia Order No Order No Item No Item No Destination Name Destination Species No Site No Destination no Site No Destination no Species No Site No /n 1 1 n n n n n n n n 1

9/4/2000Database Management -- Fall R. Larson Assignment 1: Diveshop Questions 1.How many tons was the sunken ship Delaware? 2.What is customer Karen Ng’s address? 3.At what site might you find a Spotted Eagle Ray? 4.Where is the site Palancar Reef? 5.What sites might Lorraine Vega dive on her trip? 6.Keith Lucas wants to see a shipwreck on his trip. Is he going to the right place? 7.What equipment is Richard Denning getting? 8.What is the cost of the equipment rental for Louis Jazdzewski