Database Management System (15ECSC208) UNIT I: Chapter 2: Relational Data Model and Relational Algebra

Size: px
Start display at page:

Download "Database Management System (15ECSC208) UNIT I: Chapter 2: Relational Data Model and Relational Algebra"

Transcription

1 Database Management System (15ECSC208) UNIT I: Chapter 2: Relational Data Model and Relational Algebra

2 Relational Data Model and Relational Constraints Part 1

3 A simplified diagram to illustrate the main phases of database design process.

4 Background The relational model was first proposed by Dr. E. F. Codd of IBM Research in 1970 in the following paper: "A Relational Model for Large Shared Data Banks," Communications of the ACM, June A Relation is a mathematical concept based on the ideas of sets. Commercial implementations of the relational DBMSs: DB2 and Informix Dynamic Server (from IBM), Oracle and Rdb (from Oracle), Sybase DBMS (from Sybase), SQL Server and Access (from Microsoft) Popular open source systems, such as MySQL and PostgreSQL

5 Relational Model Concepts Relational schema - Consists of relation name, and a set of attributes or field names or column names. Each attribute has an associated domain. Eg: STUDENT ( studentname: string, rollnumber: string, phonenumber: integer, ) Domain set of atomic values + data type.

6 Relational Model Concepts Relation instance - A finite set of tuples. A relation r of relation schema R = (A 1, A 2,, A m ) is set of n-tuples of the form [t 1,t 2,...,t n ] where each t i dom(a i ). A tuple of relation is an ordered sequence of values(v 1,v 2,...,v m ) such that v i dom(a i ), 1 i m.

7 Characteristics of Relation Ordering of Tuples in a Relation a relation is defined as a set of tuples tuples in a relation don t have any particular order Ordering of Attributes Ordering of values within a tuple Alternative definition: order of attributes and their values is not that important as long as the correspondence between attributes and values is maintained Values of Tuples each value in a tuple is an atomic value NULL values in Tuples values of attributes that may be unknown or may not apply to a tuple

8 Relational Model Constraint Types Constraints restrictions on data which is specified on a relational database schema. 1. Inherent model-based constraints or implicit constraints: Constraints that are inherent in the data model. Eg: duplicate tuples are not allowed in a relation. 2. Schema-based constraints or explicit constraints: Constraints that can be directly expressed in schemas of the data model, typically by specifying them in the DDL. 3. Application-based or semantic constraints or business rules: Constraints that cannot be directly expressed in the schemas of the data model, and hence must be expressed and enforced by the application programs. Eg: this year s salary increase can be no more than last year s

9 Relational Model Constraints 1. Domain Constraints: Specify that value of each attribute A must be atomic and a member of dom(a). Data types associated with domains include - standard numeric data types for integers (such as short integer, integer, and long integer), - real numbers (float and double precision float), - characters, booleans, fixed-length and variable-length strings, - date, time, timestamp, or other special data types

10 Relational Constraints 2. Key constraints and constraints on NULL: Given a relational schema R = (A i ), i = 1 n, a subset of attributes SK is called a superkey if the values of attributes in SK is distinct for every relation instance. This is, for any two tuples t i, t j, (t i t j ) (t i [SK] t j [SK]). A key k of a relation is a subset of the superkey, k subset SK, such that removal of any attribute in k removes the superkey property for k. Also called as Minimal key.

11 Relational Constraints 2. Key constraints and constraints on NULL [cont ] Key satisfies two properties: Condition 1: Two distinct tuples in any state of relation cannot have identical values for (all) attributes in key Condition 2: It is a Minimal superkey - that is, A superkey from which we cannot remove any attributes and still have uniqueness constraint in condition 1 hold. Condition 1 also applies to a superkey. However, Condition 2 is not required by a superkey.

12 Relational Constraints 2. Key constraints and constraints on NULL [cont ] Candidate key Relation schema may have more than one key Primary key of the relation Designated among candidate keys Underline attribute Other candidate keys are designated as unique keys Also, none of the key attributes can have NULL value.

13 Relational Databases and Relational Database Schemas Relational database schema Set of relation schemas S = {R 1, R 2,..., R m } Set of integrity constraints IC Relational database state Set of relation states DB = {r 1, r 2,..., r m } Each r i is a state of R i and such that the r i relation states satisfy integrity constraints specified in IC

14 Schema diagram for University relational database schema

15 One possible relational database state corresponding to University schema

16 Relational Constraints 3. Integrity Constraints (IC): 3.1. Entity IC: No primary key value can be NULL 3.2. Referential IC: Specified between two relations Maintains consistency among tuples in two relations There can be more than one foreign key in a relation scheme Directed arc from each foreign key to the relation it references (Diagrammatically)

17 Relational Constraints Foreign key rules : A set of attributes FK in relation schema R 1 is a foreign key of R 1 that references relation R 2 if it satisfies the following rules: The attributes in FK have the same domain(s) as the primary key attributes PK of R 2 A value of FK in a tuple t 1 of the current state r 1 (R 1 ) either occurs as a value of PK for some tuple t 2 in the current state r 2 (R 2 ) or is NULL. All integrity constraints need to be specified on relational database schema.

18 Other Constraints Semantic ICs May have to be specified and enforced on a relational database Use triggers and assertions More common to check for these types of constraints within the application programs Functional dependency constraint Establishes a functional relationship among two sets of attributes X and Y X Y

19 Relational Database Design using ER to Relational Mapping

20 Example 6 Specifications The company is organized into departments. Each department has a unique name, a unique number, and a particular employee who manages the department. We keep track of the start date when that employee began managing the department. A department may have several locations. A department controls a number of projects, each of which has a unique name, a unique number, and a single location. We store each employee's name, social security number. address, salary, sex, and birth date. An employee is assigned to one department but may work on several projects, which are not necessarily controlled by the same department. We keep track of the number of hours per week that an employee works on each project. We also keep track of the direct supervisor of each employee. We want to keep track of the dependents of each employee for insurance purposes. We keep each dependent's first name, sex, birth date, and relationship to the employee.

21 ER schema diagram for COMPANY database

22 Database state for the COMPANY relational database schema

23 Database state for the COMPANY relational database schema

