SKIP Ch.6. Database System Concepts, 6 th Ed. Silberschatz, Korth and Sudarshan See for conditions on re-use

Save this PDF as:
 WORD  PNG  TXT  JPG

Size: px
Start display at page:

Download "SKIP Ch.6. Database System Concepts, 6 th Ed. Silberschatz, Korth and Sudarshan See for conditions on re-use"

Transcription

1 SKIP Ch.6 Database System Concepts, 6 th Ed. See for conditions on re-use

2 Chapter 7: DB Design and the Entity-Relationship (ER) Model Database System Concepts, 6 th Ed. See for conditions on re-use

3 DB Design Layers Like all complex designs, the design of a (large) DB must use abstraction, a.k.a. hierarchical approach, a.k.a. layers or phases Two main strategies: Bottom-up Top-down Ch.7 is devoted to bottom-up (while Ch.8 is topdown) 7.3

4 DB Design Layers DB modeling generraly has 3 levels of abstraction, a.k.a. the three-schema architecture: Level 0: The real-world enterprise. Level 1: Conceptual Model, e.g. E-R model. Level 2: Logical or Implementation Model, e.g. relational model. Level 3: Physical Model, consisting of lowlevel Data Structures, e.g. red-black trees. 7.4

5 Phase 0 Characterize as completely as possible the data needs of the customer (a.k.a. enterprise) DB designer must interact with (talk to) all future users of the DB (a.k.a. domain experts) Outcome: specification of user requirements 7.5

6 Phase 1: Conceptual Design The Entity-Relationship (E-R) model is one of the most widely-used conceptual tools (the other one is UML see for a quick overview) In the E-R model, a DB is modeled as: a collection of entities relationships among entities. Entity = object or thing that exists in the enterprise and is distinguishable from other objects. Examples: specific person, company, place (country, city, county, etc.), event, plant, product, employee 7.6

7 Conceptual Design with the E-R model Entities have attributes Example: people have names and addresses An entity set is a set of entities of the same type that share the same properties. Examples: the set of all persons, companies, trees, holidays 7.7

8 Entity Sets instructor and student instructor_id instructor_name student-id student_name 7.8

9 Conceptual Design with the E-R model Entity sets are not necessarily disjoint, nor covering: Examples: a person can be both a customer and an employee of the bank a person can be neither employee nor customer (resist the temptation of representing EVERYTHING, we have to draw the line somewhere) 7.9

10 Relationships A relationship is an association among several entities Example: (Peltier) advisor (Einstein) student entity relationship set instructor entity A relationship set is a mathematical relation among n 2 entities, each taken from entity sets {(e 1, e 2, e n ) e 1 E 1, e 2 E 2,, e n E n } where (e 1, e 2,, e n ) is a relationship Example: (44553,22222) advisor Subset of the full cartesian product E1 x E2 x x En 7.10

11 Relationship Set advisor For a binary relationship such as this, a relationship set (instance) is simply a bunch of lines 7.11

12 QUIZ: Relationship Sets Let s define a ternary relationship proj_guide by including the entity research project (attributes: ID and name) A relationship set (instance) is now simply a bunch of (fill in the blank) 7.12

13 Relationship Sets (Cont.) An attribute can also be property of a relationship set. Example: the advisor relationship set may have the attribute date which tracks when the student started being associated with the advisor: 7.13

14 QUIZ: Relationship Sets Instead of the ternary relation defined above, can we capture the project as another attribute that is the property of the binary relation? 7.14

15 Degree of a Relationship Set Binary relationship involve two entity sets (or degree two). most relationship sets in a DB are binary. Ternary, quaternary,, n-ary ( arity of a relation) Relationships between more than two entity sets are rare. Most relationships are binary or they can be decomposed into several binary rel. (more on this later) 7.15

16 Attributes An entity is represented by a set of attributes, that is descriptive properties possessed by all members of an entity set. Example: instructor = (ID, name, street, city, salary ) course= (course_id, title, credits) Domain the set of permitted values for each attribute 7.16

