# Chapter 4 Logical Database Design and the Relational Model. Objectives

Save this PDF as:

Size: px
Start display at page:

## Transcription

1 Chapter 4 Logical Database Design and the Relational Model 1 Objectives Define terms for the relational data model Transform EE-R diagrams to relations Create tables with entity and relational integrity constraints 2 1

2 Steps in Database Problem Solving Study and Analyze w/team Interviews & Integrated Model Transformation (Six Cases) Normalization (Three Steps) Business Problem Conceptual Model (EE-R) Logical Model (Relations) Logical Model (3NF Relations) IMPLEMENTATION 3 Logical Model: Relational Model Can represent all kinds of information Based on Math (relations) Natural to people Relatively simple We know how to implement it fast 4 2

3 Components of Relational Model Data structure Tables (relations), rows, columns Data manipulation Powerful SQL operations for retrieving and modifying data Data integrity Mechanisms for implementing business rules that maintain integrity of manipulated data 5 Motivating Example Make a list of students in the class, keeping their ID, name and phone number 6 3

4 Motivating Example Make a list of students in the class, keeping their ID, name and phone number You d probably come up with something like this: ID Name Phone xx Mike 111 yy Elisa 222 Tuple (Record, Row) This is the basic structure of the relational model, a table or relation 7 Extra Assumptions You would not repeat the same row twice No two rows have the same ID, but they may have the same name and phone number ID Name Phone xx Mike 111 yy Elisa 222 SET (no duplicates) ID would be the PRIMARY KEY (PK). 8 4

5 Now add s (many!) Now you need to add the s of each student, but you do not know how many s Can you come up with a solution? Try it 9 Many Fields Could come up with something like this ID Name Phone xx Mike 111 bad idea J yy Elisa 222 bad idea J Above would not work very well. How many fields? Wasted space What if a student has more s? How to access the s? 10 5

6 Un-Normalized Could also try this: ID Name Phone xx Mike 111 xx Mike 111 yy Elisa 222 Problem is duplication, we are repeating the name and phone number in the second row What if Mike changes his phone? Later we will study normalization to solve this. 11 Now add s (many!) A much better way: Student ID Name Phone xx Mike 111 yy Elisa 222 StudentID xx xx yy Every StudentID on the second table needs a matching ID on the first table: StudentID is a FOREIGN KEY In a way, StudentID in the second table is a pointer or reference to the first table 12 6

7 Formalizing: Relations Definition: A relation is a named table of data Table is made up of rows (records or tuples), and columns (attributes or fields) Requirements for a table to be a relation: 1. Has a unique name. 2. Every attribute value is atomic (not multivalued or composite) 3. Every row is unique 4. Attributes (columns) in tables have unique names 5. The order of the columns is irrelevant 6. The order of the rows is irrelevant By definition, all relations are in 1 st Normal Form (1NF). 13 Correspondence with ER Model Relations (tables) correspond to entity types and to many-to-many relationship types Rows correspond to entity instances and to many-tomany relationship instances Columns correspond to attributes NOTE: The word relation (in relational database) is NOT the same as the word relationship (in ER model) 14 7

8 Formalizing Key Fields Primary key (PK) Minimal set of attributes that uniquely identifies a row, chosen for referencing This is how we can guarantee that all rows are unique Foreign key (FK) Set of attributes in a table that serves as a reference to the primary key of another table Keys can be simple or composite Used as indexes to speed up queries 15 Figure 4-3 Schema for four relations (Pine Valley Furniture Company) Primary Key Foreign Key (implements 1:M relationship between CUSTOMER and ORDER) Combined, these are a composite primary key (uniquely identifies the order line) individually they are foreign keys (implement M:N relationship between ORDER and PRODUCT) 16 8

9 Key Constraints Entity Integrity Constraint No attribute of the PK may be null Referential Integrity Constraint For a FK, either all attributes are null, or the values appear in the PK of a row of the referred table 17 Figure 4-5 Referential integrity constraints (Pine Valley Furniture) Referential integrity constraints are drawn via arrows from dependent to parent table 18 9

10 Figure 4-6 SQL table definitions Referential integrity constraints are implemented with foreign key to primary key references. 19 Key Constraints Example Delete Rules Restrict don t allow delete of parent side if related rows exist in dependent side Cascade automatically delete dependent side rows that correspond with the parent side row to be deleted Set-to-Null set the foreign key in the dependent side to null if deleting from the parent side à not allowed for weak entities 20 10

