Database Design. 8-1 Modeling Historical Data. Copyright 2015, Oracle and/or its affiliates. All rights reserved.

Similar documents
Database Design. 2-3 Entity Relationship Modeling and ERDs. Copyright 2015, Oracle and/or its affiliates. All rights reserved.

Database Design. 8-4 Drawing Conventions for Readability. Copyright 2015, Oracle and/or its affiliates. All rights reserved.

Database Design. 8-2 Modeling Change: Time. Copyright 2015, Oracle and/or its affiliates. All rights reserved.

Database Design. 6-1 Artificial, Composite, and Secondary UIDs. Copyright 2015, Oracle and/or its affiliates. All rights reserved.

Discussion Focus. Figure 1

Task: Design an ER diagram for that problem. Specify key attributes of each entity type.

ER modeling. Lecture 4

Database Design & Programming with SQL: Part 1 Learning Objectives

There are two pieces of information you need to be able to write an equation in slope-intercept form:

Database Foundations. 5-1 Mapping Entities and Attributes. Copyright 2015, Oracle and/or its affiliates. All rights reserved.

Relational Database Components

Logical E/R Modeling: the Definition of Truth for Data

BIG IDEAS. A.REI.D.10: Interpret Graphs as Sets of Solutions. Lesson Plan

System Analysis & design

Exam I Computer Science 420 Dr. St. John Lehman College City University of New York 12 March 2002

Project Specification Document for Keith Attwood s Goldsmith Website

MTAT Introduction to Databases

NEW YORK STATE INSURANCE FUND Workers Compensation equote/eapp January 29, 2018

CSE 530A. ER Model. Washington University Fall 2013

R ental of C ollege F acilities Policy

FROM A RELATIONAL TO A MULTI-DIMENSIONAL DATA BASE

Requirement Analysis & Conceptual Database Design

Relational Model (cont d) & Entity Relational Model. Lecture 2

MET CS 669 Database Design and Implementation for Business Term Project: Online DVD Rental Business

Relationship Mapping. Copyright 2011, Oracle. All rights reserved.

3-6 Lines in the Coordinate Plane

Name Class Date. Associative Property: When you add, you can group any of the numbers. When you multiply, you can group any of the numbers.

Lecture3: Data Modeling Using the Entity-Relationship Model.

A l Ain University Of Science and Technology

Äriprotsesside modelleerimine ja automatiseerimine Loeng 7 Valdkonna mudel

Database Foundations. 4-1 Oracle SQL Developer Data Modeler. Copyright 2015, Oracle and/or its affiliates. All rights reserved.

SOME TYPES AND USES OF DATA MODELS

Database Systems: Design, Implementation, and Management Tenth Edition. Chapter 4 Entity Relationship (ER) Modeling

Er Diagram Exercises. Exercise1. Draw an ER diagram for the following application from the manufacturing industry.

Database Design. 9-2 Basic Mapping: The Transformation Process. Copyright 2015, Oracle and/or its affiliates. All rights reserved.

Basic Mapping: The Transformation Process. Copyright 2011, Oracle. All rights reserved.

Database Principles: Fundamentals of Design, Implementation, and Management Tenth Edition. Chapter 7 Data Modeling with Entity Relationship Diagrams

Material Didáctico. Bases de Datos. Otoño MC David Eduardo Pinto Avendaño

CS111: PROGRAMMING LANGUAGE II

Completing Supplementary Reports and Sick Leave Certifications. A Tutorial for TRS-covered Employers

Exponential functions and equations Student Activity Sheet 3; use with Exploring Growth and decay

Strategic Information Systems Systems Development Life Cycle. From Turban et al. (2004), Information Technology for Management.

Introduction to MS Access: creating tables, keys, and relationships

normalization are being violated o Apply the rule of Third Normal Form to resolve a violation in the model

CS3200 Database Design Spring 2018 Derbinsky. Entity-Relationship (ER) Diagrams. Lecture 7

1 Privacy Statement INDEX

LECTURE 3: ENTITY-RELATIONSHIP MODELING

Bryn Athyn College Privacy Policy

Data Warehousing. Overview

A l Ain University Of Science and Technology