17 Attributes Attribute types: Simple and composite attributes. Single-valued and multivalued attributes Example: multivalued attribute: phone_numbers Derived attributes Can be computed from other attributes Example: age can be derived from date_of_birth 7.17

18 Composite Attributes 7.18

19 Representing CONSTRAINTS Mapping Cardinality Constraints Express the number of entities to which another entity can be associated via a relationship set. Most useful in describing binary relationship sets. For a binary relationship set the mapping cardinality must be one of the following types: One to one One to many Many to one Many to many 7.19

20 Mapping Cardinalities One to one One to many Note: Some elements in A and B may not be mapped to any elements in the other set 7.20

21 Mapping Cardinalities Many to one Many to many Note: Some elements in A and B may not be mapped to any elements in the other set! 7.21

22 Representing CONSTRAINTS Participation Constraints Partial participation Total participation 7.22

23 Representing CONSTRAINTS Keys A super key of an entity set is a set of one or more attributes whose values uniquely determine each entity. A candidate key of an entity set is a minimal super key ID is candidate key of instructor course_id is candidate key of course Although several candidate keys may exist, one of the candidate keys is selected to be the primary key (PK). 7.23

24 Keys for Relationship Sets The combination of PKs of the participating entity sets forms a super key of a relationship set. (s_id, i_id) is the super key of advisor NOTE: this means a pair of entity sets can have at most one relationship in a particular relationship set. Example: if we wish to track multiple meeting dates between a student and her advisor, we cannot assume a relationship for each meeting. (We can use a multivalued attribute though.) Must consider the mapping cardinality of the relationship set when deciding what are the candidate keys Need to consider semantics of relationship set in selecting the PK in case of more than one candidate key. 7.24

25 QUIZ: What are the 3 types of constraints can we represent in the ER model? Give examples of each. 7.25

26 QUIZ: What are the 3 types of constraints can we represent in the ER model? Give examples of each. Mapping Cardinality c. Participation c. Keys 7.26

27 Nitty-gritty: 7.4 Redundant Attributes Suppose we have decided to include these entity sets: instructor, with attributes: ID, name, dept_name, salary department, with attributes: dept_name, building, budget and a relationship inst_dept relating instructor and department Problem: Attribute dept_name in entity instructor is redundant since there is an explicit relationship inst_dept which relates instructors to departments The attribute replicates information present in the relationship, and should be removed from instructor BUT: when converting back to tables, in some cases the attribute gets reintroduced, as we will see. HOWEVER: Are instructors associated with only one department? (see discussion on p.273) 7.27

28 7.5 E-R Diagrams Rectangles represent entity sets. Diamonds represent relationship sets. Attributes listed inside entity rectangle Underline indicates primary key attributes 7.28

29 Entity With Composite, Multivalued, and Derived Attributes 7.29

30 Relationship Sets with Attributes 7.30

31 QUIZ: Attributes Make date a composite attribute: mm, dd, yy 7.31

32 QUIZ: Attributes Make date a multivalued attribute 7.32

33 QUIZ: Attributes Make date a derived attribute 7.33

34 Read pp of text Solve Exercises 7.14 and

35 7.35

36 Roles Entity sets of a relationship need not be distinct Each occurrence of an entity set plays a role in the relationship The labels course_id and prereq_id are called roles. 7.36

37 Cardinality Constraints We express cardinality constraints by drawing either a directed line ( ), signifying one, or an undirected line ( ), signifying many, between the relationship set and the entity set. Examples 7.37

38 One-to-One Relationship between an instructor and a student an instructor is associated with at most one student via advisor a student is associated with at most one instructor via advisor 7.38

39 One-to-Many Relationship an instructor is associated with several (including 0) students via advisor a student is associated with at most one instructor via advisor 7.39

40 Many-to-One Relationships an instructor is associated with at most one student via advisor, and a student is associated with several (including 0) instructors via advisor 7.40

41 Many-to-Many Relationship an instructor is associated with several (possibly 0) students via advisor a student is associated with several (possibly 0) instructors via advisor 7.41

