A Translation of the One-to-One Relationship for Introductory. Relational Database Courses

Similar documents
Unit 2. Unit 3. Unit 4

15CS53: DATABASE MANAGEMENT SYSTEM

Informatics 1: Data & Analysis

M S Ramaiah Institute of Technology Department of Computer Science And Engineering

Teaching Scheme BIT/MMC/BCS Database Systems 1

A Graphical, Functional-Dependency Preserving Normalization Algorithm for Relational Databases. 1. Abstract. 2. Introduction

Informatics 1: Data & Analysis

ERRDS: A CASE TOOL TO GENERATE AN ER DATA MODEL FROM A RELATIONAL DATABASE SCHEMA

SRM UNIVERSITY FACULTY OF ENGINEERING AND TECHNOLOGY SCHOOL OF COMPUTING DEPARTMENT OF CSE COURSE PLAN

City University of Hong Kong Course Syllabus. offered by Department of Computer Science with effect from Semester A 2017/18

Deccan Education Society s FERGUSSON COLLEGE, PUNE (AUTONOMOUS) SYLLABUS UNDER AUTONOMY. FIRST YEAR B.Sc. COMPUTER SCIENCE SEMESTER I

CS 525 Advanced Database Organization - Spring 2017 Mon + Wed 1:50-3:05 PM, Room: Stuart Building 111

MIT Database Management Systems Lesson 03: ER-to-Relational Mapping

Database Management

Textbook(s) and other required material: Raghu Ramakrishnan & Johannes Gehrke, Database Management Systems, Third edition, McGraw Hill, 2003.

B.C.A DATA BASE MANAGEMENT SYSTEM MODULE SPECIFICATION SHEET. Course Outline

Database Management Systems CS Spring 2017

Online Data Modeling Tool to Improve Students' Learning of Conceptual Data Modeling

Represent entities and relations with diagrams

Can you name one application that does not need any data? Can you name one application that does not need organized data?

ER to Relational Mapping

Course: Database Management Systems. Lê Thị Bảo Thu

CSC 407 Database System I COURSE PARTICULARS COURSE INSTRUCTORS COURSE DESCRIPTION

Database Management System 6 ER Modeling...

CSE 132A Database Systems Principles

Study (s) Degree Center Acad. Period

Relational model continued. Understanding how to use the relational model. Summary of board example: with Copies as weak entity

Chapter 9 Outline. Relational Database Design by ER and EERto-Relational. Mapping Fundamentals of Database Systems

Computer Science 597A Fall 2008 First Take-home Exam Out: 4:20PM Monday November 10, 2008 Due: 3:00PM SHARP Wednesday, November 12, 2008

download instant at Database System Concepts

Advanced Databases (SE487) Prince Sultan University College of Computer and Information Sciences

Course Design Document: IS202 Data Management. Version 4.5

SRM UNIVERSITY FACULTY OF ENGINEERING AND TECHNOLOGY SCHOOL OF COMPUTING DEPARTMENT OF CSE COURSE PLAN

CPS352 Database Systems Syllabus Fall 2012

Who, where, when. Database Management Systems (LIX022B05) Literature. Evaluation. Lab Sessions. About this course. After this course...

Chapter 9: Relational DB Design byer/eer to Relational Mapping Relational Database Design Using ER-to- Relational Mapping Mapping EER Model

Objectives Definition iti of terms Importance of data modeling Write good names and definitions for entities, relationships, and attributes Distinguis

SVY2001: Databases for GIS

DATABASE MANAGEMENT SYSTEM SUBJECT CODE: CE 305

Database Management Systems

Hands-on Experiments for a Database Course: Transaction Isolation Levels in SQL

IMS1002/CSE1205 Lectures 1

In This Lecture. The Relational Model. The Relational Model. Relational Data Structure. Unnamed and named tuples. New thing:scheme (and attributes)

Contact Hours / week: 4 Total hours: 64. Table of Contents Architecture 3 Data Modeling Using the Entity-

Syllabi & Scheme of Examination BCA-2 nd Year. Website:-

CS Reading Packet: "Database design, part 1"

CT13 DATABASE MANAGEMENT SYSTEMS DEC 2015

Fundamentals, Design, and Implementation, 9/e Copyright 2004 Database Processing: Fundamentals, Design, and Implementation, 9/e by David M.

Avi Silberschatz, Henry F. Korth, S. Sudarshan, Database System Concept, McGraw- Hill, ISBN , 6th edition.

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

DATABASE MANAGEMENT SYSTEMS

Relational Model. Nisa ul Hafidhoh