11 From E-R Diagrams to Relations (Tables) 21 Transforming E-R Into Relations Use a rectangle for each entity (table), with attributes inside rectangles, too Can be vertical or horizontal Primary key is underlined Use arrows from Foreign key to Primary key Student Student ID Name Phone ID StudentID Name Phone StudentID

12 E-R vs. Relational Entities are represented by tables But tables may also represent relationships, or multivalued attributes Foreign Keys used to relate table rows Similar to relationships in E-R, but lower level Relational model is more concrete, lower level Usually many more tables than entities Harder to understand by non-technical people Directly implementable 23 Six Cases of Transforming E-R Diagrams into Relations 1. Map Regular Entities 2. Map Binary Relationships 3. Map Weak Entities 4. Map Associative Entities 5. Map Unary Relationships 6. Map Ternary (and n-ary) Relationships 24 12

13 1. Mapping Regular Entities Create a new table for each entity Remember to underline the identifier For composite attributes, map only the basic pieces Derived attributes disappear For multivalued attributes we need a new table We may need to create several tables for independent multivalued attributes Employee SSN SSN EMPLOYEE SSN Name (First, Middle, Last) { s} Date of Birth [Age] First Middle Last DoB 25 You Try BOOK ISBN Title {Authors} Format (Binding, NumPages, Dimensions, [Weight]) 26 13

14 Six Cases of Transforming E-R Diagrams into Relations 1. Map Regular Entities 2. Map Binary Relationships 3. Map Weak Entities 4. Map Associative Entities 5. Map Unary Relationships 6. Map Ternary (and n-ary) Relationships 29 Mapping Binary Relationships One-to-Many Primary key on the one side becomes a foreign key on the many side (Fig. 4-12). One-to-One Primary key on the mandatory side becomes a foreign key on the optional side (Fig. 4-14). Many-to-Many Create a new relation with the primary keys of the two entities as its primary key (Fig. 4-13)

15 Fig. 4-12: Example of mapping a 1:M relationship (a) Relationship between customers and orders Note the mandatory one Fig. 4-12: (b) Mapping the relationship [Primary key on the one side becomes a foreign key on the many side] Foreign key Again, no null value in the foreign key this is because of the mandatory minimum cardinality 31 You Try 1:M Relationship STUDENT ID Name Majors in >0 0 PROGRAM ID Name 32 15

16 Figure 4-14 Example of mapping a binary 1:1 relationship Often in 1:1 relationships, one direction is optional. Foreign key goes in the relation on the optional side, matching the primary key on the mandatory side 34 Many-to-Many Relationship STUDENT ID Name Majors in >0 PROGRAM 0< ID Name Student Program ID Name ID Name MajorsIn Student Program For a many-to-many, we need a new table representing the relationship. This table has Foreign Keys to both entities

17 Figure 4-13 Example of mapping an M:N relationship a) Completes relationship (M:N) The Completes relationship will need to become a separate relation 36 Figure 4-13 Example of mapping an M:N relationship (cont.) b) Three resulting relations Composite primary key (CPK) Foreign key Foreign key 37 17

18 You Try PERSON ID Name > Is Citizen 0< COUNTRY ID Name 38 Six Cases of Transforming E-R Diagrams into Relations 1. Map Regular Entities 2. Map Binary Relationships 3. Map Weak Entities 4. Map Associative Entities 5. Map Unary Relationships 6. Map Ternary (and n-ary) Relationships 40 18

19 3. Mapping Weak Entities A weak entity becomes a separate relation with a foreign key taken from the strong entity Primary key composed of: Partial identifier of weak entity Primary key of identifying relation (strong entity) 41 Weak Entities EMPLOYEE SSN Name Has 0< DEPENDENT Name Date of Birth Employee SSN Name Dependent Employee Name DoB Transform the strong entity normally For the weak entity, the PK becomes the identifier, plus the PK of the identifying entity 42 19

20 You Try BOOK ISBN Title Edition Has 0< CHAPTER Number Title 43 Six Cases of Transforming E-R Diagrams into Relations 1. Map Regular Entities 2. Map Binary Relationships 3. Map Weak Entities 4. Map Associative Entities 5. Map Unary Relationships 6. Map Ternary (and n-ary) Relationships 45 20

21 4. Mapping Associative Entities Identifier Not Assigned Default primary key for the association relation is composed of the primary keys of the two entities (as in M:N relationship) Identifier Assigned It is natural and familiar to end-users Default identifier may not be unique 46 Figure 4-15: Mapping an associative entity (a) Associative entity (ORDER LINE) [Default primary key for the association relation is NOT assigned] Composite primary key formed from the two foreign keys/ 47 21