06 - Related Parties - Controlled Groups 1

INSTRUCTIONS FOR SALE OR LEASE APPLICATIONS LISTED BELOW ARE PROCEDURES AND DOCUMENTS THAT WILL BE REQUIRED FOR APPROVAL OF SALE OR LEASE:

I-9 AND E-VERIFY VENDOR DUE DILIGENCE

Relationship Mapping. Copyright 2008, Oracle. All rights reserved.

Teaching Scheme BIT/MMC/BCS Database Systems 1

Privacy Policy. Revisions to this Policy. What Information we collect. How do we collect Information?

Er Diagram Exercises. Exercise1

MIT Database Management Systems Lesson 03: Entity Relationship Diagrams

Database Design. 9-3 Relationship Mapping. Copyright 2015, Oracle and/or its affiliates. All rights reserved.

Chapter 11 GRAPHS OF LINEAR EQUATIONS

ISEB Certificate in Data Management Essentials

Database Foundations. 2-3 Conceptual Data Modeling. Copyright 2015, Oracle and/or its affiliates. All rights reserved.

22/09/2012 INFO2110. Copyright Warning. Revision of class diagram. Overview. Purpose of class diagram. Generalization Relationship

ER Model. Objectives (2/2) Electricite Du Laos (EDL) Dr. Kanda Runapongsa Saikaew, Computer Engineering, KKU 1

HOW TO COMPLETE A POST PAID ORDER ON CRM 2014/11/06

Structured English Examples

RELATIONAL DATA MODEL

Database Systems. A Practical Approach to Design, Implementation, and Management. Database Systems. Thomas Connolly Carolyn Begg

1/24/2012. Chapter 7 Outline. Chapter 7 Outline (cont d.) CS 440: Database Management Systems

ELECTRIC APP - PRIVACY POLICY

Unit 0: Extending Algebra 1 Concepts

Represent entities and relations with diagrams

... Mapping the ER Model

SENIOR SYSTEMS ANALYST

Revolution User Manual - Management Information

Relationships and Graphs 7.4.A. Graphing Proportional Relationships You can use a graph to explore proportional relationships.

Data Management Lecture Outline 2 Part 2. Instructor: Trevor Nadeau

Linear Programming. You can model sales with the following objective function. Sales 100x 50y. x 0 and y 0. x y 40

Problem Solving Find Unknown Lengths OBJECTIVE Solve problems using the strategy guess, check, and revise. Read the Problem.

Non-overlappingoverlapping. Final outcome of the worked example On pages R&C pages R&C page 157 Fig 3.52

Excel 1. Module 6 Data Lists

Chapter # 4 Entity Relationship (ER) Modeling

Lesson 3.1. Midpoint and Dilations (5.1.1, 5.2.1, and 5.2.2) Pages 8-38 in Unit 5 Workbook

How to Get Started Guide

The Object Data Model

Data Modeling with the Entity Relationship Model. CS157A Chris Pollett Sept. 7, 2005.

Instructions For Cell Phone Use While Driving In Illinois Law Prohibiting

Examination paper for TDT4145 Data Modelling and Database Systems

Using High-Level Conceptual Data Models for Database Design A Sample Database Application Entity Types, Entity Sets, Attributes, and Keys

GDPR Compliant. Privacy Policy. Updated 24/05/2018

Database Design - Section 11. Instructor Guide

Lecture 01. Fall 2018 Borough of Manhattan Community College

Copyright 2016 Ramez Elmasri and Shamkant B. Navathe

Release Service Request Consolidated Billing Automation Phase I. Detail Design. January 21, 2009 Prepared by Caroline Rider

ESSENTIAL QUESTION How can you determine when two triangles are similar? 8.8.D

Sc r a n t o n Wi lk e s-ba r r e

PAYE Modernisation. Operating Guide

Objectives of logical design... Transforming the ERD diagram into relations. Relational database components. Mapping a composite attribute

Attributes. Entity-Relationship Model (ERM) IV. Entity Relationship Modeling. Entities and Attributes: Chen and Crow s Foot

Chapter 2: Entity-Relationship Model. Entity Sets. Entity Sets customer and loan. Attributes. Relationship Sets. A database can be modeled as:

