CS275 Intro to Databases

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

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

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

Database Design Overview. Conceptual Design ER Model. Entities and Entity Sets. Entity Set Representation. Keys

DATABASE DESIGN. - Developing database and information systems is performed using a development lifecycle, which consists of a series of steps.

CHAPTER 3: DATA MODELING USING THE ENTITY-RELATIONSHIP MODEL

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

Entity-Relationship Model

2. Conceptual Modeling using the Entity-Relationship Model

Foundations of Information Management

COMP 378 Database Systems Notes for Chapter 7 of Database System Concepts Database Design and the Entity-Relationship Model

Introduction to Database Systems CS4320/CS5320. CS4320/4321: Introduction to Database Systems. CS4320/4321: Introduction to Database Systems

CSC 742 Database Management Systems

Database Design. Database Design I: The Entity-Relationship Model. Entity Type (con t) Chapter 4. Entity: an object that is involved in the enterprise

The Entity-Relationship Model

Databases Model the Real World. The Entity- Relationship Model. Conceptual Design. Steps in Database Design. ER Model Basics. ER Model Basics (Contd.

three Entity-Relationship Modeling chapter OVERVIEW CHAPTER

IV. The (Extended) Entity-Relationship Model

Data Analysis 1. SET08104 Database Systems. Napier University

Foundations of Information Management

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

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

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

The Entity-Relationship Model

ER modelling, Weak Entities, Class Hierarchies, Aggregation

Conceptual Design Using the Entity-Relationship (ER) Model

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

ER & EER to Relational Mapping. Chapter 9 1

The Entity-Relationship Model

Database Systems. Session 3 Main Theme. Enterprise Data Modeling Using The Entity/Relationship (ER) Model. Dr. Jean-Claude Franchitti

Databases and BigData

Entity Relationship Diagram

Database Design Process

Database Management Systems

XV. The Entity-Relationship Model

Database Design Process

Review: Participation Constraints

Data Modeling: Part 1. Entity Relationship (ER) Model

Exercise 1: Relational Model

Chapter 2: Entity-Relationship Model

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

Database Design. Goal: specification of database schema Methodology: E-R Model is viewed as a set of

CS 4604: Introduc0on to Database Management Systems. B. Aditya Prakash Lecture #5: En-ty/Rela-onal Models- - - Part 1

Outline. Data Modeling. Conceptual Design. ER Model Basics: Entities. ER Model Basics: Relationships. Ternary Relationships. Yanlei Diao UMass Amherst

CSCI-GA Database Systems Lecture 7: Schema Refinement and Normalization

Lesson 8: Introduction to Databases E-R Data Modeling

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

Entity-Relationship Model. Purpose of E/R Model. Entity Sets

Lecture 6. SQL, Logical DB Design

7.1 The Information system

The Relational Model. Why Study the Relational Model? Relational Database: Definitions

Data Modeling. Database Systems: The Complete Book Ch ,

Part 7: Object Oriented Databases

Review Entity-Relationship Diagrams and the Relational Model. Data Models. Review. Why Study the Relational Model? Steps in Database Design

The Relational Model. Ramakrishnan&Gehrke, Chapter 3 CS4320 1

RELATIONSHIP STRENGTH

Database Design Process. Databases - Entity-Relationship Modelling. Requirements Analysis. Database Design

Modern Systems Analysis and Design

LOGICAL DATABASE DESIGN

The Relational Model. Why Study the Relational Model? Relational Database: Definitions. Chapter 3

OVERVIEW 1.1 DATABASE MANAGEMENT SYSTEM (DBMS) DEFINITION:-

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

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

CPS352 Database Systems: Design Project


CS 377 Database Systems. Database Design Theory and Normalization. Li Xiong Department of Mathematics and Computer Science Emory University

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

LiTH, Tekniska högskolan vid Linköpings universitet 1(7) IDA, Institutionen för datavetenskap Juha Takkinen

There are five fields or columns, with names and types as shown above.

Database Design Methodology

LANGSTON UNIVERSITY PUBLIC HEALTH PROGRAM. SCHOOL OF NURSING AND HEALTH PROFESSIONS Langston, Oklahoma APPLICATION PACKET

Designing Databases. Introduction

Lecture 12: Entity Relationship Modelling

Data Modeling with Entity-Relationship Diagrams

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

Use a high-level conceptual data model (ER Model). Identify objects of interest (entities) and relationships between these objects

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

IT2305 Database Systems I (Compulsory)

Normalization in OODB Design

Entity - Relationship Modelling

Database Design. Adrienne Watt. Port Moody

14 Databases. Source: Foundations of Computer Science Cengage Learning. Objectives After studying this chapter, the student should be able to:

SQL DDL. DBS Database Systems Designing Relational Databases. Inclusion Constraints. Key Constraints

10CS54: DATABASE MANAGEMENT SYSTEM

DataBase Management Systems Lecture Notes

CSC 443 Data Base Management Systems. Basic SQL

Overview. Table of Contents. SA Data Warehouse

Chapter 1: Introduction. Database Management System (DBMS) University Database Example

Database Design and the E-R Model

Entity/Relationship Modelling. Database Systems Lecture 4 Natasha Alechina

Information Systems Modelling Information Systems I: Databases

VIEWS virtual relation data duplication consistency problems

Database Design Methodology

Database Design Methodologies

Conceptual Design: Entity Relationship Models. Objectives. Overview

Database System Concepts

IT2304: Database Systems 1 (DBS 1)

CMPT 354 Database Systems. Simon Fraser University Summer Instructor: Oliver Schulte

A technical discussion on modeling with UML 06/11/03 Entity Relationship Modeling with UML

Transcription:

CS275 Intro to Databases ER Diagrams Chap. 7 Using High Level Conceptual Data Models for Database Design Requirements collection and analysis Database designers interview prospective database users to understand and document data requirements Result: data requirements Functional requirements of the application Using High Level Conceptual Data Models (cont d.) Conceptual schema Conceptual design Description of data requirements Includes detailed descriptions of the entity types, relationships, and constraints Transformed from high level data model into implementation data model

ER Model is a popular high level conceptual data model It is also frequently used for the conceptual design of database applications Many database design tools employ its concepts ER diagrams are diagrammatic notations associated with ER models An entity is a thing in the real world with an independent existence Attributes of an entity describe its properties Composite versus simple (atomic) attributes Single valued versus multivalued attributes Stored versus derived attributes NULL values Complex attributes Relationships 2

Relationships An association b/w at least two entities Descriptive attributes Instance ssn name bdate since did dname budget Works_In Departments Ex. COMPANY Data Requirements The company is organized into departments. Each dept. has a unique name, unique number and a particular employee who manages the dept. We keep track of the start date when that employee began managing the dept. A dept. many have several locations. A dept. controls a number of projects, each of which has a unique name, unique number, and a single location. We store each employee s name, ssn, address, salary, gender, and birth date. An employee is assigned to one dept., but may work on several projects, which are not necessarily controlled by the same dept. We keep track of the current number of hours per week that an employee works on each project. We also keep track of the direct supervisor of each employee (who is another employee). We want to keep track of the dependents of each employee for insurance purposes. We keep each dependent s first name, gender, birth date, and relationship to employee. 3

ER Diagrams, Conventions, & Design Key Attributes An entity type is represented in ER diagrams as a rectangle box Attribute names are enclosed in ovals Key attributes are shown with underlines Number Department Supervisor Locations Initial Conceptual Design of the COMPANY Database 4

A relationship type R among n entity types E,, En defined a relationship set Each individual instance is a relationship instance Displayed as diamond shaped boxes in ER diagrams The degree: number of participating entities Cardinality ratios for binary relationship: :N, M:N, : N Works for Department Ternary Relationship Set ssn name bdate since did dname budget Works_In Departments Locations address capacity Roles Relationship Set Roles indicator ssn name bdate Subordinate Supervisor Reports_To 5

Participation constraints Total: every employee must work for a department (employee department work_for) Partial: not every employee manages a department (employee department manage) Works for Department Weak entity types Cannot be identified without an owner entity Has a partial key to identify a record once the owner s key is given Weak entity types can sometimes be represented as complex attributes (multi valued, composite) SSN Dependents Of Relation Dependent ER Diagrams ID Start Date Years Teaching Section ID Room Email Professor teaches N Section N Salary First Part of Last Number Course Topic 6

Attributes of Relationship Types Attributes of : or :N relationship types can be migrated to one entity type For a :N relationship type Relationship attribute can be migrated only to entity type on N side of relationship For M:N relationship types Some attributes may be determined by combination of participating entities Must be specified as relationship attributes ER Modeling Another way of specifying cardinality and participation (min, max) ER Diagrams ID Start Date Years Teaching Section ID Room Email Professor teaches N Section N Salary First Part of Last Number Course Topic 7

ER Diagrams ID Start Date Years Teaching Section ID Room Email Professor (0, N) (, ) teaches Section (, ) Salary First Part of Last (,N) Number Course Topic Class Example: ER diagram for University Database (a) The university keeps track of each student's name, student number, social security number, current address and phone, permanent address and phone, birthdate, sex, class (freshman, sophomore,..., graduate), major department, minor department (if any), and degree program (B.A., B.S.,..., Ph.D.). Some user applications need to refer to the city, state, and zip of the student's permanent address, and to the student's last name. Both social security number and student number have unique values for each student. (b) Each department is described by a name, department code, office number, office phone, and college. Both name and code have unique values for each department. (c) Each course has a course name, description, course number, number of semester hours, level, and offering department. The value of course number is unique for each course. (d) Each section has an instructor, semester, year, course, and section number. The section number distinguishes different sections of the same course that are taught during the same semester/year; its values are, 2, 3,..., up to the number of sections taught during each semester. (e) A grade report has a student, section, letter grade, and numeric grade (0,, 2, 3, 4 for F, D, C, B, A, respectively). 8