Teaching Scheme Business Information Technology/Software Engineering Management Advanced Databases

ADIKAVI NANNAYA UNIVERSITY B. A Computer Applications / B.Sc Computer Science/B.Sc IT Syllabus Under CBCS w.e.f

Databases Lectures 1 and 2

4. Entity Relationship Model

Data analysis and design Unit number: 23 Level: 5 Credit value: 15 Guided learning hours: 60 Unit reference number: H/601/1991.

Ch 9: Mapping EER to Relational. Follow a seven-step algorithm to convert the basic ER model constructs into relations steps 1-7

Lecture2: Database Environment

NEW YORK CITY COLLEGE OF TECHNOLOGY COMPUTER SYSTEMS TECHNOLOGY DEPARTMENT CST4714 DATABASE ADMINISTRATION (2 class hours, 2 lab hours, 3 credits)

Chapter 2 Conceptual Modeling. Objectives

SULTAN QABOOS UNIVERSITY COURSE OUTLINE PROGRAM: B.Sc. in Computer Science. Laboratory (Practical) Field or Work Placement

VEER NARMAD SOUTH GUJARAT UNIVERSITY

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

Fundamentals Of Database Systems Elmasri Navathe 6th Edition Free Download

PELLISSIPPI STATE COMMUNITY COLLEGE MASTER SYLLABUS ADVANCED DATABASE MANAGEMENT SYSTEMS CSIT 2550

An Improvement of an Approach for Representation of Tree Structures in Relational Tables

; Spring 2008 Prof. Sang-goo Lee (14:30pm: Mon & Wed: Room ) ADVANCED DATABASES

Specific Objectives Contents Teaching Hours 4 the basic concepts 1.1 Concepts of Relational Databases

Agenda: Understanding Relationship Types Degree and Cardinality with Examples

Database systems. Jaroslav Porubän, Miroslav Biňas, Milan Nosáľ (c)

Logical database design

Institute of Southern Punjab, Multan

NOTE: DO NOT REMOVE THIS EXAM PAPER FROM THE EXAM VENUE

Data Modeling Using the Entity-Relationship (ER) Model

Relational DB Design by ER- and EER-to-Relational Mapping Design & Analysis of Database Systems

A Web-Based Tool to Enhance Teaching/Learning Database Normalization

Database Design for Final Project Monitoring System in Information Management Study Program of Telkom University

Database Management For Dummies Book Korth 6th Edition

01/01/2017. Chapter 5: The Relational Data Model and Relational Database Constraints: Outline. Chapter 5: Relational Database Constraints

Database Leon Andretti Abdillah. 01 Introduction to Database

Module Documentation

Page 1 of 6. INFO7008: Business Database Systems. Business Database Systems. Credits: 5. Valid From: Semester /11 ( September 2010 )

02 Hr/week. Theory Marks. Internal assessment. Avg. of 2 Tests

Module 2 : Entity-Relationship Model 15

An Effective Methodology for an Upper-level Fundamentals of Database Systems Course

Chapter 1: The Database Environment

Entity Relationship Data Model. Slides by: Shree Jaswal

FUNDAMENTALS OF. Database S wctpmc. Shamkant B. Navathe College of Computing Georgia Institute of Technology. Addison-Wesley

Relational Database Systems Part 01. Karine Reis Ferreira

COMP102: Introduction to Databases, 9.1

MTAT Introduction to Databases

E-R Diagram to Relational Schema

Course Outline. TERM EFFECTIVE: Spring 2017 CURRICULUM APPROVAL DATE: 05/09/2016

Introduction to Databases

Detailed Data Modelling. Detailed Data Modelling. Detailed Data Modelling. Identifying Attributes. Attributes

Step 2: Map ER Model to Tables

The Cache Write Problem

Lecture3: Data Modeling Using the Entity-Relationship Model.

AC61/AT61 DATABASE MANAGEMENT SYSTEMS JUNE 2013

Transcription:

12/17/2002 A Translation of the One-to-One Relationship for Introductory Relational Database Courses Jonathan P. Bernick Department of Computer Science Coastal Carolina University Conway, South Carolina 29528 e-mail: jbernick@coastal.edu I. Abstract The translation of the one-to-one relationship from the Entity/Relationship model to the relational model while preserving one-to-one correspondence between the members of the participating entity sets is a topic that has been neglected in introductory database textbooks. In this paper we provide a simple method, intended for students taking a first course in relational database design, that accomplishes this without introducing nulls or violating the relational model. II. Introduction The difficulties of representing the one-to-one relationship in a relational database have been discussed in detail in database literature ([1]). This difficulty is particularly apparent in the translation of the one-to-one relationship from the Entity/Relationship (E/R) model to the relational model. An examination of representative introductory database texts shows a variety of methods used to translate the one-to-one relationship, all of which potentially allow the one-to-one correspondence between the members of the participating entity sets to be violated for some or all cases and/or require the acceptability of nulls in foreign key attributes, thus violating the relational model (see [2], [3], [4], [5], [6], [8], [10]). Indeed, in some texts the use