42 Participation of an Entity Set in a Relationship Set Total participation (indicated by double line): every entity in the entity set participates in at least one relationship in the relationship set E.g., participation of section in sec_course is total every section must have an associated course Partial participation: some entities may not participate in any relationship in the relationship set Example: participation of instructor in advisor is partial 7.42

43 Include the appropriate mapping cardinality and participation constraints! 7.43

44 Alternative Notation for Cardinality Limits Cardinality limits can also express participation constraints 7.44

45 E-R Diagram with a Ternary Relationship We allow at most one arrow out of a ternary (or greater degree) relationship to indicate a cardinality constraint E.g., an arrow from proj_guide to instructor indicates each student has at most one guide for a project 7.45

46 Cardinality Constraints on Ternary Relationship If there is more than one arrow, there are two ways of defining the meaning. E.g., a ternary relationship R between A, B and C with arrows to B and C could mean 1. each A entity is associated with a unique entity from B and C or 2. each pair of entities from (A, B) is associated with a unique C entity, and each pair (A, C) is associated with a unique B Each alternative has been used in different formalisms To avoid confusion we outlaw more than one arrow 7.46

47 Construct another E-R diagram for the car insurance company; this time, the DB needs to capture not only what cars were involved in each accident, but also who the driver was. 7.47

48 Construct another E-R diagram for the car insurance company; this time, the DB needs to capture not only what cars were involved in each accident, but also who the driver was. participated is a ternary relationship! 7.48

49 7.5.6 Weak Entity Sets An entity set that does not have a primary key is referred to as a weak entity set. Needs an identifying entity set It must relate to the identifying entity set via a total, one-tomany relationship set from the identifying to the weak entity set Identifying relationship depicted using a double diamond 7.49

50 Weak Entity Sets The discriminator (or partial key) of a weak entity set is the set of attributes that distinguishes among all the entities of a weak entity set. Marked with dashed lines The primary key of a weak entity set is formed by the primary key of the strong entity set on which the weak entity set is existence dependent, plus the weak entity set s discriminator. 7.50

51 Notes: Weak Entity Sets The PK of the strong entity set is not explicitly stored with the weak entity set, since it is implicit in the identifying relationship. If course_id were explicitly stored, section could be made a strong entity, but then the relationship between section and course would be duplicated by an implicit relationship defined by the attribute course_id common to course and section. 7.51

52 QUIZ: Weak Entity Sets Exercise 7.19: We can convert any weak entity to a strong one by adding appropriate attributes. Why, then, have weak entities at all? 7.52

53 A weak entity can participate in other relationships besides the identifying one 7.53

54 7.6 Converting the ER model to Relational Schemas, a.k.a. REDUCTION 7.54

55 Reduction to Relation Schemas Entity sets and relationship sets can be expressed uniformly as relation schemas that represent the contents of the database. A DB which conforms to an E-R diagram can be represented by a collection of schemas. For each entity set and relationship set there is a unique schema that is assigned the name of the corresponding entity set or relationship set. Each schema has a number of columns (generally corresponding to attributes), which have unique names. 7.55

56 Reducing Entity Sets w/simple Attributes A strong entity set reduces to a schema with the same attributes, e.g. student(id, name, tot_cred) 7.56

57 Reducing Entity Sets w/simple Attributes A weak entity set becomes: 1. a table that includes a column for the primary key of the identifying strong entity set section: course_id, sec_id, semester, year 2. a Foreign Key: course_id REFERENCES course 7.57

58 Reducing Entity Sets w/simple Attributes A weak entity set becomes: 1. a table that includes a column for the primary key of the identifying strong entity set section: course_id, sec_id, semester, year 2. a Foreign Key: course_id REFERENCES course Exercise 7.8: Do the PK and FK enforce the many-to-one cardinality constraint? Explain. 7.58

59 Individual work for next time: Read pp of text Draw the ER diagrams for Practice Exercises 7.1 and 7.2 (including constraints!) 7.59