24 ER to Relational Mapping Algorithm Step1: Mapping of Regular Entity Types For each regular (strong) entity type E in the ER schema, create a relation R that includes all the simple attributes of E. Include only the simple component attributes of a composite attribute. Choose one of the key attributes of E as primary key for R. If the chosen key of E is composite, the set of simple attributes that form it will together form the primary key of R.

25 ER to Relational Mapping Algorithm Step2: Mapping of Weak Entity Types For each weak entity type W in the ER schema with owner entity type E, create a relation R and include all simple attributes (or simple components of composite attributes) of W as attributes of R. In addition, include as foreign key attributes of R the primary key attribute(s) of the relation(s) that correspond to the owner entity type(s); this takes care of the identifying relationship type of W. The primary key of R is the combination of the primary key(s) of the owner(s) and the partial key of the weak entity type W, if any.

26 ER to Relational Mapping Algorithm Step3: Mapping of Binary 1:1 Relationship Types For each binary 1:1 relationship type R in the ER schema, identify the relations S and T that correspond to the entity types participating in R. Choose one of the relations say S, and include as a foreign key in S the primary key of T. It is better to choose an entity type with total participation in R in the role of S. Include all the simple attributes (or simple components of composite attributes) of the 1:1 relationship type R as attributes of S.

27 ER to Relational Mapping Algorithm Step4: Mapping of Binary 1 : N Relationship Types For each regular binary l:n relationship type R, identify the relation S that represents the participating entity type at the N- side of the relationship type. Include as foreign key in S the primary key of the relation T that represents the other entity type participating in R; (this is done because each entity instance on the N-side is related to at most one entity instance on the 1-side of the relationship type.) Include any simple attributes (or simple components of composite attributes) of the 1:N relationship type as attributes of S.

28 ER to Relational Mapping Algorithm Step5: Mapping of Binary M:N Relationship Types For each binary M:N relationship type R, create a new relation S to represent R. Include as foreign key attributes in S the primary keys of the relations that represent the participating entity types; their combination will form the primary key of S. Also include any simple attributes of the M:N relationship type (or simple components of composite attributes) as attributes of S.

29 ER to Relational Mapping Algorithm Step6: Mapping of Multivalued Attributes For each multivalued attribute A, create a new relation R. This relation R will include an attribute corresponding to A, plus the primary key attribute K-as a foreign key in R-of the relation that represents the entity type or relationship type that has A as an attribute. The primary key of R is the combination of A and K. If the multivalued attribute is composite, we include its simple components.

30 ER to Relational Mapping Algorithm Step7: Mapping of N-ary Relationship Types. For each n-ary relationship type R, where n > 2, create a new relation S to represent R. Include as foreign key attributes in S the primary keys of the relations that represent the participating entity types. Also include any simple attributes of the n-ary relationship type (or simple components of composite attributes) as attributes of S. The primary key of S is usually a combination of all the foreign keys that reference the relations representing the participating entity types.

31 Correspondence between ER and Relational Models In a relational schema relationship types are not represented explicitly Represented by having two attributes A and B: one a primary key and the other a foreign key

32 Result of Mapping the COMPANY ER Schema into a Relational database schema

33 Example ER to Relational Schema Mapping How do we represent this as a relational schema? date firstname lastname name category price Product Purchased Person name address Store

34 Specialization and Generalization Specialization is the process of defining a set of subclasses of an entity type; this entity type is called the superclass of the specialization. For example, the set of subclasses {SECRETARY, ENGINEER, TECHNICIAN} is a specialization of the superclass EMPLOYEE. We can think of a reverse process of abstraction in which we suppress the differences among several entity types, identify their common features, and generalize them into a single superclass of which the original entity types are special subclasses. For example, CAR and TRUCK are subclasses of the generalized superclass VEHICLE. Refer: Chapter 8 (Sections 8.1 and 8.2) from Fundamentals of Database Systems (FODS), 6 th Edition.

35 Mapping EER Model Constructs to Relations Step8: Options for Mapping Specialization or Generalization. Convert each specialization with m subclasses {S1, S2,.,Sm} and generalized superclass C, where the attributes of C are {k,a1, an} and k is the (primary) key, into relational schemas using one of the four following options: Option 8A: Multiple relations-superclass and subclasses Option 8B: Multiple relations-subclass relations only Option 8C: Single relation with one type attribute Option 8D: Single relation with multiple type attributes

36 Mapping EER Model Constructs to Relations Option 8A: Multiple relations-superclass and subclasses Create a relation L for C with attributes Attrs(L) = {k,a1, an} and PK(L) = k. Create a relation Li for each subclass Si, 1 < i < m, with the attributes Attrs(Li) = {k} U {attributes of Si} and PK(Li)=k. Note: This option works for any specialization (total or partial, disjoint of over-lapping)

37 Option 8A: Multiple relations-superclass and subclasses

38 Option 8A: Multiple relations-superclass and subclasses

39 Mapping EER Model Constructs to Relations Option 8B: Multiple relations-subclass relations only Create a relation Li for each subclass Si, 1 < i < m, with the attributes Attr(Li) = {attributes of Si} U {k,a1,an} and PK(Li) = k. Note: This option only works for a specialization whose subclasses are total (every entity in the superclass must belong to (at least) one of the subclasses).

40 Option 8B: Multiple relations-subclass relations only

41 Option 8B: Multiple relations-subclass relations only

42 Update Operations and Dealing with Constraint Violations Operations of the relational model can be categorized into retrievals and updates Basic operations that change the states of relations in the database: Insert Delete Update (or Modify) Basic operations when applied, the ICs specified on the relational database schema should not be violated.

43 Update Operations and Dealing with Constraint Violations Focus: Types of constraints that may be violated by update operations (Insert, Delete & Update) and the types of actions that may be taken if an operation causes a violation.

44 Database state for the COMPANY relational database schema

45 Database state for the COMPANY relational database schema

46 Referential ICs displayed on the COMPANY relational database schema

47 The Insert Operation Provides a list of attribute values for a new tuple t that is to be inserted into a relation r. Can violate any of the four types of constraints If an insertion violates one or more constraints Default option is to reject the insertion

48 Insert Violation 4 Constraints example Domain constraints can be violated if an attribute value is given that does not appear in the corresponding domain or is not of the appropriate data type. Key constraints can be violated if a key value in the new tuple t already exists in another tuple in the relation r(r). Entity integrity can be violated if the primary key of the new tuple t is null. Referential integrity can be violated if the value of any foreign key in t refers to a tuple that does not exist in the referenced relation.

