An Example: Video Rental System



Similar documents
Chapter 2: Entity-Relationship Model. E-R R Diagrams

We know how to query a database using SQL. A set of tables and their schemas are given Data are properly loaded

Relational Database Concepts

Data Modelling and E-R Diagrams

Lesson 8: Introduction to Databases E-R Data Modeling

ComponentNo. C_Description UnitOfMeasure. C_Quantity

Bridge from Entity Relationship modeling to creating SQL databases, tables, & relations

Data Modeling with Entity-Relationship Diagrams

Chapter 2: Entity-Relationship Model. Entity Sets. " Example: specific person, company, event, plant

Introduction to normalization. Introduction to normalization

Chapter 2: Entity-Relationship Model

Chapter 3. Data Modeling Using the Entity-Relationship (ER) Model

Foundations of Information Management

Entity - Relationship Modelling

Relational Database Basics Review

Designing Databases. Introduction

Conceptual Design: Entity Relationship Models. Objectives. Overview

THE ENTITY- RELATIONSHIP (ER) MODEL CHAPTER 7 (6/E) CHAPTER 3 (5/E)

2. Conceptual Modeling using the Entity-Relationship Model

Lecture 12: Entity Relationship Modelling

7.1 The Information system

DATABASE INTRODUCTION

Foundations of Information Management

ER modelling, Weak Entities, Class Hierarchies, Aggregation

CS251: Fundamentals of Database Systems 1. CS251: Fundamentals of Database Systems. Database Design Project. Trina VanderLouw

Database Management Systems

Entity-Relationship Model

Database Design. Marta Jakubowska-Sobczak IT/ADC based on slides prepared by Paula Figueiredo, IT/DB

Tutorial on Relational Database Design

Converting E-R Diagrams to Relational Model. Winter Lecture 17

A Short Tutorial on Using Visio 2010 for Entity-Relationship Diagrams

Data Modeling Basics

Faculty of Engineering and Architecture. Computer Engineering Department DATABASE MANAGEMENT SYSTEMS POSTLAB #3 SOLUTION

1 Class Diagrams and Entity Relationship Diagrams (ERD)

Entity Relationship Diagram

OVERVIEW 1.1 DATABASE MANAGEMENT SYSTEM (DBMS) DEFINITION:-

not necessarily strictly sequential feedback loops exist, i.e. may need to revisit earlier stages during a later stage

Ken Goldberg Database Lab Notes. There are three types of relationships: One-to-One (1:1) One-to-Many (1:N) Many-to-Many (M:N).

Database Design and the E-R Model

Relational Schema Design

BİL 354 Veritabanı Sistemleri. Entity-Relationship Model

three Entity-Relationship Modeling chapter OVERVIEW CHAPTER

Database Design Process

Concepts of Database Management Seventh Edition. Chapter 6 Database Design 2: Design Method

Introduction to Databases

Database Design Process

Requirement Analysis & Conceptual Database Design. Problem analysis Entity Relationship notation Integrity constraints Generalization

Chapter 5 Foundations of Business Intelligence: Databases and Information Management

EXTENDED LEARNING MODULE A

CSCI315 Database Design and Implementation

Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model

CIS 631 Database Management Systems Sample Final Exam

MySQL for Beginners Ed 3

Logical Schema Design: The Relational Data Model

RELATIONSHIP STRENGTH

Data Analysis 1. SET08104 Database Systems. Napier University

Physical Design. Meeting the needs of the users is the gold standard against which we measure our success in creating a database.

Using Entity-Relationship Diagrams To Count Data Functions Ian Brown, CFPS Booz Allen Hamilton 8283 Greensboro Dr. McLean, VA USA

Excel 2003, MS Access 2003, FileMaker Pro 8. Which One Should I Use?

Unit 2.1. Data Analysis 1 - V Data Analysis 1. Dr Gordon Russell, Napier University

Technology in Action. Alan Evans Kendall Martin Mary Anne Poatsy. Eleventh Edition. Copyright 2015 Pearson Education, Inc.

PATIENT(PatientID, PatName, PatientDOB, PatientDiagnosis, PatientPhone, PatientReferID)

DbSchema Tutorial with Introduction in SQL Databases

Topic: Relationships in ER Diagram and Relationships in MS Access

A brief overview of developing a conceptual data model as the first step in creating a relational database.

XV. The Entity-Relationship Model

DESIGNING A LOGICAL DATA MODEL FOR A SALES AND INVENTORY MANAGEMENT SYSTEM

A Tutorial on Quality Assurance of Data Models 1. QA of Data Models. Barry Williams. tutorial_qa_of_models.doc Page 1 of 17 31/12/ :18:36

Connecting Customer Relationship Management Systems to Social Networks

Fundamentals of Database Design

Electronic Data Solutions. E-Prescription System Software Requirement Specifications. Version 1.0

Doing database design with MySQL

Running a FinCEN 314(a) Scan Against Your CU*BASE Database

Capturing Database Transformations for Big Data Analytics

Lecture Notes INFORMATION RESOURCES