60 QUIZ Why is OrderItem a weak entity in this ER diagram? There is no standard for E-R diagram notation; different books and E-R diagram software use different notations. See Section Database Source: System Concepts - 6 th Edition 7.60

61 QUIZ How do we reduce the weak entity in this ER diagram? Database Source: System Concepts - 6 th Edition 7.61

62 QUIZ Using the tables Orders and OrderItem, write a query that returns all the items in order #

63 QUIZ Using the tables Orders and OrderItem, write a query that returns all the items in order # 42. SELECT OrderItem.ItemLineNumber FROM Orders NATURAL JOIN OrderItem WHERE Orders.OrderNumber = 42; 7.63

64 QUIZ What is the mistake in the relationship Contains? Database Source: System Concepts - 6 th Edition 7.64

65 QUIZ A: Contains should be many on the OrderItem side! (Why?) Database Source: System Concepts - 6 th Edition 7.65

66 QUIZ 7.66

67 QUIZ 7.67

68 QUIZ Ease of access: Once the parent key is known, related dependent entities can be accessed quicker via their partial key (discriminator). More on this at indexes Ch

69 Reducing Relationship Sets A many-to-many relationship set is represented as a schema with attributes for the primary keys of the two participating entity sets, and any descriptive attributes of the relationship set. Example: schema for relationship set advisor advisor = (s_id, i_id) 7.69

70 Reducing Relationship Sets Many-to-one and one-to-many relationship sets that are total on the many side can be represented by adding an extra attribute to the many side, containing the PK of the one side. Example: Instead of creating a schema for relationship set inst_dept, add an attribute dept_name to the schema arising from entity set instructor 7.70

71 Reducing Relationship Sets For one-to-one relationship sets, either side can be chosen to act as the many side The extra attribute can be added to either of the tables corresponding to the two entity sets If participation is partial on the many side, replacing a schema by an extra attribute in the schema corresponding to the many side could result in null values 7.71

72 QUIZ: Reduce the circled part of the ER diagram 7.72

73 QUIZ: Reduce the circled part of the ER diagram 7.73

74 Redundancy The schema corresponding to a relationship set linking a weak entity set to its identifying strong entity set is redundant do not represent! Example: The section schema already contains the attributes that would appear in the sec_course schema: 7.74

75 Composite Attributes Composite attributes are flattened out by creating a separate attribute for each component attribute Example: Ignoring multivalued attributes, the flat instructor schema is: Instructor (ID, first_name, middle_initial, last_name, street_number, street_name, apt_number, city, state, zip_code, date_of_birth) 7.75

76 Multi-valued Attributes A multivalued attribute M of an entity E is represented by a separate schema EM Schema EM has attributes corresponding to the primary key of E and an attribute corresponding to multivalued attribute M Example: Multivalued attribute phone_number of instructor is represented by a schema: inst_phone= ( ID, phone_number) Each value of the multivalued attribute maps to a separate tuple of the relation on schema EM For example, an instructor entity with primary key and phone numbers and maps to two tuples: (22222, ) and (22222, ) 7.76

77 Multi-valued Attributes Special case: The entity time_slot has only one attribute other than the primary-key attribute, and that attribute is multivalued Optimization: Don t create the relation corresponding to the entity, just create the one corresponding to the multivalued attribute time_slot(time_slot_id, day, start_time, end_time) Caveat: time_slot attribute of section (from sec_time_slot) cannot be a foreign key due to this optimization 7.77

78 Remember that we called ER modeling a bottom-up method of design 7.78

79 Combination If an entity has total participation in a relationship, we can combine its schema to that of the relationship 7.79

80 Combination What happens to the FKs? 7.80

81 Combination See p.289 for more examples 7.81

82 READ 7.7 Design Issues SKIP the rest of Ch.7 Homework for Ch. 7: One-page report on Section 7.7 End-of-chapter 20, 23 Due next Tue, April

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

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

More information

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

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

More information

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

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

More information

Basic Database Concepts

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

More information