49 Insert operation Some examples [1] Operation: Insert < Cecilia, F, Kolonsky, NULL, , 6357 Windy Lane, Katy, TX, F, 28000, NULL, 4> into EMPLOYEE. Result: This insertion violates the entity integrity constraint (NULL for the primary key SSN), so it is rejected. [2] Operation: Insert < Alicia, J, Zelaya, , , 6357 Windy Lane, Katy, TX, F, 28000, , 4> into EMPLOYEE. Result: This insertion violates the key constraint because another tuple with the same Ssn value already exists in the EMPLOYEE relation, and so it is rejected. [3] Operation: Insert < Cecilia, F, Kolonsky, , , 6357 Windswept, Katy, TX, F, 28000, , 7> into EMPLOYEE. Result: This insertion violates the referential integrity constraint specified on Dno in EMPLOYEE because no corresponding referenced tuple exists in DEPARTMENT with Dnumber = 7. [4] Operation: Insert < Cecilia, F, Kolonsky, , , 6357 Windy Lane, Katy, TX, F, 28000, NULL, 4> into EMPLOYEE. Result: This insertion satisfies all constraints, so it is acceptable.

50 The Delete Operation Can violate only referential integrity constraint If tuple being deleted is referenced by foreign keys from other tuples Options if a delete operation causes a violation: Restrict - Reject the deletion Cascade - Propagate the deletion by deleting tuples that reference the tuple that is being deleted Set null or set default - Modify the referencing attribute values that cause the violation

51 Delete operation Some examples [1] Operation: Delete the WORKS_ON tuple with Essn = and Pno = 10. Result: This deletion is acceptable and deletes exactly one tuple. [2] Operation: Delete the EMPLOYEE tuple with Ssn = Result: This deletion is not acceptable, because there are tuples in WORKS_ON that refer to this tuple. Hence, if the tuple in EMPLOYEE is deleted, referential integrity violations will result. [3] Operation: Delete the EMPLOYEE tuple with Ssn = Result: This deletion will result in even worse referential integrity violations, because the tuple involved is referenced by tuples from the EMPLOYEE, DEPARTMENT,WORKS_ON, and DEPENDENT relations.

52 The Update Operation Necessary to specify a condition on attributes of relation Select the tuple (or tuples) to be modified If attribute not part of a primary key nor of a foreign key Usually causes no problems Updating a primary/foreign key Similar issues as with Insert/Delete

53 Update operation Some examples [1] Operation: Update the salary of the EMPLOYEE tuple with Ssn = to Result: Acceptable. [2] Operation: Update the Dno of the EMPLOYEE tuple with Ssn = to 1. Result: Acceptable. [3] Operation: Update the Dno of the EMPLOYEE tuple with Ssn = to 7. Result: Unacceptable, because it violates referential integrity. [4] Operation: Update the Ssn of the EMPLOYEE tuple with Ssn = to Result: Unacceptable, because it violates primary key constraint by repeating a value that already exists as a primary key in another tuple; it violates referential integrity constraints because there are other relations that refer to the existing value of Ssn.

54 Exercise: Suppose that each of the following Update operations is applied directly to the database state shown in Figure given as handout. Discuss all integrity constraints violated by each operation, if any, and the different ways of enforcing these constraints. a. Insert < Robert, F, Scott, , , 2365 Newcastle Rd, Bellaire, TX, M, 58000, , 1> into EMPLOYEE. b. Insert < ProductA, 4, Bellaire, 2> into PROJECT. c. Insert < Production, 4, , > into DEPARTMENT. d. Insert < , NULL, 40.0 > into WORKS_ON. e. Insert < , John, M, , spouse > into DEPENDENT. f. Delete the WORKS_ON tuples with Essn = g. Delete the EMPLOYEE tuple with Ssn = h. Delete the PROJECT tuple with Pname = ProductX. i. Modify the Mgr_ssn and Mgr_start_date of the DEPARTMENT tuple with Dnumber = 5 to and , respectively. j. Modify the Super_ssn attribute of the EMPLOYEE tuple with Ssn = to k. Modify the Hours attribute of the WORKS_ON tuple with Essn = and Pno = 10 to 5.0.

55 Resources Chapter 3 of Fundamentals of Database Systems (FODS), 6 th Edition. Chapter 8 (Sections 8.1 and 8.2) from Fundamentals of Database Systems (FODS), 6 th Edition. Chapter 9 (Sec. 9.1) for ER-to-Relational Mapping of Fundamentals of Database Systems (FODS), 6 th Edition.

ITCS 3160 DATA BASE DESIGN AND IMPLEMENTATION

ITCS 3160 DATA BASE DESIGN AND IMPLEMENTATION ITCS 3160 DATA BASE DESIGN AND IMPLEMENTATION JING YANG 2010 FALL Class 3: The Relational Data Model and Relational Database Constraints Outline 2 The Relational Data Model and Relational Database Constraints

More information

Outline. Note 1. CSIE30600 Database Systems ER/EER to Relational Mapping 2

Outline. Note 1. CSIE30600 Database Systems ER/EER to Relational Mapping 2 Outline ER-to-Relational Mapping Algorithm Step 1: Mapping of Regular Entity Types Step 2: Mapping of Weak Entity Types Step 3: Mapping of Binary 1:1 Relation Types Step 4: Mapping of Binary 1:N Relationship

More information

Relational Database Systems Part 01. Karine Reis Ferreira

Relational Database Systems Part 01. Karine Reis Ferreira Relational Database Systems Part 01 Karine Reis Ferreira karine@dpi.inpe.br Aula da disciplina Computação Aplicada I (CAP 241) 2016 Database System Database: is a collection of related data. represents

More information

The Basic (Flat) Relational Model. Copyright 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

The Basic (Flat) Relational Model. Copyright 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley The Basic (Flat) Relational Model Copyright 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 3 Outline The Relational Data Model and Relational Database Constraints Relational

More information

ECE 650 Systems Programming & Engineering. Spring 2018

ECE 650 Systems Programming & Engineering. Spring 2018 ECE 650 Systems Programming & Engineering Spring 2018 Relational Databases: Tuples, Tables, Schemas, Relational Algebra Tyler Bletsch Duke University Slides are adapted from Brian Rogers (Duke) Overview

More information