22 Figure 4-16: Mapping an associative entity (a) Associative entity (SHIPMENT) [Default primary key for the association relation is assigned] (b) Three resulting relations Primary key differs from foreign keys 48 You Try

23 Six Cases of Transforming E-R Diagrams into Relations 1. Map Regular Entities 2. Map Binary Relationships 3. Map Weak Entities 4. Map Associative Entities 5. Map Unary Relationships 6. Map Ternary (and n-ary) Relationships Mapping Unary Relationships Same as other relationships, except that the FK may go to the same table. For one-to-many, the table has a reference to other rows of the same table. For many-to-many, an extra table has two FKs, both to the same table (Fig. 4-18)

24 Figure 4-17 Mapping a unary 1:N relationship (a) EMPLOYEE entity with unary relationship A recursive FK is a FK in a relation that references the PK values of that same relation. (b) EMPLOYEE relation with recursive foreign key 53 (a) Bill-ofmaterials relationships (M:N) Figure 4-18: Mapping a unary M:N relationship One table for the entity type. (b) ITEM and COMPONENT relations One table for an associative relation in which the primary key has two attributes, both taken from the primary key of the entity

25 You Try 1:M Unary EMPLOYEE SSN Name Worker >0 0 Boss Supervises 55 IsCorequisite You Try M:N Unary >0 Required COURSE ID Name Post >0 Requirer >0 Pre >0 IsPrerequisite 57 25

26 Six Cases of Transforming E-R Diagrams into Relations 1. Map Regular Entities 2. Map Binary Relationships 3. Map Weak Entities 4. Map Associative Entities 5. Map Unary Relationships 6. Map Ternary (and n-ary) Relationships Mapping Ternary Relationships One relation for each entity and one for the associative entity. Associative entity has foreign keys to each entity in the relationship 60 26

27 Figure 4-19 Mapping a ternary relationship a) PATIENT TREATMENT Ternary relationship with associative entity 61 Figure 4-19 Mapping a ternary relationship (cont.) b) Mapping the ternary relationship PATIENT TREATMENT Remember that the primary key MUST be unique. This is why treatment date and time are included in the composite primary key. But this makes a very cumbersome key It would be better to create a surrogate key like Treatment#. (A patient may receive a treatment once in the morning, then the same treatment in the afternoon.) 62 27

28 From EE-R Diagrams to Relations (Tables) 63 EE-R to Relations Mapping Supertype/Subtype Relationships One relation for supertype and for each subtype Supertype attributes (including identifier and subtype discriminator) go into supertype relation Subtype attributes go into each subtype; primary key of supertype relation also becomes primary key of subtype relation 1:1 relationship established between supertype and each subtype, with supertype as primary table 64 28

29 Figure 4-20 Supertype/subtype relationship 65 Figure 4-21 Mapping supertype/subtype relationships to relations These are implemented as one-to-one relationships

30 Relational Model Practice Exercises 67 TV SERIES ID Title #1 Has 0< EPISODE Number Title FirstAiring Date 68 30

31 #2 COURSE ID Name SECTION Belongs SecNo 0< Term(Semester, Year) Teaches >0 TEACHER SSN Name 70 #

32 Next Topic Next topic is considered the most important theory in database management. What is it? Normalization 74 Table 4-6: Preview of Normalization Below is a list of parking tickets issued by the Public Safety office to vehicles parked illegally on campus. How would you organize such data into relations? 75 32

### Chapter 5: Logical Database Design and the Relational Model Part 1: Transforming EER Diagrams into Relations Modern Database Management 6 th Edition

Chapter 5: Logical Database Design and the Relational Model Part 1: into Relations Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B. Prescott, Fred R. McFadden Robert C. Nickerson ISYS

### Modern Systems Analysis and Design

Modern Systems Analysis and Design Prof. David Gadish Structuring System Data Requirements Learning Objectives Concisely define each of the following key data modeling terms: entity type, attribute, multivalued

### Mapping an ERD to a Relational Database

Mapping an ERD to a Relational Database We use E/R Modeling to understand the informational needs of a system. Once the model is satisfactory, we then implement our design in a relational database. In

### Reducing ER Schema to Relational Schema

Reducing ER Schema to Relational Schema Excerpt from Chapter 3, Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 1 Logical DB Design: ER to Relational Entity sets to tables: ssn name Employees

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