Chapter 2: Entity-Relationship Model

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

More information

Chapter 7: Entity-Relationship Model! CS425 Fall 2013 Boris Glavic! Chapter 7: Entity-Relationship Model! Database Design! Database Design!

Chapter 7: Entity-Relationship Model! CS425 Fall 2013 Boris Glavic! Chapter 7: Entity-Relationship Model! Database Design! Database Design! Chapter 7: ntity-elationship Model! Design Process! CS425 Fall 2013 Boris Glavic Chapter 7: ntity-elationship Model! Partially taken from! Klaus. Dittrich! Modeling! Constraints! - Diagram! Design Issues!

More information

Lesson 8: Introduction to Databases E-R Data Modeling

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

More information

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

We know how to query a database using SQL. A set of tables and their schemas are given Data are properly loaded E-R Diagram Database Development We know how to query a database using SQL A set of tables and their schemas are given Data are properly loaded But, how can we develop appropriate tables and their schema

More information

CSCD43: Database Systems Technology. Lecture 2

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

More information

ER modelling, Weak Entities, Class Hierarchies, Aggregation

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

More information

Entity-Relationship (ER) Model

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

More information

CPS352 Database Systems: Design Project

CPS352 Database Systems: Design Project CPS352 Database Systems: Design Project Purpose: Due: To give you experience with designing and implementing a database to model a real domain Various milestones due as shown in the syllabus Requirements

More information

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

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

More information

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 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

More information

HNDIT 1105 Database Management Systems

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

More information

Database Design and the E-R Model

Database Design and the E-R Model C H A P T E R 7 Database Design and the E-R Model Practice Exercises 7.1 Answer: The E-R diagram is shown in Figure 7.1. Payments are modeled as weak entities since they are related to a specific policy.

More information

Database Design. October 24, 2008. Database Design

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

More information

Foundations of Information Management

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:

More information

Mapping Data Models to a Relational Database

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

More information

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

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

More information

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 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

More information

2. Conceptual Modeling using the Entity-Relationship Model

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

More information

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 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

More information

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

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

More information

The Entity-Relationship Model. Steps in Database Design

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

More information

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: 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

More information

Database Design and the Entity-Relationship Model

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

More information

OVERVIEW 1.1 DATABASE MANAGEMENT SYSTEM (DBMS) DEFINITION:-

OVERVIEW 1.1 DATABASE MANAGEMENT SYSTEM (DBMS) DEFINITION:- 1 1 OVERVIEW Topics Covered: 1.1 Database management system 1.2 Data Independence 1.3 Data Abstraction 1.4 Data Models 1.5 DBMS Architecture 1.6 Users of DBMS 1.7 Overview of Conventional Data Models 1.1

More information

Entity-Relationship Model

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

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 LECTURE OUTLINE Using High-Level, Conceptual Data Models for Database Design Entity-Relationship (ER) model Popular high-level conceptual

More information

XV. The Entity-Relationship Model

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

More information

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

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,

More information

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

BİL 354 Veritabanı Sistemleri. Entity-Relationship Model BİL 354 Veritabanı Sistemleri Entity-Relationship Model Steps in building a DB application Pick application domain Conceptual design How can I describe that data? What data do I need for my application

More information

Exercise 1: Relational Model

Exercise 1: Relational Model Exercise 1: Relational Model 1. Consider the relational database of next relational schema with 3 relations. What are the best possible primary keys in each relation? employ(person_name, street, city)

More information

Database Design and the ER model

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

More information

CPSC 304 Introduction to Database Systems

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

More information

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

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?

More information

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

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

More information

Mapping an ERD to a Relational Database

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

More information

three Entity-Relationship Modeling chapter OVERVIEW CHAPTER

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

More 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 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

More information

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

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/

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 Chapter Outline Overview of Database Design Process Example Database Application (COMPANY) ER Model Concepts Entities and Attributes Entity

More information

Foundations of Information Management

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

More information

The Relational Data Model: Structure