CS 377 Database Systems

CS 377 Database Systems CS 377 Database Systems Relational Data Model Li Xiong Department of Mathematics and Computer Science Emory University 1 Outline Relational Model Concepts Relational Model Constraints Relational Database

More information

Chapter 6: RELATIONAL DATA MODEL AND RELATIONAL ALGEBRA

Chapter 6: RELATIONAL DATA MODEL AND RELATIONAL ALGEBRA Chapter 6: Relational Data Model and Relational Algebra 1 Chapter 6: RELATIONAL DATA MODEL AND RELATIONAL ALGEBRA RELATIONAL MODEL CONCEPTS The relational model represents the database as a collection

More information

Copyright 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide 5-1

Copyright 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide 5-1 Copyright 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide 5-1 Chapter 5 The Relational Data Model and Relational Database Constraints Copyright 2007 Pearson Education, Inc. Publishing

More information

Chapter 7 Relational Database Design by ER- and EERR-to-Relational Mapping

Chapter 7 Relational Database Design by ER- and EERR-to-Relational Mapping Chapter 7 Relational Database Design by ER- and EERR-to-Relational Mapping Copyright 2004 Pearson Education, Inc. Chapter Outline ER-to-Relational Mapping Algorithm Step 1: Mapping of Regular Entity Types

More information

Database Management

Database Management 204320 - Database Management Chapter 9 Relational Database Design by ER and EERto-Relational Mapping Adapted for 204320 by Areerat Trongratsameethong Copyright 2011 Pearson Education, Inc. Publishing as

More information

CS275 Intro to Databases

CS275 Intro to Databases CS275 Intro to Databases The Relational Data Model Chap. 3 How Is Data Retrieved and Manipulated? Queries Data manipulation language (DML) Retrieval Add Delete Update An Example UNIVERSITY database Information

More information

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

Relational DB Design by ER- and EER-to-Relational Mapping Design & Analysis of Database Systems Relational DB Design by ER- and EER-to-Relational Mapping 406.426 Design & Analysis of Database Systems Jonghun Park jonghun@snu.ac.kr Dept. of Industrial Engineering Seoul National University outline

More information

CONSTRAINTS AND UPDATES CHAPTER 3 (6/E) CHAPTER 5 (5/E)

CONSTRAINTS AND UPDATES CHAPTER 3 (6/E) CHAPTER 5 (5/E) 1 CONSTRAINTS AND UPDATES CHAPTER 3 (6/E) CHAPTER 5 (5/E) 3 LECTURE OUTLINE Constraints in Relational Databases Update Operations 4 SATISFYING INTEGRITY CONSTRAINTS Constraints are restrictions on the

More information

Relational Data Model. Christopher Simpkins

Relational Data Model. Christopher Simpkins Relational Data Model Christopher Simpkins 1 / 22 Relational Data Model A relation schema R(A a,..., A n ) is a relation name R and a list of attributes A 1,..., A n. Each attribute A i is the name of

More information

COSC344 Database Theory and Applications. σ a= c (P) Lecture 3 The Relational Data. Model. π A, COSC344 Lecture 3 1

COSC344 Database Theory and Applications. σ a= c (P) Lecture 3 The Relational Data. Model. π A, COSC344 Lecture 3 1 COSC344 Database Theory and Applications σ a= c (P) S P Lecture 3 The Relational Data π A, C (H) Model COSC344 Lecture 3 1 Overview Last Lecture Database design ER modelling This Lecture Relational model

More information

Let s briefly review important EER inheritance concepts

Let s briefly review important EER inheritance concepts Let s briefly review important EER inheritance concepts 1 is-a relationship Copyright (c) 2011 Pearson Education 2 Basic Constraints Partial / Disjoint: Single line / d in circle Each entity can be an

More information

PES Institute of Technology Bangalore South Campus (1 K.M before Electronic City,Bangalore ) Department of MCA. Solution Set - Test-II

PES Institute of Technology Bangalore South Campus (1 K.M before Electronic City,Bangalore ) Department of MCA. Solution Set - Test-II PES Institute of Technology Bangalore South Campus (1 K.M before Electronic City,Bangalore 560100 ) Solution Set - Test-II Sub: Database Management Systems 16MCA23 Date: 04/04/2017 Sem & Section:II Duration:

More information

COSC344 Database Theory and Applications. σ a= c (P) S. Lecture 4 Relational algebra. π A, P X Q. COSC344 Lecture 4 1

COSC344 Database Theory and Applications. σ a= c (P) S. Lecture 4 Relational algebra. π A, P X Q. COSC344 Lecture 4 1 COSC344 Database Theory and Applications σ a= c (P) S π A, C (H) P P X Q Lecture 4 Relational algebra COSC344 Lecture 4 1 Overview Last Lecture Relational Model This Lecture ER to Relational mapping Relational

More information

The Relational Data Model and Relational Database Constraints

The Relational Data Model and Relational Database Constraints CHAPTER 5 The Relational Data Model and Relational Database Constraints Copyright 2017 Ramez Elmasri and Shamkant B. Navathe Slide 1-2 Chapter Outline Relational Model Concepts Relational Model Constraints

More information

Relational Model. CS 377: Database Systems

Relational Model. CS 377: Database Systems Relational Model CS 377: Database Systems ER Model: Recap Recap: Conceptual Models A high-level description of the database Sufficiently precise that technical people can understand it But, not so precise

More information

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

01/01/2017. Chapter 5: The Relational Data Model and Relational Database Constraints: Outline. Chapter 5: Relational Database Constraints Chapter 5: The Relational Data Model and Relational Database Constraints: Outline Ramez Elmasri, Shamkant B. Navathe(2017) Fundamentals of Database Systems (7th Edition),pearson, isbn 10: 0-13-397077-9;isbn-13:978-0-13-397077-7.

More information

ER to Relational Mapping

ER to Relational Mapping ER to Relational Mapping 1 / 19 ER to Relational Mapping Step 1: Strong Entities Step 2: Weak Entities Step 3: Binary 1:1 Relationships Step 4: Binary 1:N Relationships Step 5: Binary M:N Relationships

More information

The Enhanced ER Model

The Enhanced ER Model CSI 2132 Tutorial 3 From the Conceptual to the Relational Model The Enhanced ER Model EER Model Extension to ER model that improves its representational capabilities. Subclasses and Superclasses Specialization