Lab 9 Access PreLab Copy the prelab folder, Lab09 PreLab9_Access_intro

Understanding the Database Design Process

Course Title: Microsoft Access Basic Duration: 12 hours

Data Modeling. Database Systems: The Complete Book Ch ,

DESIGN, IMPLEMENTATION, AND MANAGEMENT DO NOT COPY PETER ROB CARLOS CORONEL

Welcome to the Data Analytics Toolkit PowerPoint presentation on EHR architecture and meaningful use.

IV. The (Extended) Entity-Relationship Model

Data Modelling And Normalisation

Developing Web Applications for Microsoft SQL Server Databases - What you need to know

Relational Databases and Microsoft Access. Ron McFadyen

Chapter 9: Normalization

The E-R èentity-relationshipè data model views the real world as a set of basic objects èentitiesè and

Developing Entity Relationship Diagrams (ERDs)

DATABASE MANAGEMENT SYSTEMS. Question Bank:

AS LEVEL Computer Application Databases

Once the schema has been designed, it can be implemented in the RDBMS.

In-Depth Guide Database Basics Creating and Populating

AVOIDANCE OF CYCLICAL REFERENCE OF FOREIGN KEYS IN DATA MODELING USING THE ENTITY-RELATIONSHIP MODEL

Database Design Process. ER Model. Goals. Relational Model. SQL - The Language of Databases. IT420: Database Management and Organization

2 Conceptual Database Design 2.1 Requirement analysis 2.2 Modeling languages. Terminology. Requirements: Case study. Requirements

Transcription:

An Example: Video Rental System Video Rental Database Customers Rentals Videos

E-R Analysis

ERD Example CUSTOMER PRODUCER

E-R Analysis

Attributes Attribute - property or characteristic of an entity type Classifications of attributes: Required versus Optional Attributes Simple versus Composite Attribute (e.g. name) Single-Valued versus Multi-valued Attribute (e.g Qualifications) Stored versus Derived Attributes (e.g Age & DoB) Identifier Attributes Identifier - An attribute (or combination of attributes) that uniquely identifies individual instances of an entity type Simple Key versus Composite Key

ERD Example Title FIrstName LastName MovieID Duration CustomerID Address Rating CUSTOMER BirthDate PhoneNumber PRODUCER CompanyID CompanyName Country

E-R Analysis

Relationships Relationship Types vs. Relationship Instances The relationship type is modelled as the diamond and lines between entity types the instance is between specific entity instances Relationships can have attributes These describe features pertaining to the association between the entities in the relationship Two entities can have more than one type of relationship between them (multiple relationships) Associative Entity combination of relationship and entity

ERD Example Title FIrstName LastName MovieID Duration CustomerID Address Rating rent CUSTOMER directed Date_Rented Due_Date BirthDate PhoneNumber PRODUCER companyid CompanyName Country

E-R Analysis

Cardinality of Relationships One-to-One Each entity in the relationship will have exactly one related entity One-to-Many An entity on one side of the relationship can have many related entities, but an entity on the other side will have a maximum of one related entity Many-to-Many Entities on both sides of the relationship can have many related entities on the other side

ERD Example Title FIrstName LastName MovieID Duration CustomerID Address Rating rent CUSTOMER directed Date_Rented Due_Date BirthDate PhoneNumber PRODUCER CompanyID CompanyName Country

E-R Analysis

ERD Example Title FIrstName LastName MovieID Duration CustomerID Address Rating rent CUSTOMER directed Date_Rented Due_Date BirthDate PhoneNumber PRODUCER CompanyID CompanyName Country

Mapping Rules (Simplified) Map Regular Entities Map Binary Relationships One-to-many Relationships Many-to-many relationships

Mapping Regular Entities Title MovieID Duration Rating MovieID Title Duration Rating

Mapping One-to-many relationships Title MovieID Duration Rating MovieID Title Rating Rating DirectorID directed PRODUCERR CompanyID CompanyName Country PRODUCER CompanyID CompanyName Country

Mapping Many-to-many relationships Title FIrstName LastName MovieID Duration CustomerID Address Rating rent CUSTOMER Date_Rented Due_Date BirthDate PhoneNumber MovieID Title Rating Duration RENTAL MovieID CustomerID Due_Rented Due_Date CUSTOMER CustomerID FName LName Address DoB Phone

Final Map PRODUCERR CompanyID CompanyName Country MovieID Title Rating Audience CompanyID RENTAL MovieID CustomerID Due_Rented Due_Date CUSTOMER CustomerID FName LName Address DoB Phone

Resulting 4 Tables RENTAL CUSTOMER CustomerID(PK) FName LName Address Phone DoB CustomerID (FK) MovieID (FK) Date_Rented Date_Due MovieID (PK) Title Audience Duration DirectorID (FK) PROCUER CompnayID (PK) CompanyName Country Any problems with Rental Table?

Metadata for Customer Customer FirstName Character 30 First name LastName Character 30 Last name Address Character 60 Location PhoneNumber Character 10 Telephone BirthDate Date DD-MM-YY CustomerID Character 8 Unique ID