Database Design Overview Conceptual Design. The Entity-Relationship (ER) Model CS430/630 Lecture 12 Conceptual design The Entity-Relationship (ER) Model, UML High-level, close to human thinking Semantic

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

Database Design Process there are six stages in the design of a database: 1. requirement analysis 2. conceptual database design 3. choice of the DBMS 4. data model mapping 5. physical design 6. implementation

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

Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model Copyright 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Outline Using High-Level Conceptual Data Models for

### Database Design Process

Entity-Relationship Model Chapter 3, Part 1 Database Design Process Requirements analysis Conceptual design data model Logical design Schema refinement: Normalization Physical tuning 1 Problem: University

### Database Design and the Entity-Relationship Model

Database Design and the Entity-Relationship Model Computer Science 460/660 Boston University Fall 2013 David G. Sullivan, Ph.D. Database Design In database design, we determine: which data fields to include

### Data Modeling. Database Systems: The Complete Book Ch. 4.1-4.5, 7.1-7.4

Data Modeling Database Systems: The Complete Book Ch. 4.1-4.5, 7.1-7.4 Data Modeling Schema: The structure of the data Structured Data: Relational, XML-DTD, etc Unstructured Data: CSV, JSON But where does

### Database Design Process

Database Design Process Entity-Relationship Model From Chapter 5, Kroenke book Requirements analysis Conceptual design data model Logical design Schema refinement: Normalization Physical tuning Problem:

### ETEC 2601 Database Systems

ETEC 2601 Database Systems Chapter 5: Data Modeling With The Entity-Relationship Model Copyright 2004-2010 J. B. Gallaher The Data Model The design of a database Is the way the user conceives the information

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

Concepts of Database Management Seventh Edition Chapter 6 Database Design 2: Design Method Objectives Discuss the general process and goals of database design Define user views and explain their function

### Chapter 5: Logical Database Design and the Relational Model Part 2: Normalization. Introduction to Normalization. Normal Forms.

Chapter 5: Logical Database Design and the Relational Model Part 2: Normalization Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B. Prescott, Fred R. McFadden Robert C. Nickerson ISYS

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

Marta Jakubowska-Sobczak IT/ADC based on slides prepared by Paula Figueiredo, IT/DB Outline Database concepts Conceptual Design Logical Design Communicating with the RDBMS 2 Some concepts Database: an

### Entity-Relationship Model

UNIT -2 Entity-Relationship Model Introduction to ER Model ER model is represents real world situations using concepts, which are commonly used by people. It allows defining a representation of the real

### Lecture 12: Entity Relationship Modelling

Lecture 12: Entity Relationship Modelling The Entity-Relationship Model Entities Relationships Attributes Constraining the instances Cardinalities Identifiers Generalization 2004-5 Steve Easterbrook. This

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

COMP 378 Database Systems Notes for Chapter 7 of Database System Concepts Database Design and the Entity-Relationship Model The entity-relationship (E-R) model is a a data model in which information stored

### Component 4: Introduction to Information and Computer Science

Component 4: Introduction to Information and Computer Science Unit 6: Databases and SQL Lecture 2 This material was developed by Oregon Health & Science University, funded by the Department of Health and

### Lecture 6. SQL, Logical DB Design

Lecture 6 SQL, Logical DB Design Relational Query Languages A major strength of the relational model: supports simple, powerful querying of data. Queries can be written intuitively, and the DBMS is responsible

### CSCD43: Database Systems Technology. Lecture 2

Lecture 2 Wael Aboulsaadat Acknowledgment: these slides are based on Prof. Garcia-Molina & Prof. Ullman slides accompanying the course s textbook. Steps in Database Design Conceptual Design Logical Design

### Concepts of Database Management, Fifth Edition. Chapter 6: Database Design 2: Design Methodology

Concepts of Database Management, Fifth Edition Chapter 6: Database Design 2: Design Methodology Objectives Discuss the general process and goals of database design Define user views and explain their function

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

Chapter 3 Data Modeling Using the Entity-Relationship (ER) Model Chapter Outline Overview of Database Design Process Example Database Application (COMPANY) ER Model Concepts Entities and Attributes Entity

### Constraints in ER Models. Types of Constraints. Keys. CS 317, Fall 2007

Constraints in ER Models CS 317, Fall 2007 Types of Constraints Keys are attributes or sets of attributes that uniquely identify an entity within its entity set. Single-value constraints require that a

### Systems Analysis and Design

Systems Analysis and Design Slides adapted from Jeffrey A. Hoffer, University of Dayton Joey F. George, Florida State University Joseph S. Valacich, Washington State University Modern Systems Analysis