Transcription:

Database Design 8-1

Objectives This lesson covers the following objectives: Identify the need to track data that changes over time Construct ERD models that incorporate elements of data over time Identify the UID of an entity that stores historical data; explain and justify the choice of UID 3

Purpose How tall were you at age 5? How tall were you at age 10? How tall are you right now? If your parents wrote this down when you were young, they were keeping track of historical data. Most businesses need to track some historical data. This helps them find trends and patterns that are the basis for business innovations or process improvements. For example, rental history of a movie is useful to a video store. It tells managers which movies are popular and which should be moved to the back shelf. 4

Model Data Over Time When is it necessary to model data over time? Ask your client: Is an audit trail required? Can attribute values change over time? Can relationships change over time? Do you need to produce reports on older data? Do you need to keep previous versions of the data? If so, for how long? 5

Data Over Time Example An organization needs to keep data about employees salaries. All employees are paid weekly. Initially, the following EMPLOYEE entity was modeled. Additional requirements now specify that the organization needs to keep a historical record of how and when employees salaries have changed during their employment. EMPLOYEE * first name * last name * weekly salary amount * salary start date 6

Model Salary Changes To model salary changes over time, add a SALARY HISTORY entity. SALARY HISTORY # salary start date o salary end date * weekly salary amount for having EMPLOYEE * first name * last name The UID of the SALARY HISTORY entity is the related EMPLOYEE id and the salary start date. 7

Model Rental Over Time A jewelry store rents pieces (necklaces, bracelets and so on) to movie stars for special occasions, such as award ceremonies or movie premieres. They would like to track the rental history of a jewelry piece. The following ER model will only track the current renter of a piece of jewelry. How would you revise the relationship to track history? JEWELRY PIECE # code * description * rental rate * insured value rented by renting MOVIE STAR * first name * last name 8

Resolve M:M The relationship between JEWELRY PIECE and MOVIE STAR should be revised to a M:M, which is then resolved with an intersection entity RENTAL HISTORY. Next we need to determine the UID of RENTAL HISTORY. JEWELRY PIECE # code * description * rental rate * insured value rented by renting MOVIE STAR * first name * last name The M:M relationship is resolved with an intersection entity. RENTAL HISTORY * rental date * date returned for on for on MOVIE STAR * first name * last name JEWELRY PIECE # code * description * rental rate * insured value 9

Determine UID Option 1: Barred relationship. Drawing a Barred relationship is not a suitable UID here, as this would not allow a MOVIE STAR to rent the same JEWELRY PIECE on different dates RENTAL HISTORY for * Rental date * Date returned on for on JEWELRY PIECE # Code * Description * Rental rate * Insured value MOVIE STAR * First Name * Last Name 10

Determine UID Option 2: Barred relationship and Rental Date. Adding rental date to the UID would allow a MOVIE STAR to rent the same JEWELRY PIECE on different dates, but would also permit different MOVIE STARS to rent the same JEWELRY PIECE on the same date! RENTAL HISTORY for # Rental date * Date returned on for on JEWELRY PIECE # Code * Description * Rental rate * Insured value MOVIE STAR * First Name * Last Name 11

Determine UID Option 3: Barred relationship between MOVIE STAR and RENTAL HISTORY with Rental Date. This model would not permit the same MOVIE STAR to rent more than one JEWELRY PIECE on a given day. RENTAL HISTORY for # Rental date * Date returned on for on JEWELRY PIECE # Code * Description * Rental rate * Insured value MOVIE STAR * First Name * Last Name 12

Determine UID Option 4: Barred relationship between JEWELRY PIECE and RENTAL HISTORY with Rental Date. This model says that a JEWELRY PIECE can be rented only once on the same date. RENTAL HISTORY for # Rental date * Date returned on for on JEWELRY PIECE # Code * Description * Rental rate * Insured value MOVIE STAR * First Name * Last Name 13

Terminology Key terms used in this lesson included: Audit trail Historical data 14

Summary In this lesson, you should have learned how to: Identify the need to track data that changes over time Construct ERD models that incorporate elements of data over time Identify the UID of an entity that stores historical data; explain and justify the choice of UID 15