The Relational Data Model: Structure The Relational Data Model: Structure 1 Overview By far the most likely data model in which you ll implement a database application today. Of historical interest: the relational model is not the first implementation

More information

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

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

More information

Database Management Systems

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

More information

The Entity-Relationship Model

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

More information

DATABASE INTRODUCTION

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

More information

Data Modelling and E-R Diagrams

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

More information

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

The E-R èentity-relationshipè data model views the real world as a set of basic objects èentitiesè and CMPT-354-Han-95.3 Lecture Notes September 20, 1995 Chapter 2 The Entity-Relationship Model The E-R èentity-relationshipè data model views the real world as a set of basic objects èentitiesè and relationships

More information

The Entity-Relationship Model

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

More information

www.gr8ambitionz.com

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

More information

The Entity-Relationship (ER) Model

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

More information

Introduction to normalization. Introduction to normalization

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

More information

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

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

More information

Lecture 12: Entity Relationship Modelling

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

More information

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

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

More information

Component 4: Introduction to Information and Computer Science

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

More information

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

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

More information

IV. The (Extended) Entity-Relationship Model

IV. The (Extended) Entity-Relationship Model IV. The (Extended) Entity-Relationship Model The Extended Entity-Relationship (EER) Model Entities, Relationships and Attributes Cardinalities, Identifiers and Generalization Documentation of EER Diagrams

More information

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 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

More information

Entity Relationship Diagram

Entity Relationship Diagram Yufei Tao Department of Computer Science and Engineering Chinese University of Hong Kong A primary goal of database design is to decide what tables to create. Usually, there are two principles: 1 Capture

More information

Database Design Methodology

Database Design Methodology Database Design Methodology Three phases Database Design Methodology Logical database Physical database Constructing a model of the information used in an enterprise on a specific data model but independent

More information

1 the relational data model The relational model of data was introduced by E.F. Codd (1970). 1.1 relational model concepts The relational model repres

1 the relational data model The relational model of data was introduced by E.F. Codd (1970). 1.1 relational model concepts The relational model repres database systems formal definitions of the relational data model [03] s. yurttaοs 1 1 the relational data model The relational model of data was introduced by E.F. Codd (1970). 1.1 relational model concepts

More information

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

Requirement Analysis & Conceptual Database Design. Problem analysis Entity Relationship notation Integrity constraints Generalization Requirement Analysis & Conceptual Database Design Problem analysis Entity Relationship notation Integrity constraints Generalization Introduction: Lifecycle Requirement analysis -> Text Conceptual Design

More information

Designing a Database Schema

Designing a Database Schema Week 10: Database Design Database Design From an ER Schema to a Relational One Restructuring an ER schema Performance Analysis Analysis of Redundancies, Removing Generalizations Translation into a Relational

More information

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

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

More information

SQL DDL. Applied Databases. Inclusion Constraints. Key Constraints

SQL DDL. Applied Databases. Inclusion Constraints. Key Constraints Applied Databases Handout 2. Database Design. 5 October 2010 SQL DDL In its simplest use, SQL s Data Definition Language (DDL) provides a name and a type for each column of a table. CREATE TABLE Hikers

More information

Relational Database Concepts

Relational Database Concepts Relational Database Concepts IBM Information Management Cloud Computing Center of Competence IBM Canada Labs 1 2011 IBM Corporation Agenda Overview Information and Data Models The relational model Entity-Relationship

More information

ENTITY-RELATIONSHIP (ER) MODEL. 1. Background (Five Levels of Relational Database Design)

ENTITY-RELATIONSHIP (ER) MODEL. 1. Background (Five Levels of Relational Database Design) Lecture Note #2 COSC4820/5820 Database Systems Department of Computer Science University of Wyoming Byunggu Yu, 01/21/2002 ENTITY-RELATIONSHIP (ER) MODEL (Originally designed by Peter Chen, 1976) 1. Background

More information

DATABASE MANAGEMENT SYSTEMS. Question Bank:

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?

More information

Conceptual Design: Entity Relationship Models. Objectives. Overview

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,

More information

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

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

More information