### Conceptual Design: Entity Relationship Models. Objectives. Overview

Conceptual Design: Entity Relationship Models Craig Van Slyke, University of Central Florida cvanslyke@bus.ucf.edu John Day, Ohio University Objectives Define terms related to entity relationship modeling,

### Database Design. October 24, 2008. Database Design

October 24, 2008 Outline E-R diagrams Represent logical structure simply, clearly Rectangles: entity sets Ellipses: attributes Diamonds: relationship sets Lines: linking elements Double ellipse: multi-valued

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

The Relational Model Chapter 3 Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 1 Why Study the Relational Model? Most widely used model. Vendors: IBM, Informix, Microsoft, Oracle, Sybase,

### HNDIT 1105 Database Management Systems

HNDIT 1105 Database Management Systems Lesson 02: Database Design Process & ER Diagrams By S. Sabraz Nawaz M.Sc. In IS (SLIIT), PGD in IS (SLIIT), BBA (Hons.) Spl. in IS (SEUSL), MIEEE, MAIS Senior Lecturer

### Entity-Relationship (ER) Model

ER Design (1) Entity-Relationship (ER) Model Elements in a database: data entries Data entries represent Entities: data objects, e.g., students, courses, and instructors Relationships among entities: students

### Foundations of Information Management

Foundations of Information Management - WS 2012/13 - Juniorprofessor Alexander Markowetz Bonn Aachen International Center for Information Technology (B-IT) Data & Databases Data: Simple information Database:

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

Chapter 2: Entity-Relationship Model! Entity Sets! Relationship Sets! Design Issues! Mapping Constraints! Keys! E-R Diagram! Extended E-R Features! Design of an E-R Database Schema! Reduction of an E-R

### Entity-Relationship Model. Modeling. Entity-Relationship Model. How do we design the database for an application?

How do we design the database for an application? Entity-Relationship Model Dr. McNamara CSCI 371 Databases Fall 2006 1. Conceptual Design: Analyze the problem. Identify the entities, relationships, and

### Mapping Data Models to a Relational Database

Mapping Data Models to a Relational Database Time to dovetail two prior topics: data modeling (E-R, UML) and the relational data model (structure, algebra) To recap, this is how they relate: The data model

### DATABASE INTRODUCTION

Introduction The history of database system research is one of exceptional productivity and startling economic impact. We have learnt that from the days of file-based systems there are better ways to handle

### XV. The Entity-Relationship Model

XV. The Entity-Relationship Model The Entity-Relationship Model Entities, Relationships and Attributes Cardinalities, Identifiers and Generalization Documentation of E-R Diagrams and Business Rules The

### Review: Participation Constraints

Review: Participation Constraints Does every department have a manager? If so, this is a participation constraint: the participation of Departments in Manages is said to be total (vs. partial). Every did

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

THE ENTITY- RELATIONSHIP (ER) MODEL CHAPTER 7 (6/E) CHAPTER 3 (5/E) 2 LECTURE OUTLINE Using High-Level, Conceptual Data Models for Database Design Entity-Relationship (ER) model Popular high-level conceptual

### Chapter 6: Physical Database Design and Performance. Database Development Process. Physical Design Process. Physical Database Design

Chapter 6: Physical Database Design and Performance Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B. Prescott, Fred R. McFadden Robert C. Nickerson ISYS 464 Spring 2003 Topic 23 Database

### The Entity-Relationship Model

The Entity-Relationship Model 221 After completing this chapter, you should be able to explain the three phases of database design, Why are multiple phases useful? evaluate the significance of the Entity-Relationship

### DATABASE MANAGEMENT SYSTEMS. Question Bank:

DATABASE MANAGEMENT SYSTEMS Question Bank: UNIT 1 1. Define Database? 2. What is a DBMS? 3. What is the need for database systems? 4. Define tupule? 5. What are the responsibilities of DBA? 6. Define schema?

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

Data Modeling Windows Enterprise Support Database Services provides the following documentation about relational database design, the relational database model, and relational database software. Introduction

### Unit 2.1. Data Analysis 1 - V2.0 1. Data Analysis 1. Dr Gordon Russell, Copyright @ Napier University

Data Analysis 1 Unit 2.1 Data Analysis 1 - V2.0 1 Entity Relationship Modelling Overview Database Analysis Life Cycle Components of an Entity Relationship Diagram What is a relationship? Entities, attributes,

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