More information

The Relational Data Model and Relational Database Constraints

The Relational Data Model and Relational Database Constraints The Relational Data Model and Relational Database Constraints First introduced by Ted Codd from IBM Research in 1970, seminal paper, which introduced the Relational Model of Data representation. It is

More information

CONSTRAINTS AND UPDATES CHAPTER 3 (6/E) CHAPTER 5 (5/E)

CONSTRAINTS AND UPDATES CHAPTER 3 (6/E) CHAPTER 5 (5/E) 1 CONSTRAINTS AND UPDATES CHAPTER 3 (6/E) CHAPTER 5 (5/E) QUESTION Film title genre year director runtime budget gross The Company Men drama 2010 John Wells 104 15,000,000 4,439,063 Steven Lincoln biography

More information

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

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

More information

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

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

More information

Mapping ER Diagrams to. Relations (Cont d) Mapping ER Diagrams to. Exercise. Relations. Mapping ER Diagrams to Relations (Cont d) Exercise

Mapping ER Diagrams to. Relations (Cont d) Mapping ER Diagrams to. Exercise. Relations. Mapping ER Diagrams to Relations (Cont d) Exercise CSC 74 Database Management Systems Topic #6: Database Design Weak Entity Type E Create a relation R Include all simple attributes and simple components of composite attributes. Include the primary key

More information

Conceptual Data Models for Database Design

Conceptual Data Models for Database Design Conceptual Data Models for Database Design Entity Relationship (ER) Model The most popular high-level conceptual data model is the ER model. It is frequently used for the conceptual design of database

More information

ACS-3902 Fall Ron McFadyen 3D21 Slides are based on chapter 5 (7 th edition) (chapter 3 in 6 th edition)

ACS-3902 Fall Ron McFadyen 3D21 Slides are based on chapter 5 (7 th edition) (chapter 3 in 6 th edition) ACS-3902 Fall 2016 Ron McFadyen 3D21 ron.mcfadyen@acs.uwinnipeg.ca Slides are based on chapter 5 (7 th edition) (chapter 3 in 6 th edition) 1 The Relational Data Model and Relational Database Constraints

More information

Chapter 5. Relational Model Concepts 5/2/2008. Chapter Outline. Relational Database Constraints

Chapter 5. Relational Model Concepts 5/2/2008. Chapter Outline. Relational Database Constraints Chapter 5 The Relational Data Model and Relational Database Constraints Copyright 2004 Pearson Education, Inc. Chapter Outline Relational Model Concepts Relational Model Constraints and Relational Database

More information

Chapter 5. Relational Model Concepts 9/4/2012. Chapter Outline. The Relational Data Model and Relational Database Constraints

Chapter 5. Relational Model Concepts 9/4/2012. Chapter Outline. The Relational Data Model and Relational Database Constraints Chapter 5 The Relational Data Model and Relational Database Constraints Copyright 2004 Pearson Education, Inc. Chapter Outline Relational Model Constraints and Relational Database Schemas Update Operations

More information

CS 405G: Introduction to Database Systems

CS 405G: Introduction to Database Systems CS 405G: Introduction to Database Systems Entity Relationship Model Jinze Liu 9/11/2014 1 CS685 : Special The UNIVERSITY Topics in Data of Mining, KENTUCKY UKY Review A database is a large collection of

More information

Chapter 5. The Relational Data Model and Relational Database Constraints. Slide 5-١. Copyright 2007 Ramez Elmasri and Shamkant B.

Chapter 5. The Relational Data Model and Relational Database Constraints. Slide 5-١. Copyright 2007 Ramez Elmasri and Shamkant B. Slide 5-١ Chapter 5 The Relational Data Model and Relational Database Constraints Chapter Outline Relational Model Concepts Relational Model Constraints and Relational Database Schemas Update Operations

More information

Copyright 2007 Ramez Elmasri and Shamkant B. Navathe. Slide 5-1

Copyright 2007 Ramez Elmasri and Shamkant B. Navathe. Slide 5-1 Slide 5-1 Chapter 5 The Relational Data Model and Relational Database Constraints Chapter Outline Relational Model Concepts Relational Model Constraints and Relational Database Schemas Update Operations

More information

Overview Relational data model

Overview Relational data model Thanks to José and Vaida for most of the slides. Relational databases and MySQL Juha Takkinen juhta@ida.liu.se Outline 1. Introduction: Relational data model and SQL 2. Creating tables in Mysql 3. Simple

More information

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

ER Model. Objectives (2/2) Electricite Du Laos (EDL) Dr. Kanda Runapongsa Saikaew, Computer Engineering, KKU 1 ER Model Asst. Prof. Dr. Kanda Runapongsa Saikaew (krunapon@kku.ac.th) Dept of Computer Engineering Khon Kaen University Objectives (1/2) Relational Data Model Terminology of relational data model How

More information

CS 2451 Database Systems: Relational Data Model

CS 2451 Database Systems: Relational Data Model CS 2451 Database Systems: Relational Data Model http://www.seas.gwu.edu/~bhagiweb/cs2541 Spring 2018 Instructor: Dr. Bhagi Narahari Lead TA: Roxana Leontie TA/Grader: Malik Undergrad TA: Victoria Zheng

More information

This chapter discusses how to design a relational

This chapter discusses how to design a relational 9 chapter Relational Database Design by ER- and EER-to-Relational Mapping This chapter discusses how to design a relational database schema based on a conceptual schema design. Figure 7.1 presented a high-level

More information

Relational Model. Topics. Relational Model. Why Study the Relational Model? Linda Wu (CMPT )

Relational Model. Topics. Relational Model. Why Study the Relational Model? Linda Wu (CMPT ) Topics Relational Model Linda Wu Relational model SQL language Integrity constraints ER to relational Views (CMPT 354 2004-2) Chapter 3 CMPT 354 2004-2 2 Why Study the Relational Model? Most widely used

More information

Relational Model History. COSC 304 Introduction to Database Systems. Relational Model and Algebra. Relational Model Definitions.

Relational Model History. COSC 304 Introduction to Database Systems. Relational Model and Algebra. Relational Model Definitions. COSC 304 Introduction to Database Systems Relational Model and Algebra Dr. Ramon Lawrence University of British Columbia Okanagan ramon.lawrence@ubc.ca Relational Model History The relational model was