of the one-to-one relationship is not discussed ([9]), a method to translate it is not provided ([7]), or its use is actively discouraged ([4]). In this paper we present a translation of the one-to-one relationship from the E/R model to the relational model that preserves one-to-one correspondence between the members of the participating entity sets for all cases and does not violate the relational model. Designed to be easily understood by students, this method can be used to supplement a text that does not include an adequate translation of the one-to-one relationship. III. Translating One-to-One Relationships Let us consider the case of two strong entity sets, A with primary key attributes A p, and B with primary key attributes B p, related by a one-to-one relationship C. There are three possible cases: No total participation by either entity set, total participation by one entity set only, and total participation by both entity sets. No total participation by either entity set: We create relations A' and B' with the attributes of A and B respectively. Additionally, we create a relation C', whose attributes are the union of A p and B p with any attributes of C. A p and B p are thus both foreign keys in C' referencing A' and B' respectively; furthermore, we declare both A p and B p as candidate keys of C', ensuring that the one-to-one correspondence is preserved. Either A p or B p may be chosen as the primary key of C' ([1]). Total participation by one entity set only: We may assume without loss of generality that B is the strong entity set with full participation. We thus create two relations: A', which has the attributes of A, and B', whose attributes are union of the attributes of B with A p. A p is thus a foreign key in B' referencing A'; if we also declare A p a candidate key of B', the one-to-one correspondence is preserved ([1]). Total participation by both entity sets: A single relation C' is created, whose attributes are the union of the attributes of A and B with any attributes of C. We declare both A p and B p as candidate keys of C', ensuring that the one-to-one correspondence is preserved.

IV. Examples No total participation by either entity set: The Fred Mbogo Insurance Corporation institutes a mentoring program, pairing management trainees with experienced managers, with participation optional for both trainees and managers. A possible E/R diagram would be and the resulting relations would be (, ) (, ) (,, ), where and are foreign keys in referencing and respectively, and is a candidate key of. Total participation by one entity set only: The Mbogo Corporation decides to make participation in the mentoring program mandatory for all trainees. The E/R diagram is now and the resulting relations would be (, )

(,,, ), where is both a candidate key of and a foreign key referencing. Total participation by both entity sets: The Mbogo Corporation decides to make participation in the mentoring program mandatory for all trainees AND managers. The E/R diagram is now and the single resulting relation (,,,, ), where is a candidate key of. V. Conclusions In this paper, we have presented a translation of the one-to-one relationship from the E/R model to the relational model that preserves one-to-one correspondence between the members of the participating entity sets for all cases, does not require nulls, and does not violate the relational model. Since this topic is largely neglected in relational database textbooks, this technique can serve as a supplement to such texts. While the results presented here are for a binary one-to-one relationship, they can easily be generalized for unary and n-ary relationships. VI. Acknowledgements My thanks to John W. Stamey for his helpful comments.

VII. References [1] Date, C. J., A Note on One-to-One Relationships, in Relational Database Writings 1985-1990, Addison- Wesley, 1990. [2] Date, C. J., An Introduction to Database Systems, Seventh Edition, Addison Wesley Longman, Inc., 2002. [3] Elmasri, R., and Navathe, S., Fundamentals of Database Systems, Third Edition, Addison-Wesley Publishing, 2000. [4] Harrington, J., Relational Database Design Clearly Explained, Morgan Kaufman, 1998. [5] Mannino, M., Database Application Development and Design, McGraw-Hill Higher Education, 2001. [6] Mata-Toledo, R., and Cushman, P., Schaum s Outline of Fundamentals of Relational Databases, The McGraw-Hill Companies, Inc., 2000. [7] McFadden, F., and Hoffer, J., Database Management, Third Edition, The Benjamin/Cummings Publishing Company, Inc., 1991. [8] O Neil, P., Database: Principles, Programming, Performance, Morgan Kaufman Publishers, Inc., 1994. [9] Post, G., Database Management Systems: Designing and Building Business Applications, McGraw-Hill Higher Education, 2002. [10] Silberschatz, A., Korth, H., and Sudarshan, S., Database System Concepts, Fourth Edition, McGraw-Hill Higher Education, 2002.