1 Topics for this week: 1. Good Design 2. Functional Dependencies 3. Normalization Readings for this week: 1. E&N, Ch. 10.1-10.6; 12.2 2. Quickstart, Ch. 3 3. Complete the tutorial at http://sqlcourse2.com/

### Data Model ing Essentials

Data Model ing Essentials Third Edition Graeme C. Simsion and Graham C. Witt MORGAN KAUFMANN PUBLISHERS AN IMPRINT OF ELSEVIER AMSTERDAM BOSTON LONDON NEW YORK OXFORD PARIS SAN DIEGO SAN FRANCISCO SINGAPORE

### Basic Database Concepts

Tore Risch Uppsala University, Sweden UDBL Basic Database Concepts What is a database? A database is a collection of related data stored in a computer managed by a DBMS. What is a DBMS, Database Management

### IT2305 Database Systems I (Compulsory)

Database Systems I (Compulsory) INTRODUCTION This is one of the 4 modules designed for Semester 2 of Bachelor of Information Technology Degree program. CREDITS: 04 LEARNING OUTCOMES On completion of this

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

Data Modeling: Part 1 Entity Relationship (ER) Model MBA 8473 1 Cognitive Objectives (Module 2) 32. Explain the three-step process of data-driven information system (IS) development 33. Examine the purpose

### 2. Conceptual Modeling using the Entity-Relationship Model

ECS-165A WQ 11 15 Contents 2. Conceptual Modeling using the Entity-Relationship Model Basic concepts: entities and entity types, attributes and keys, relationships and relationship types Entity-Relationship

### The Entity-Relationship Model

The Entity-Relationship Model Chapter 2 Instructor: Vladimir Zadorozhny vladimir@sis.pitt.edu Information Science Program School of Information Sciences, University of Pittsburgh 1 Database: a Set of Relations

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

Process Databases - Entity-Relationship Modelling Ramakrishnan & Gehrke identify six main steps in designing a database Requirements Analysis Conceptual Design Logical Design Schema Refinement Physical

### Entity - Relationship Modelling

Topic 5 Entity - Relationship Modelling LEARNING OUTCOMES When you have completed this Topic you should be able to: 1. Acquire the basic concepts of the Entity-Relationship (ER) model. 2. Discuss how to

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

Chapter 2: Entity-Relationship Model What s the use of the E-R model? Entity Sets Relationship Sets Design Issues Mapping Constraints Keys E-R Diagram Extended E-R Features Design of an E-R Database Schema

### IT2304: Database Systems 1 (DBS 1)

: Database Systems 1 (DBS 1) (Compulsory) 1. OUTLINE OF SYLLABUS Topic Minimum number of hours Introduction to DBMS 07 Relational Data Model 03 Data manipulation using Relational Algebra 06 Data manipulation

### Fundamentals of Database Design

Fundamentals of Database Design Zornitsa Zaharieva CERN Data Management Section - Controls Group Accelerators and Beams Department /AB-CO-DM/ 23-FEB-2005 Contents : Introduction to Databases : Main Database

### Entity-Relationship Model. Database Modeling (Part 1) Entity. Entity-Relationship Model EMPLOYEE

Entity-Relationship Model Database Modeling (Part 1) A conceptual data model, which is a representation of the structure of a database that is independent of the software that will be used to implement

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

The Relational Model Ramakrishnan&Gehrke, Chapter 3 CS4320 1 Why Study the Relational Model? Most widely used model. Vendors: IBM, Informix, Microsoft, Oracle, Sybase, etc. Legacy systems in older models

### Conceptual Design Using the Entity-Relationship (ER) Model