More information

Homework #4 1. Suppose that each of the following Update operations is applied directly to the database state shown in Figure 5.6.

Homework #4 1. Suppose that each of the following Update operations is applied directly to the database state shown in Figure 5.6. Homework #4 1. Suppose that each of the following Update operations is applied directly to the database state shown in Figure 5.6. Discuss all integrity constraints violated by each operation, if any,

More information

RELATIONAL DATA MODEL

RELATIONAL DATA MODEL RELATIONAL DATA MODEL 3.1 Introduction The relational model of data was introduced by Codd (1970). It is based on a simple and uniform data structure - the relation - and has a solid theoretical and mathematical

More information

1. Considering functional dependency, one in which removal from some attributes must affect dependency is called

1. Considering functional dependency, one in which removal from some attributes must affect dependency is called Q.1 Short Questions Marks 1. Considering functional dependency, one in which removal from some attributes must affect dependency is called 01 A. full functional dependency B. partial dependency C. prime

More information

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

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

More information

EGCI 321: Database Systems. Dr. Tanasanee Phienthrakul

EGCI 321: Database Systems. Dr. Tanasanee Phienthrakul 1 EGCI 321: Database Systems Dr. Tanasanee Phienthrakul 2 Chapter 10 Data Definition Language (DDL) 3 Basic SQL SQL language Considered one of the major reasons for the commercial success of relational

More information

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

The Relational Model. Why Study the Relational Model? Relational Database: Definitions The Relational Model Database Management Systems, R. Ramakrishnan and J. Gehrke 1 Why Study the Relational Model? Most widely used model. Vendors: IBM, Microsoft, Oracle, Sybase, etc. Legacy systems in

More information

Course Notes on From Entity-Relationship Schemas to Relational Schemas

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

More information

Database design process

Database design process Database technology Lecture 2: Relational databases and SQL Jose M. Peña jose.m.pena@liu.se Database design process 1 Relational model concepts... Attributes... EMPLOYEE FNAME M LNAME SSN BDATE ADDRESS

More information

DATABASE DESIGN I - 1DL300

DATABASE DESIGN I - 1DL300 DATABASE DESIGN I - 1DL300 Spring 2011 An introductory course on database systems http://www.it.uu.se/edu/course/homepage/dbastekn/vt11/ Manivasakan Sabesan Uppsala Database Laboratory Department of Information

More information

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

MIT Database Management Systems Lesson 03: ER-to-Relational Mapping MIT 22033 Database Management Systems Lesson 03: ER-to-Relational Mapping By S. Sabraz Nawaz Senior Lecturer in MIT Department of Management and IT, SEUSL Chapter Outline ER-to-Relational Mapping Algorithm

More information

Chapter (4) Enhanced Entity-Relationship and Object Modeling

Chapter (4) Enhanced Entity-Relationship and Object Modeling Chapter (4) Enhanced Entity-Relationship and Object Modeling Objectives Concepts of subclass and superclass and the related concepts of specialization and generalization. Concept of category, which is

More information

Relational Model History. COSC 416 NoSQL Databases. Relational Model (Review) Relation Example. Relational Model Definitions. Relational Integrity

Relational Model History. COSC 416 NoSQL Databases. Relational Model (Review) Relation Example. Relational Model Definitions. Relational Integrity COSC 416 NoSQL Databases Relational Model (Review) Dr. Ramon Lawrence University of British Columbia Okanagan ramon.lawrence@ubc.ca Relational Model History The relational model was proposed by E. F. Codd

More information

DATABASE TECHNOLOGY - 1DL124

DATABASE TECHNOLOGY - 1DL124 1 DATABASE TECHNOLOGY - 1DL124 Summer 2007 An introductury course on database systems http://user.it.uu.se/~udbl/dbt-sommar07/ alt. http://www.it.uu.se/edu/course/homepage/dbdesign/st07/ Kjell Orsborn

More information

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

More information

Translation of ER-diagram into Relational Schema. Dr. Sunnie S. Chung CIS430/530

Translation of ER-diagram into Relational Schema. Dr. Sunnie S. Chung CIS430/530 Translation of ER-diagram into Relational Schema Dr. Sunnie S. Chung CIS430/530 Learning Objectives Define each of the following database terms 9.2 Relation Primary key Foreign key Referential integrity

More information

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

Chapter 3 Data Modeling Using the Entity- Relationship (ER) Model Chapter 3 Data Modeling Using the Entity- Relationship (ER) Model Elmasri/Navathe, Fundamentals of Database Systems, Fourth Edition Chapter 3-3 Chapter Outline Example Database Application (COMPANY) ER

More information

CSC 742 Database Management Systems

CSC 742 Database Management Systems CSC 742 Database Management Systems Topic #5: Relational Model Spring 2002 CSC 742: DBMS by Dr. Peng Ning 1 Motivation A relation is a mathematical abstraction for a table The theory of relations provides

More information

Data Modeling Using the Entity-Relationship (ER) Model

Data Modeling Using the Entity-Relationship (ER) Model CHAPTER 3 Data Modeling Using the Entity-Relationship (ER) Model Copyright 2017 Ramez Elmasri and Shamkant B. Navathe Slide 1-1 Chapter Outline Overview of Database Design Process Example Database Application

More information

COSC344 Database Theory and Applications. Lecture 5 SQL - Data Definition Language. COSC344 Lecture 5 1

COSC344 Database Theory and Applications. Lecture 5 SQL - Data Definition Language. COSC344 Lecture 5 1 COSC344 Database Theory and Applications Lecture 5 SQL - Data Definition Language COSC344 Lecture 5 1 Overview Last Lecture Relational algebra This Lecture Relational algebra (continued) SQL - DDL CREATE

More information

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

1/24/2012. Chapter 7 Outline. Chapter 7 Outline (cont d.) CS 440: Database Management Systems CS 440: Database Management Systems Chapter 7 Outline Using High-Level Conceptual Data Models for Database Design A Sample Database Application Entity Types, Entity Sets, Attributes, and Keys Relationship

More information

The Relational Model

The Relational Model The Relational Model What is the Relational Model Relations Domain Constraints SQL Integrity Constraints Translating an ER diagram to the Relational Model and SQL Views A relational database consists

More information

Database Applications (15-415)