Relational Database Basics Review

Relational Database Basics Review Relational Database Basics Review IT 4153 Advanced Database J.G. Zheng Spring 2012 Overview Database approach Database system Relational model Database development 2 File Processing Approaches Based on

More information

7.1 The Information system

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

More information

SCHEMAS AND STATE OF THE DATABASE

SCHEMAS AND STATE OF THE DATABASE SCHEMAS AND STATE OF THE DATABASE Schema the description of a database specified during database design relatively stable over time Database state the data in a database at a particular moment the set

More information

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

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

More information

ETEC 2601 Database Systems

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

More information

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

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

More information

1 Class Diagrams and Entity Relationship Diagrams (ERD)

1 Class Diagrams and Entity Relationship Diagrams (ERD) 1 Class Diagrams and Entity Relationship Diagrams (ERD) Class diagrams and ERDs both model the structure of a system. Class diagrams represent the dynamic aspects of a system: both the structural and behavioural

More information

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. 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

More information

Introduction. Database Management Systems

Introduction. Database Management Systems Introduction Database Management Systems Database Management System (DBMS) Collection of interrelated data and set of programs to access the data Convenient and efficient processing of data Database Application

More information

Data Modeling. Relationships within the Relational Database:

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

More information

Database Design Process

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

More information

Concept of DBMS UNIT. Structure. Learning Objectives

Concept of DBMS UNIT. Structure. Learning Objectives UNIT 1 Concept of DBMS Structure 1.0 Introduction 1.1 Purpose of Data Base Systems 1.2 Data Abstraction 1.3 Instance, Schema and Sub-Schema 1.4 Data Independence 1.5 Data Models 1.6 Data Base Languages

More information

A. TRUE-FALSE: GROUP 2 PRACTICE EXAMPLES FOR THE REVIEW QUIZ:

A. TRUE-FALSE: GROUP 2 PRACTICE EXAMPLES FOR THE REVIEW QUIZ: GROUP 2 PRACTICE EXAMPLES FOR THE REVIEW QUIZ: Review Quiz will contain very similar question as below. Some questions may even be repeated. The order of the questions are random and are not in order of

More information

Databases and BigData

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)

More information

Data Modeling Basics

Data Modeling Basics Information Technology Standard Commonwealth of Pennsylvania Governor's Office of Administration/Office for Information Technology STD Number: STD-INF003B STD Title: Data Modeling Basics Issued by: Deputy

More information

Fundamentals of Database Design

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

More information

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

Chapter 1: Introduction. Database Management System (DBMS) University Database Example This image cannot currently be displayed. Chapter 1: Introduction Database System Concepts, 6 th Ed. See www.db-book.com for conditions on re-use Database Management System (DBMS) DBMS contains information

More information

Database Design Process

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:

More information

Fundamentals of Database System

Fundamentals of Database System Fundamentals of Database System Chapter 4 Normalization Fundamentals of Database Systems (Chapter 4) Page 1 Introduction To Normalization In general, the goal of a relational database design is to generate

More information

CSC 742 Database Management Systems

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

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

An Example: Video Rental System

An Example: Video Rental System An Example: Video Rental System Video Rental Database Customers Rentals Videos E-R Analysis ERD Example CUSTOMER PRODUCER E-R Analysis Attributes Attribute - property or characteristic of an entity type

More information

Chapter 11. Entity-Relationship Modelling

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

More information

Introduction to Database Design. Overview of Database Design

Introduction to Database Design. Overview of Database Design Introduction to Database Design Chapter 2 Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 1 Overview of Database Design Requirements Analysis The very first step in designing a database

More information

Data Model ing Essentials

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

More information

Database IST400/600. Jian Qin. A collection of data? A computer system? Everything you collected for your group project?

Database IST400/600. Jian Qin. A collection of data? A computer system? Everything you collected for your group project? Relational Databases IST400/600 Jian Qin Database A collection of data? Everything you collected for your group project? A computer system? File? Spreadsheet? Information system? Date s criteria: Integration

More information