Conceptual Design Using the Entity-Relationship (ER) Model Module 5, Lectures 1 and 2 Database Management Systems, R. Ramakrishnan 1 Overview of Database Design Conceptual design: (ER Model is used at

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

DATABASE DESIGN - The ability to design databases and associated applications is critical to the success of the modern enterprise. - Database design requires understanding both the operational and business

### DATABASE SCHEMA DESIGN ENTITY-RELATIONSHIP MODEL. CS121: Introduction to Relational Database Systems Fall 2015 Lecture 14

DATABASE SCHEMA DESIGN ENTITY-RELATIONSHIP MODEL CS121: Introduction to Relational Database Systems Fall 2015 Lecture 14 Designing Database Applications 2 Database applications are large and complex A

### Data Analysis 1. SET08104 Database Systems. Copyright @ Napier University

Data Analysis 1 SET08104 Database Systems Copyright @ Napier University Entity Relationship Modelling Overview Database Analysis Life Cycle Components of an Entity Relationship Diagram What is a relationship?

### Databases What the Specification Says

Databases What the Specification Says Describe flat files and relational databases, explaining the differences between them; Design a simple relational database to the third normal form (3NF), using entityrelationship

### Course Notes on From Entity-Relationship Schemas to Relational Schemas

Course Notes on From Entity-Relationship Schemas to Relational Schemas The chapter deals with practical database design: the construction of a relational schema from an E-R schema this stage of database

### Database Management Systems

Database Management Systems Database Design (1) 1 Topics Information Systems Life Cycle Data Base Design Logical Design Physical Design Entity Relationship (ER) Model Entity Relationship Attributes Cardinality

### Introduction to Computing. Lectured by: Dr. Pham Tran Vu t.v.pham@cse.hcmut.edu.vn

Introduction to Computing Lectured by: Dr. Pham Tran Vu t.v.pham@cse.hcmut.edu.vn Databases The Hierarchy of Data Keys and Attributes The Traditional Approach To Data Management Database A collection of

### Lecture Notes INFORMATION RESOURCES

Vilnius Gediminas Technical University Jelena Mamčenko Lecture Notes on INFORMATION RESOURCES Part I Introduction to Dta Modeling and MSAccess Code FMITB02004 Course title Information Resourses Course

### Introduction to normalization. Introduction to normalization

Introduction to normalization Lecture 4 Instructor Anna Sidorova Agenda Presentation Review of relational models, in class exersise Introduction to normalization In-class exercises Discussion of HW2 1

### Lesson 8: Introduction to Databases E-R Data Modeling

Lesson 8: Introduction to Databases E-R Data Modeling Contents Introduction to Databases Abstraction, Schemas, and Views Data Models Database Management System (DBMS) Components Entity Relationship Data

### Database Design for the Uninitiated CDS Brownbag Series CDS

Database Design for the Uninitiated Paul Litwin FHCRC Collaborative Data Services 1 CDS Brownbag Series This is the ninth in a series of seminars Materials for the series can be downloaded from www.deeptraining.com/fhcrc

### Chapter 2: Entity-Relationship Model

Chapter 2: Entity-Relationship Model Entity Sets Relationship Sets Design Issues Mapping Constraints Keys E R Diagram Extended E-R Features Design of an E-R Database Schema Reduction of an E-R Schema to

### Preview DESIGNING DATABASES WITH VISIO PROFESSIONAL: A TUTORIAL

DESIGNING DATABASES WITH VISIO PROFESSIONAL: A TUTORIAL A Microsoft Visio Professional is a powerful database design and modeling tool. The Visio software has so many features that it is impossible to

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

The Entity- Relationship Model R &G - Chapter 2 A relationship, I think, is like a shark, you know? It has to constantly move forward or it dies. And I think what we got on our hands is a dead shark. Woody

### ER modelling, Weak Entities, Class Hierarchies, Aggregation

CS344 Database Management Systems ER modelling, Weak Entities, Class Hierarchies, Aggregation Aug 2 nd - Lecture Notes (Summary) Submitted by - N. Vishnu Teja Saurabh Saxena 09010125 09010145 (Most the

### D.Hemavathi,R.Venkatalakshmi Assistant Professor, SRM University, Kattankulathur

DATABASE SYSTEMS IT 0303 5 TH Semester D.Hemavathi,R.Venkatalakshmi Assistant Professor, SRM University, Kattankulathur School of Computing, Department of IT Unit 2:Entity Relationship Model Disclaimer

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

LiTH, Tekniska högskolan vid Linköpings universitet 1(7) IDA, Institutionen för datavetenskap Juha Takkinen 2007-05-24 1. A database schema is a. the state of the db b. a description of the db using a

### three Entity-Relationship Modeling chapter OVERVIEW CHAPTER

three Entity-Relationship Modeling CHAPTER chapter OVERVIEW 3.1 Introduction 3.2 The Entity-Relationship Model 3.3 Entity 3.4 Attributes 3.5 Relationships 3.6 Degree of a Relationship 3.7 Cardinality of

### CS2Bh: Current Technologies. Introduction to XML and Relational Databases. The Relational Model. The relational model

CS2Bh: Current Technologies Introduction to XML and Relational Databases Spring 2005 The Relational Model CS2 Spring 2005 (LN6) 1 The relational model Proposed by Codd in 1970. It is the dominant data

### Chapter 11. Entity-Relationship Modelling

Chapter 11. Entity-Relationship Modelling Table of Contents Objectives... 1 Introduction... 1 Context... 2 Entities, Attributes and Values... 2 Entities... 2 Attributes... 3 Values... 3 Primary Key Data

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

Converting E-R Diagrams to Relational Model Winter 2006-2007 Lecture 17 E-R Diagrams Need to convert E-R model diagrams to an implementation schema Easy to map E-R diagrams to relational model, and then

### Data Modelling and E-R Diagrams

Data Modelling and E-R Diagrams So far we have considered some of the basic ideas behind relational theory, and we will continue with this in subsequent sections. In this section we look at the processes

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

14 Databases 14.1 Source: Foundations of Computer Science Cengage Learning Objectives After studying this chapter, the student should be able to: Define a database and a database management system (DBMS)

### Relational Schema Design

Relational Schema Design Using ER Methodology to Design Relational Database Schemas The Development Process Collect requirements. Analyze the requirements. Conceptually design the data (e.g., draw an ER

### CSC 742 Database Management Systems

CSC 742 Database Management Systems Topic #4: Data Modeling Spring 2002 CSC 742: DBMS by Dr. Peng Ning 1 Phases of Database Design Requirement Collection/Analysis Functional Requirements Functional Analysis

### www.gr8ambitionz.com

Data Base Management Systems (DBMS) Study Material (Objective Type questions with Answers) Shared by Akhil Arora Powered by www. your A to Z competitive exam guide Database Objective type questions Q.1

### Database Design and the ER model

Database Design and the ER model 1. Database design Database design: Description of the data environment An abstraction, driven by anticipated applications Database model: A formalism for specifying database

### TIM 50 - Business Information Systems

TIM 50 - Business Information Systems Lecture 15 UC Santa Cruz March 1, 2015 The Database Approach to Data Management Database: Collection of related files containing records on people, places, or things.

### Tutorial on Relational Database Design

Tutorial on Relational Database Design Introduction Relational database was proposed by Edgar Codd (of IBM Research) around 1969. It has since become the dominant database model for commercial applications

### Databases and BigData

Eduardo Cunha de Almeida eduardo.almeida@uni.lu Outline of the course Introduction Database Systems (E. Almeida) Distributed Hash Tables and P2P (C. Cassagnes) NewSQL (D. Kim and J. Meira) NoSQL (D. Kim)

### Foundations of Information Management

Foundations of Information Management - WS 2009/10 Juniorprofessor Alexander Markowetz Bonn Aachen International Center for Information Technology (B-IT) Alexander Markowetz Born 1976 in Brussels, Belgium

### The Entity-Relationship Model. Steps in Database Design

The Entity-Relationship Model Steps in Database Design 1) Requirement Analysis Identify the data that needs to be stored data requirements Identify the operations that need to be executed on the data functional

### AS LEVEL Computer Application Databases

AS LEVEL Computer Application Databases YLLSS In the syllabus, we have Applications of databases in society Students should be aware of the uses and applications of databases in everyday life (e.g. the

### Data Modeling. Relationships within the Relational Database:

Data Modeling Relationships within the Relational Database: A relationship describes association among entities. For example, a relationship exists between customers and an agent, in that an agent can

### The Entity-Relationship (ER) Model

The Entity-Relationship (ER) Model (Study Cow book Chapter 2) Comp 521 Files and Databases Spring 2010 1 Overview of Database Design Conceptual design: (ER Model is used at this stage.) What are the entities

### CPSC 304 Introduction to Database Systems

CPSC 304 Introduction to Database Systems Conceptual Database Design The Entity-Relationship Model Textbook Reference Database Management Systems: Chapter 2 Hassan Khosravi Borrowing many slides from Rachel

### Database Design. Adrienne Watt. Port Moody

Database Design Database Design Adrienne Watt Port Moody Except for third party materials and otherwise stated, content on this site is made available under a Creative Commons Attribution 2.5 Canada License.

### 7.1 The Information system

Chapter 7. Database Planning, Design and Administration Last few decades have seen proliferation of software applications, many requiring constant maintenance involving: correcting faults, implementing

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

Database Design Database Design I: The Entity-Relationship Model Chapter 4 Goal: specification of database schema Methodology: Use E-R R model to get a high-level graphical view of essential components

### A Tool for Generating Relational Database Schema from EER Diagram

A Tool for Generating Relational Schema from EER Diagram Lisa Simasatitkul and Taratip Suwannasart Abstract design is an important activity in software development. EER diagram is one of diagrams, which