Database Applications (15-415) Database Applications (15-415) The Relational Model Lecture 3, January 18, 2015 Mohammad Hammoud Today Last Session: The entity relationship (ER) model Today s Session: ER model (Cont d): conceptual design

More information

Copyright 2016 Ramez Elmasr and Shamkant B. Navathei

Copyright 2016 Ramez Elmasr and Shamkant B. Navathei CHAPTER 3 Data Modeling Using the Entity-Relationship (ER) Model Slide 1-2 Chapter Outline Overview of Database Design Process Example Database Application (COMPANY) ER Model Concepts Entities and Attributes

More information

EECS 647: Introduction to Database Systems

EECS 647: Introduction to Database Systems EECS 647: Introduction to Database Systems Instructor: Luke Huan Spring 2009 Administrative I have communicated with KU Bookstore inquring about the text book status. Take home background survey is due

More information

The Relational Model. Chapter 3

The Relational Model. Chapter 3 The Relational Model Chapter 3 Why Study the Relational Model? Most widely used model. Systems: IBM DB2, Informix, Microsoft (Access and SQL Server), Oracle, Sybase, MySQL, etc. Legacy systems in older

More information

Entity Relationship Data Model. Slides by: Shree Jaswal

Entity Relationship Data Model. Slides by: Shree Jaswal Entity Relationship Data Model Slides by: Shree Jaswal Topics: Conceptual Modeling of a database, The Entity-Relationship (ER) Model, Entity Types, Entity Sets, Attributes, and Keys, Relationship Types,

More information

Database Technology. Topic 2: Relational Databases and SQL. Olaf Hartig.

Database Technology. Topic 2: Relational Databases and SQL. Olaf Hartig. Topic 2: Relational Databases and SQL Olaf Hartig olaf.hartig@liu.se Relational Data Model Recall: DB Design Process 3 Relational Model Concepts Relational database: represent data as a collection of relations

More information

SQL STRUCTURED QUERY LANGUAGE

SQL STRUCTURED QUERY LANGUAGE STRUCTURED QUERY LANGUAGE SQL Structured Query Language 4.1 Introduction Originally, SQL was called SEQUEL (for Structured English QUery Language) and implemented at IBM Research as the interface for an

More information

CSE 132A Database Systems Principles

CSE 132A Database Systems Principles CSE 132A Database Systems Principles Prof. Alin Deutsch RELATIONAL DATA MODEL Some slides are based or modified from originals by Elmasri and Navathe, Fundamentals of Database Systems, 4th Edition 2004

More information

Overview of Database Design Process. Data Modeling Using the Entity- Relationship (ER) Model. Two main activities:

Overview of Database Design Process. Data Modeling Using the Entity- Relationship (ER) Model. Two main activities: 1 / 14 Overview of Database Design Process Example Database Application (COMPANY) ER Model Concepts Entities and Attributes Entity Types, Value Sets, and Key Attributes Relationships and Relationship Types

More information

The Relational Model. Chapter 3. Comp 521 Files and Databases Fall

The Relational Model. Chapter 3. Comp 521 Files and Databases Fall The Relational Model Chapter 3 Comp 521 Files and Databases Fall 2012 1 Why Study the Relational Model? Most widely used model by industry. IBM, Informix, Microsoft, Oracle, Sybase, etc. It is simple,

More information

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

Using High-Level Conceptual Data Models for Database Design A Sample Database Application Entity Types, Entity Sets, Attributes, and Keys Chapter 7: Data Modeling Using the Entity- Relationship (ER) Model Using High-Level Conceptual Data Models for Database Design A Sample Database Application Entity Types, Entity Sets, Attributes, and Keys

More information

SQL Introduction. CS 377: Database Systems

SQL Introduction. CS 377: Database Systems SQL Introduction CS 377: Database Systems Recap: Last Two Weeks Requirement analysis Conceptual design Logical design Physical dependence Requirement specification Conceptual data model (ER Model) Representation

More information

Chapter Outline. Note 1. Overview of Database Design Process Example Database Application (COMPANY) ER Model Concepts

Chapter Outline. Note 1. Overview of Database Design Process Example Database Application (COMPANY) ER Model Concepts Chapter Outline Overview of Database Design Process Example Database Application (COMPANY) ER Model Concepts Entities and Attributes Entity Types, Value Sets, and Key Attributes Relationships and Relationship

More information

Data Modeling Using the Entity-Relationship Model

Data Modeling Using the Entity-Relationship Model 3 Data Modeling Using the Entity-Relationship Model Conceptual modeling is a very important phase in designing a successful database application. Generally, the term database application refers to a particular

More information

The Relational Model and Relational Algebra

The Relational Model and Relational Algebra The Relational Model and Relational Algebra Background Introduced by Ted Codd of IBM Research in 1970. Concept of mathematical relation as the underlying basis. The standard database model for most transactional

More information

SQL: A COMMERCIAL DATABASE LANGUAGE. Data Change Statements,

SQL: A COMMERCIAL DATABASE LANGUAGE. Data Change Statements, SQL: A COMMERCIAL DATABASE LANGUAGE Data Change Statements, Outline 1. Introduction 2. Data Definition, Basic Constraints, and Schema Changes 3. Basic Queries 4. More complex Queries 5. Aggregate Functions

More information

The Relational Model 2. Week 3

The Relational Model 2. Week 3 The Relational Model 2 Week 3 1 We have seen how to create a database schema, how do we create an actual database on our computers? professor(pid : string, name : string) course(pid : string, number :

More information

Database Design Process

Database Design Process Database Design Process Real World Functional Requirements Requirements Analysis Database Requirements Functional Analysis Access Specifications Application Pgm Design E-R Modeling Choice of a DBMS Data

More information

Introduction to Relational Databases. Introduction to Relational Databases cont: Introduction to Relational Databases cont: Relational Data structure

Introduction to Relational Databases. Introduction to Relational Databases cont: Introduction to Relational Databases cont: Relational Data structure Databases databases Terminology of relational model Properties of database relations. Relational Keys. Meaning of entity integrity and referential integrity. Purpose and advantages of views. The relational

More information

Relational Model. IT 5101 Introduction to Database Systems. J.G. Zheng Fall 2011

Relational Model. IT 5101 Introduction to Database Systems. J.G. Zheng Fall 2011 Relational Model IT 5101 Introduction to Database Systems J.G. Zheng Fall 2011 Overview What is the relational model? What are the most important practical elements of the relational model? 2 Introduction

More information

The Relational Model. Chapter 3. Database Management Systems, R. Ramakrishnan and J. Gehrke 1

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

More information

We shall represent a relation as a table with columns and rows. Each column of the table has a name, or attribute. Each row is called a tuple.

We shall represent a relation as a table with columns and rows. Each column of the table has a name, or attribute. Each row is called a tuple. Logical Database design Earlier we saw how to convert an unorganized text description of information requirements into a conceptual design, by the use of ER diagrams. The advantage of ER diagrams is that

More information

Database Systems. Lecture2:E-R model. Juan Huo( 霍娟 )

Database Systems. Lecture2:E-R model. Juan Huo( 霍娟 ) Database Systems Lecture2:E-R model Juan Huo( 霍娟 ) Reference slides: http://www.cs.wisc.edu/ dbbook Berkeley, Professor Eben Haber,Professor Mary Roth Review: Benefits of a DBMS 1. Data independence applications

More information

The Relational Model. Outline. Why Study the Relational Model? Faloutsos SCS object-relational model

The Relational Model. Outline. Why Study the Relational Model? Faloutsos SCS object-relational model The Relational Model CMU SCS 15-415 C. Faloutsos Lecture #3 R & G, Chap. 3 Outline Introduction Integrity constraints (IC) Enforcing IC Querying Relational Data ER to tables Intro to Views Destroying/altering

More information

Where Are We? Next Few Lectures. Integrity Constraints Motivation. Constraints in E/R Diagrams. Keys in E/R Diagrams

Where Are We? Next Few Lectures. Integrity Constraints Motivation. Constraints in E/R Diagrams. Keys in E/R Diagrams Where Are We? Introduction to Data Management CSE 344 Lecture 15: Constraints We know quite a bit about using a DBMS Start with real-world problem, design ER diagram From ER diagram to relations -> conceptual

More information

DATABASE DESIGN I - 1DL300

DATABASE DESIGN I - 1DL300 DATABASE DESIGN I - 1DL300 Fall 2009 An introductury course on database systems http://user.it.uu.se/~udbl/dbt1-ht2009/ alt. http://www.it.uu.se/edu/course/homepage/dbastekn/ht09/ Kjell Orsborn Uppsala

More information

DATABASE TECHNOLOGY. Spring An introduction to database systems

DATABASE TECHNOLOGY. Spring An introduction to database systems 1 DATABASE TECHNOLOGY Spring 2007 An introduction to database systems Kjell Orsborn Uppsala Database Laboratory Department of Information Technology, Uppsala University, Uppsala, Sweden 2 Introduction

More information

Slides by: Ms. Shree Jaswal

Slides by: Ms. Shree Jaswal Slides by: Ms. Shree Jaswal Overview of SQL, Data Definition Commands, Set operations, aggregate function, null values, Data Manipulation commands, Data Control commands, Views in SQL, Complex Retrieval

More information

Chapter 7: Entity-Relationship Model

Chapter 7: Entity-Relationship Model Chapter 7: Entity-Relationship Model Database System Concepts, 6 th Ed. See www.db-book.com for conditions on re-use Chapter 7: Entity-Relationship Model Design Process Modeling Constraints E-R Diagram

More information

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

Relational model continued. Understanding how to use the relational model. Summary of board example: with Copies as weak entity COS 597A: Principles of Database and Information Systems Relational model continued Understanding how to use the relational model 1 with as weak entity folded into folded into branches: (br_, librarian,

More information

Chapter 7: Entity-Relationship Model

Chapter 7: Entity-Relationship Model Chapter 7: Entity-Relationship Model Database System Concepts, 6 th Ed. See www.db-book.com for conditions on re-use Chapter 7: Entity-Relationship Model Design Process Modeling Constraints E-R Diagram

More information

Chapter 7: Entity-Relationship Model

Chapter 7: Entity-Relationship Model Chapter 7: Entity-Relationship Model Database System Concepts, 6 th Ed. See www.db-book.com for conditions on re-use Chapter 7: Entity-Relationship Model Design Process Modeling Constraints E-R Diagram

More information

Overview of Database Design Process Example Database Application (COMPANY) ER Model Concepts

Overview of Database Design Process Example Database Application (COMPANY) ER Model Concepts Chapter Outline Overview of Database Design Process Example Database Application (COMPANY) ER Model Concepts Entities and Attributes Entity Types, Value Sets, and Key Attributes Relationships and Relationship

More information

LECTURE 3: ENTITY-RELATIONSHIP MODELING

LECTURE 3: ENTITY-RELATIONSHIP MODELING LECTURE 3: ENTITY-RELATIONSHIP MODELING Ref. Chapter11 + Appendix F from Database Systems: A Practical Approach to Design, Implementation and Management. Thomas Connolly, Carolyn Begg. 1 IS220 : D a t

More information

Class Information. Textbooks. Grading. Final Project. Grading. CS 440: Database Management Systems. Instructor:

Class Information. Textbooks. Grading. Final Project. Grading. CS 440: Database Management Systems. Instructor: CS 440: Database Management Systems Class Information Instructor: Eugene Zhang (zhange@eecs.oregonstate.edu) 2 KEC Office hour: MWF 4:00 5:00 Class web site: http://classes.engr.oregonstate.edu/eecs/winter200/cs440/

More information

The Relational Model. Chapter 3. Comp 521 Files and Databases Fall

The Relational Model. Chapter 3. Comp 521 Files and Databases Fall The Relational Model Chapter 3 Comp 521 Files and Databases Fall 2014 1 Why the Relational Model? Most widely used model by industry. IBM, Informix, Microsoft, Oracle, Sybase, MySQL, Postgres, Sqlite,

More information

The DBMS accepts requests for data from the application program and instructs the operating system to transfer the appropriate data.

The DBMS accepts requests for data from the application program and instructs the operating system to transfer the appropriate data. Managing Data Data storage tool must provide the following features: Data definition (data structuring) Data entry (to add new data) Data editing (to change existing data) Querying (a means of extracting

More information

Relational Model and Relational Algebra

Relational Model and Relational Algebra UNIT-III Relational Model and Relational Algebra 1) Define the following terms with an example for each. 8 Marks (Jun / July2014) Super key: A set of attributes SK of R such that no two tuples in any valid

More information