Part 7. Logical Data Structures

Size: px
Start display at page:

Download "Part 7. Logical Data Structures"

Transcription

1 Part 7 Logical Data Structures

2 Logical Database Design Constructive approach Considers semantics Documents data dependencies identifiers entities needed relations rules Copyright Thomas P. Sturm Logical Data Structures Part 7, Page 2

3 Logical Data Structures (LDS) Graphical means of naming and depicting the types of data in a database Simple, yet precise Useful to technically oriented analysts application-oriented users Easy to read Supports the design task logical structure design is hard tool aids the design task notation does not get in the way Copyright Thomas P. Sturm Logical Data Structures Part 7, Page 3

4 Entity Basic LDS Components any type of thing about which information is maintained entity_name EXAMPLE student Attribute a characteristic of exactly one entity (fully functionally dependent on the entity) attribute_name EXAMPLE: Student attributes student student_name student_id# soc_sec# Relationships an association between a pair of entities (or roles ), one-to-one, one-to-many only or but never Copyright Thomas P. Sturm Logical Data Structures Part 7, Page 4

5 Example Relationships 1-1 Example: Monogamous marriage man woman Can label relationship man wife of man/ husband of woman woman 1-M Example: Students of a college college student Need not label a relationship if it can be stated as: college of student / students of college or student has college / college has students Copyright Thomas P. Sturm Logical Data Structures Part 7, Page 5

6 Handling an M-M Relationship M-M Example: Brother - Sister man_name man sisters of man/ brothers of woman woman woman_name Problem: how do you represent the presence of sibling rivalry? THIS WON'T WORK man_name woman_name man woman rivalry SOLUTION man_name woman_name man woman brother-sister rivalry Copyright Thomas P. Sturm Logical Data Structures Part 7, Page 6

7 Identifier Representation Identifier: a set of attributes or relationships that uniquely identify an instance of an entity (single field key) (multiple-field key) Example: college_name student_name student_id# college student college# soc_sec# Copyright Thomas P. Sturm Logical Data Structures Part 7, Page 7

8 Primary Key / Candidate Key state_name city_name state city state_abbrev city# primary key candidate key Copyright Thomas P. Sturm Logical Data Structures Part 7, Page 8

9 Sample Database Employee: (emp) attributes: Ename, Job, Mgr, Hired, Rate, Bonus Department: (dept) attributes: DeptNo, Dname, Loc, Dbudget Task: (task) attributes: Tname, Hours Project: (proj) attributes: Project_id, Description, Pbudget, Due_date Relationships employees are members of a department employees have a manager who is an employee employees are assigned to tasks on projects Copyright Thomas P. Sturm Logical Data Structures Part 7, Page 9

10 LDS for Sample Database DeptNo Dname Loc dept Ename Job Hired Rate Dbudget emp Mgr Bonus Tname task Project_id Description Hours proj Pbudget Due_date Copyright Thomas P. Sturm Logical Data Structures Part 7, Page 10

11 Functional Dependency Revisited DeptNo Dname Loc Dbudget Ename Job Rate dept emp DeptNo identifies dept instances DeptNo --> Dbudget dependent on DeptNo DeptNo --> Loc on DeptNo Dname is an alternate key Dname --> Dbudget dependent on Dname Ename identifies emp instances Ename --> Job on Ename Ename --> Rate dependent on Ename Dbudget is fully functionally Loc is fully functionally dependent Dbudget is fully functionally Job is fully functionally dependent Rate is fully functionally an employee instance determines exactly one department Ename --> DeptNo DeptNo is fully functionally dependent on Ename Ename --> Loc Loc is fully functionally dependent on Ename, but this is a transitive full functional dependence Copyright Thomas P. Sturm Logical Data Structures Part 7, Page 11

12 LDS for Example 1 - Suppliers A supplier supplies many parts, and a part can be supplied by many suppliers supplier part supp part_type availability Copyright Thomas P. Sturm Logical Data Structures Part 7, Page 12

13 LDS for Example 2 - Inventory A product can be stored in many warehouses and a warehouse can contain many products part# warehouse# wh_address product warehouse inventory quantity Copyright Thomas P. Sturm Logical Data Structures Part 7, Page 13

14 LDS for Example 3 - Departments A department can have many employees, and employee can only be in one department dept dept_loc name department employee Copyright Thomas P. Sturm Logical Data Structures Part 7, Page 14

15 LDS for Example 4 - Locations Departments have one number, one name, and one location dept# dept_name dept_loc department Copyright Thomas P. Sturm Logical Data Structures Part 7, Page 15

16 LDS for Example 5 - Stock An inventory is comprised of combinations of various parts from various suppliers - a supplier can supply many parts, and a part can be supplied by many suppliers p# s# sname part supplier inventory qty Copyright Thomas P. Sturm Logical Data Structures Part 7, Page 16

17 LDS for Example 6 - Enrollment A student can take many subjects; a subject can be taken by many students. A subject can be taught by many teachers, a teacher can teach only one subject. A student can be taught by many teachers, a teacher can teach many students. student subject stu subj registration teach teacher Copyright Thomas P. Sturm Logical Data Structures Part 7, Page 17

18 LDS for EXAMPLE 7 - SKILLS Employees can have many skills, and a skill can be had by many employees; an employee can know many languages and a language can be known by many employees. employee skill emp job_skill emp/lang/job_skill This diagram is correct if all 3 are interdependent language lang employee emp job_skill skill language This diagram is almost never correct lang (It implies that a skill can be held by only one employee) Copyright Thomas P. Sturm Logical Data Structures Part 7, Page 18

19 CORRECT LDS for INDEPENDENCE Assuming job skills and language skills are independent, they represent two separate many-to-many relationships employee emp/job_skill skill emp job_skill emp-lang language lang Copyright Thomas P. Sturm Logical Data Structures Part 7, Page 19

20 LDS for EXAMPLE 8 - DEALERSHIPS In the general case, a contract involves one dealer, one manufacturer, and one product. A dealer can have many contracts, a manufacturer can have many contracts, and a product can be mentioned in many contracts. agent company dealership manufacturer contract This diagram is correct in the general case product vehicle Copyright Thomas P. Sturm Logical Data Structures Part 7, Page 20

21 DEALERSHIPS with CONSTRAINTS Dealers can deal with many manufacturers, and manufacturers with many dealers. Dealers can sell many vehicle types and vehicle types can be sold by many dealers. Manufacturers can make many vehicles and vehicles can be made by many manufacturers. The combinations of who sells what is determined by symmetry. agent dealer-mfgr company dealer manufacturer dealer-vehicle mfgr-vehicle vehicle product Copyright Thomas P. Sturm Logical Data Structures Part 7, Page 21

22 LDS for EXAMPLE 9 - CUSTOMERS A branch has many customers; a customer is in only one branch. There are only a limited number of legal branch names. branch cust# legal_branch customer Copyright Thomas P. Sturm Logical Data Structures Part 7, Page 22

23 Entities: it must have identifier attributes relationships Modeling Concepts it must be the focus of the system need to develop for it : name description membership criteria must examine roles within subsets of it Attributes: must be non-transitively fully functionally dependent on the entity it describes must develop for each attribute: name description domain definition Copyright Thomas P. Sturm Logical Data Structures Part 7, Page 23

24 Concept of Roles when 2 entities share a set of attributes OR when 2 entities have more than one relationship between them OR when subsets of an entity-instance have different attributes OR when subsets of an entity-instance participate in different relationships THEN MULTIPLE ROLES EXIST Examples of roles in the sample database: In emp, an employee plays 2 roles: works in a department (some) manages department In emp regular employees report to managers in the same department managers report to managers in a different department In emp, certain employees eligible for bonus (even if 0) ROLES ARE DOCUMENTED WHEN THEY ARE SIGNIFICANT Copyright Thomas P. Sturm Logical Data Structures Part 7, Page 24

25 Alternate LDS for Sample Database DeptNo Dname Loc dept Ename Job Hired Rate Dbudget emp isa Mgr Tname Bonus task Project_id Description Hours proj Pbudget Due_date This has changed the rule about the group of employees for whom the bonus is applicable. Previously, analysts were technically eligible, even if none of them actually received a bonus. Copyright Thomas P. Sturm Logical Data Structures Part 7, Page 25

26 Identifiers: Modeling Concepts (Continued) determine which attributes are part of it verify uniqueness establish not null requirements Relationships: establish degree 1-1 or 1-M entity on 1 side must be functionally dependent on entity on M side develop: - name - definition incorporate constraints, rules note referential integrity - (values of foreign key must exist in key field of another relation) - (e.g. in the emp relation, if an employee is listed as being in department 402, then in the dept relation there must contain a row with a key value of 402) Copyright Thomas P. Sturm Logical Data Structures Part 7, Page 26

27 Entity Analysis Oneness Sameness Categorization Identification Other Modeling Methods Object Abstraction (Smith & Smith) Objective: Intellectual Manageability Create hierarchies of abstraction along 2 dimensions: - aggregation (has / part of) - generalization (is / subtype) Copyright Thomas P. Sturm Logical Data Structures Part 7, Page 27

28 Object Extraction Examples Aggregation (has / part of) department task Tname Hours employee project Ename Job Project_id Pbudget Generalization (is / subtype) employee Ename Rate programmer clerk analyst supervisor language_skills type_speed bonus other_employee Copyright Thomas P. Sturm Logical Data Structures Part 7, Page 28

29 LDS Map LDS to Well-Formed Relations Relational Model entity relation name attribute descriptor attribute single-valued relationship attribute (foreign key) descriptor multi-valued relationship nothing descriptor 1-1 relationship either or both relationship descriptors are attributes 1-M relationship relationship descriptor with degree 1 (on the M side) is an attribute Copyright Thomas P. Sturm Logical Data Structures Part 7, Page 29

30 LDS fi Relations Examples Example: College students college_name student_name student_id# college student college# soc_sec# college (college#, college_name) student (student#, college#, student_name, soc_sec#) Copyright Thomas P. Sturm Logical Data Structures Part 7, Page 30

31 Sample Database Relations (See page 10 for the Sample Database LDS) dept (DeptNo, Dname, Loc, Dbudget) emp in emp (Ename, Job, Mgr, Hired, Rate, Bonus, DeptNo) proj (Project_id, Description, Pbudget, Due_date) task (Tname, Ename, Project_id, Hours Copyright Thomas P. Sturm Logical Data Structures Part 7, Page 31

32 Relations for Example 1 - Suppliers supplier part supp part_type availability supp (supplier) part_type (part) availability (supplier, part) Copyright Thomas P. Sturm Logical Data Structures Part 7, Page 32

33 Relations for Example 2 - Inventory part# warehouse# wh_address product warehouse inventory quantity product (part#) warehouse (warehouse#, wh_address) inventory (part#, warehouse#, quantity) Copyright Thomas P. Sturm Logical Data Structures Part 7, Page 33

34 Relations for Example 3 - Departments dept dept_loc name department employee department (dept, dept_loc) employee (name, dept) Copyright Thomas P. Sturm Logical Data Structures Part 7, Page 34

35 Relations for Example 4 - Locations dept# dept_name dept_loc department department (dept#, dept_name, dept_loc) Copyright Thomas P. Sturm Logical Data Structures Part 7, Page 35

36 p# Relations for Example 5 - Stock s# sname part supplier inventory qty part (p#) supplier (s#, sname) inventory (p#, s#, qty) Copyright Thomas P. Sturm Logical Data Structures Part 7, Page 36

37 Relations for Example 6 - Enrollment student subject stu subj registration teach teacher stu (student) subj (subject) teach (teacher, subject) registration (student, teacher) Copyright Thomas P. Sturm Logical Data Structures Part 7, Page 37

38 Relations for Example 7 - Skills employee emp/job_skill skill emp job_skill emp-lang language lang emp (employee) job_skill (skill) lang (language) emp/job_skill (employee, skill) emp-lang (employee, language) Copyright Thomas P. Sturm Logical Data Structures Part 7, Page 38

39 Relations for Example 8 - Dealerships (See page 21 for Dealership LDS with symmetry restrictions) dealer (agent) manufacturer (company) vehicle (product) dealer-mfgr (agent, company) dealer-vehicle (agent, product) mfgr-vehicle (company, product) Copyright Thomas P. Sturm Logical Data Structures Part 7, Page 39

40 Copyright Thomas P. Sturm Logical Data Structures Part 7, Page 40

Detailed Data Modelling: Attribute Collection and Normalisation of Data

Detailed Data Modelling: Attribute Collection and Normalisation of Data Detailed Data Modelling IMS1002 /CSE1205 Systems Analysis and Design Detailed Data Modelling: Attribute Collection and Normalisation of Data The objective of detailed data modelling is to develop a detailed

More information

Database Management Systems. Chapter 2 Part 2

Database Management Systems. Chapter 2 Part 2 Database Management Systems Chapter 2 Part 2 Introduction to Database Design Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 1 Class Hierarchies Classify entities sets into Super-class and

More information

King Fahd University of Petroleum and Minerals

King Fahd University of Petroleum and Minerals 1 King Fahd University of Petroleum and Minerals Information and Computer Science Department ICS 334: Database Systems Semester 041 Major Exam 1 18% ID: Name: Section: Grades Section Max Scored A 5 B 25

More information

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

Detailed Data Modelling. Detailed Data Modelling. Detailed Data Modelling. Identifying Attributes. Attributes IMS1002 /CSE1205 Systems Analysis and Design Detailed Data Modelling The objective of detailed data modelling is to develop a detailed data structure that: Detailed Data Modelling: Attribute Collection

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

Contents. Database. Information Policy. C03. Entity Relationship Model WKU-IP-C03 Database / Entity Relationship Model

Contents. Database. Information Policy. C03. Entity Relationship Model WKU-IP-C03 Database / Entity Relationship Model Information Policy Database C03. Entity Relationship Model Code: 164323-03 Course: Information Policy Period: Spring 2013 Professor: Sync Sangwon Lee, Ph. D 1 Contents 01. Overview of Database Design 02.

More information

The Entity-Relationship (ER) Model 2

The Entity-Relationship (ER) Model 2 The Entity-Relationship (ER) Model 2 Week 2 Professor Jessica Lin Keys Differences between entities must be expressed in terms of attributes. A superkey is a set of one or more attributes which, taken

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

CIS 330: Web-driven Web Applications. Lecture 2: Introduction to ER Modeling

CIS 330: Web-driven Web Applications. Lecture 2: Introduction to ER Modeling CIS 330: Web-driven Web Applications Lecture 2: Introduction to ER Modeling 1 Goals of This Lecture Understand ER modeling 2 Last Lecture Why Store Data in a DBMS? Transactions (concurrent data access,

More information

Database Design. Database Design I: The Entity-Relationship Model. Entity Type (con t) Representation in Relational Model.

Database Design. Database Design I: The Entity-Relationship Model. Entity Type (con t) Representation in Relational Model. Database Design Database Design I: The Entity-Relationship Model Chapter 5 Goal: specification of database schema Methodology: Use E-R R model to get a high-level graphical view of essential components

More information

Modeling Your Data. Chapter 2. cs542 1

Modeling Your Data. Chapter 2. cs542 1 Modeling Your Data Chapter 2 cs542 1 Part II Discussion of the Model: Good Design/ Bad Design cs542 2 Design : The Obvious Use meaningful and descriptive s (it s for the human after all) Keep as simple

More information

Introduction to Database Design. Dr. Kanda Runapongsa Dept of Computer Engineering Khon Kaen University

Introduction to Database Design. Dr. Kanda Runapongsa Dept of Computer Engineering Khon Kaen University Introduction to Database Design Dr. Kanda Runapongsa (krunapon@kku.ac.th) Dept of Computer Engineering Khon Kaen University Overview What are the steps in designing a database? Why is the ER model used

More information

MIS Database Systems Entity-Relationship Model.

MIS Database Systems Entity-Relationship Model. MIS 335 - Database Systems Entity-Relationship Model http://www.mis.boun.edu.tr/durahim/ Ahmet Onur Durahim Learning Objectives Database Design Main concepts in the ER model? ER Diagrams Database Design

More information

COSC 304 Introduction to Database Systems. Entity-Relationship Modeling

COSC 304 Introduction to Database Systems. Entity-Relationship Modeling COSC 304 Introduction to Database Systems Entity-Relationship Modeling Dr. Ramon Lawrence University of British Columbia Okanagan ramon.lawrence@ubc.ca Conceptual Database Design Conceptual database design

More information

Sankalchand Patel College of Engineering, Visnagar B.E. Semester III (CE/IT) Database Management System Question Bank / Assignment

Sankalchand Patel College of Engineering, Visnagar B.E. Semester III (CE/IT) Database Management System Question Bank / Assignment Sankalchand Patel College of Engineering, Visnagar B.E. Semester III (CE/IT) Database Management System Question Bank / Assignment Introductory concepts of DBMS 1. Explain detailed 3-level architecture

More information

The Entity-Relationship Model

The Entity-Relationship Model The Entity-Relationship Model Chapter 2 Database Management Systems, R. Ramakrishnan and J. Gehrke 1 Overview of Database Design Conceptual design: (ER Model is used at this stage.) What are the entities

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

Lecture3: Data Modeling Using the Entity-Relationship Model.

Lecture3: Data Modeling Using the Entity-Relationship Model. College of Computer and Information Sciences - Information Systems Dept. Lecture3: Data Modeling Using the Entity-Relationship Model. Ref. Chapter12 Prepared by L. Nouf Almujally & Aisha AlArfaj Rev. by

More information

Lecture4: Guidelines for good relational design Mapping ERD to Relation. Ref. Chapter3

Lecture4: Guidelines for good relational design Mapping ERD to Relation. Ref. Chapter3 College of Computer and Information Sciences - Information Systems Dept. Lecture4: Guidelines for good relational design Mapping ERD to Relation. Ref. Chapter3 Prepared by L. Nouf Almujally & Aisha AlArfaj

More information

The Relational Model and Normalization

The Relational Model and Normalization The Relational Model and Normalization 1. Introduction 2 2. Relational Model Terminology 3 4. Normal Forms 11 5. Multi-valued Dependency 21 6. The Fifth Normal Form 22 The Relational Model and Normalization

More information

Database Systems. A Practical Approach to Design, Implementation, and Management. Database Systems. Thomas Connolly Carolyn Begg

Database Systems. A Practical Approach to Design, Implementation, and Management. Database Systems. Thomas Connolly Carolyn Begg Database Systems A Practical Approach to Design, Implementation, and Management For these Global Editions, the editorial team at Pearson has collaborated with educators across the world to address a wide

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 Fall 2012 1 Overview of Database Design Conceptual design: (ER Model is used at this stage.) What are the entities

More information

Chapter. Relational Database Concepts COPYRIGHTED MATERIAL

Chapter. Relational Database Concepts COPYRIGHTED MATERIAL Chapter Relational Database Concepts 1 COPYRIGHTED MATERIAL Every organization has data that needs to be collected, managed, and analyzed. A relational database fulfills these needs. Along with the powerful

More information

V. Database Design CS448/ How to obtain a good relational database schema

V. Database Design CS448/ How to obtain a good relational database schema V. How to obtain a good relational database schema Deriving new relational schema from ER-diagrams Normal forms: use of constraints in evaluating existing relational schema CS448/648 1 Translating an E-R

More information

IS 263 Database Concepts

IS 263 Database Concepts IS 263 Database Concepts Lecture 1: Database Design Instructor: Henry Kalisti 1 Department of Computer Science and Engineering The Entity-Relationship Model? 2 Introduction to Data Modeling Semantic data

More information

Database Systems ( 資料庫系統 )

Database Systems ( 資料庫系統 ) Database Systems ( 資料庫系統 ) 9.28.2011 Lecture #3 1 Course Administration Please download HW #1 from course homepage It is due 10/12/2011. This lecture: R&G Chapter 3 Next week reading: R&G Chapter 41~ 4.1

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

The Entity-Relationship Model

The Entity-Relationship Model The Entity-Relationship Model Chapter 2 Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 1 Overview of Database Design Conceptual design: (ER Model is used at this stage.) What are the entities

More information

Objectives. After completing this lesson, you should be able to do the following:

Objectives. After completing this lesson, you should be able to do the following: Objectives After completing this lesson, you should be able to do the following: Write SELECT statements to access data from more than one table using equality and nonequality joins View data that generally

More information

Database Applications (15-415)

Database Applications (15-415) Database Applications (15-415) The Entity Relationship Model Lecture 2, January 15, 2014 Mohammad Hammoud Today Last Session: Course overview and a brief introduction on databases and database systems

More information

Normalization. Normal Forms. Normal Forms

Normalization. Normal Forms. Normal Forms Normalization A technique that organizes data attributes (or fields) such that they are grouped to form stable, flexible and adaptive entities. 5- Normal Forms First Normal Form (NF) There are no attributes

More information

Entity-Relationship Diagrams

Entity-Relationship Diagrams Entity-Relationship Diagrams Fall 2017, Lecture 3 There is nothing worse than a sharp image of a fuzzy concept. Ansel Adams 1 Recall: Relational Database Management Relational DataBase Management Systems

More information

IS 263 Database Concepts

IS 263 Database Concepts IS 263 Database Concepts Lecture 4: Normalization Instructor: Henry Kalisti 1 Department of Computer Science and Engineering Limitations of E- R Designs Provides a set of guidelines, does not result in

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

GIFT Department of Computing Science Data Selection and Filtering using the SELECT Statement

GIFT Department of Computing Science Data Selection and Filtering using the SELECT Statement GIFT Department of Computing Science [Spring 2013] CS-217: Database Systems Lab-2 Manual Data Selection and Filtering using the SELECT Statement V1.0 4/12/2016 Introduction to Lab-2 This lab reinforces

More information

Chapter 8 INTEGRITY 1

Chapter 8 INTEGRITY 1 Chapter 8 INTEGRITY 1 Introduction Integrity refers to the correctness or accuracy of data in the database For examples: In Supplier-Part-Project database, the status values might have to be in the range

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. Goal: specification of database schema Methodology:

Database Design. Goal: specification of database schema Methodology: Database Design Goal: specification of database schema Methodology: Use E-R model to get a high-level graphical view of essential components of the model and how they are related Convert E-R diagram to

More information

DATABASE DEVELOPMENT (H4)

DATABASE DEVELOPMENT (H4) IMIS HIGHER DIPLOMA QUALIFICATIONS DATABASE DEVELOPMENT (H4) Friday 3 rd June 2016 10:00hrs 13:00hrs DURATION: 3 HOURS Candidates should answer ALL the questions in Part A and THREE of the five questions

More information

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

Database Principles: Fundamentals of Design, Implementation, and Management Tenth Edition. Chapter 7 Data Modeling with Entity Relationship Diagrams Database Principles: Fundamentals of Design, Implementation, and Management Tenth Edition Chapter 7 Data Modeling with Entity Relationship Diagrams Objectives In this chapter, students will learn: The

More information

Chapter 4 Conceptual Modeling

Chapter 4 Conceptual Modeling Chapter 4 Conceptual Modeling We got a clear picture of the structure of an RDB from last chapter. The question is how could we get there from a project description? For example, assume that we have understood

More information

CS2 Current Technologies Lecture 3: SQL - Joins and Subqueries

CS2 Current Technologies Lecture 3: SQL - Joins and Subqueries T E H U N I V E R S I T Y O H F R G E D I N B U CS2 Current Technologies Lecture 3: SQL - Joins and Subqueries Chris Walton (cdw@dcs.ed.ac.uk) 11 February 2002 Multiple Tables 1 Redundancy requires excess

More information

CS/INFO 330 Entity-Relationship Modeling. Announcements. Goals of This Lecture. Mirek Riedewald

CS/INFO 330 Entity-Relationship Modeling. Announcements. Goals of This Lecture. Mirek Riedewald CS/INFO 330 Entity-Relationship Modeling Mirek Riedewald mirek@cs.cornell.edu Announcements Office hour update (see class homepage) First homework assignment will be available from CMS later today Some

More information

ajpatelit.wordpress.com

ajpatelit.wordpress.com ALPHA COLLEGE OF ENGINEERING & TECHNOLOGY COMPUTER ENGG. / INFORMATION TECHNOLOGY Database Management System (2130703) All Queries 1. Write queries for the following tables. T1 ( Empno, Ename, Salary,

More information

Introduction to Database Design

Introduction to Database Design ICS 321 Fall 2009 Introduction to Database Design Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa 09/03/2009 Lipyeow Lim -- University of Hawaii at Manoa

More information

ER modeling. Lecture 4

ER modeling. Lecture 4 ER modeling Lecture 4 1 Copyright 2007 STI - INNSBRUCK Today s lecture ER modeling Slides based on Introduction to Entity-relationship modeling at http://www.inf.unibz.it/~franconi/teaching/2000/ct481/er-modelling/

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

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

2004 John Mylopoulos. The Entity-Relationship Model John Mylopoulos. The Entity-Relationship Model John Mylopoulos

2004 John Mylopoulos. The Entity-Relationship Model John Mylopoulos. The Entity-Relationship Model John Mylopoulos XVI. The Entity-Relationship Model The Entity Relationship Model The Entity-Relationship Model Entities, Relationships and Attributes Cardinalities, Identifiers and Generalization Documentation of E-R

More information

CS2 Current Technologies Lecture 2: SQL Programming Basics

CS2 Current Technologies Lecture 2: SQL Programming Basics T E H U N I V E R S I T Y O H F R G E D I N B U CS2 Current Technologies Lecture 2: SQL Programming Basics Dr Chris Walton (cdw@dcs.ed.ac.uk) 4 February 2002 The SQL Language 1 Structured Query Language

More information

E-R Model. Hi! Here in this lecture we are going to discuss about the E-R Model.

E-R Model. Hi! Here in this lecture we are going to discuss about the E-R Model. E-R Model Hi! Here in this lecture we are going to discuss about the E-R Model. What is Entity-Relationship Model? The entity-relationship model is useful because, as we will soon see, it facilitates communication

More information

SOFTWARE ENGINEERING Prof.N.L.Sarda Computer Science & Engineering IIT Bombay. Lecture #10 Process Modelling DFD, Function Decomp (Part 2)

SOFTWARE ENGINEERING Prof.N.L.Sarda Computer Science & Engineering IIT Bombay. Lecture #10 Process Modelling DFD, Function Decomp (Part 2) SOFTWARE ENGINEERING Prof.N.L.Sarda Computer Science & Engineering IIT Bombay Lecture #10 Process Modelling DFD, Function Decomp (Part 2) Let us continue with the data modeling topic. So far we have seen

More information

Conceptual Database Design. COSC 304 Introduction to Database Systems. Entity-Relationship Modeling. Entity-Relationship Modeling

Conceptual Database Design. COSC 304 Introduction to Database Systems. Entity-Relationship Modeling. Entity-Relationship Modeling COSC 304 Introduction to Database Systems Entity-Relationship Modeling Dr. Ramon Lawrence University of British Columbia Okanagan ramon.lawrence@ubc.ca Conceptual Database Design Conceptual database design

More information

Lecture 5 STRUCTURED ANALYSIS. PB007 So(ware Engineering I Faculty of Informa:cs, Masaryk University Fall Bühnová, Sochor, Ráček

Lecture 5 STRUCTURED ANALYSIS. PB007 So(ware Engineering I Faculty of Informa:cs, Masaryk University Fall Bühnová, Sochor, Ráček Lecture 5 STRUCTURED ANALYSIS PB007 So(ware Engineering I Faculty of Informa:cs, Masaryk University Fall 2015 1 Outline ² Yourdon Modern Structured Analysis (YMSA) Context diagram (CD) Data flow diagram

More information

CS403- Database Management Systems Solved Objective Midterm Papers For Preparation of Midterm Exam

CS403- Database Management Systems Solved Objective Midterm Papers For Preparation of Midterm Exam CS403- Database Management Systems Solved Objective Midterm Papers For Preparation of Midterm Exam Question No: 1 ( Marks: 1 ) - Please choose one Which of the following is NOT a feature of Context DFD?

More information

Database Management Systems

Database Management Systems ADIKAVI NANNAYA UNIVERSITY CBCS/SEMESTER SYSTEM IV SEMESTER BACHELOR OF COMPUTER APPLICATIONS (w.e.f. 2015-16 Admitted Batch) Database Management Systems Unit-I: Database Systems Introduction and Fundamentals:

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

CS2 Current Technologies Note 1 CS2Bh

CS2 Current Technologies Note 1 CS2Bh CS2 Current Technologies Note 1 Relational Database Systems Introduction When we wish to extract information from a database, we communicate with the Database Management System (DBMS) using a query language

More information

The Entity-Relationship Model. Overview of Database Design

The Entity-Relationship Model. Overview of Database Design The Entity-Relationship Model Chapter 2, Chapter 3 (3.5 only) Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 1 Overview of Database Design Conceptual design: (ER Model is used at this stage.)

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

Chapter 2 ENTITY RELATIONSHIP MODEL

Chapter 2 ENTITY RELATIONSHIP MODEL INTRODUCTION Chapter 2 ENTITY RELATIONSHIP MODEL Data model is used to describe data, data relationship and constraints on data. A number of different data models have proposed. They can broadly be classified

More information

CIS 330: Applied Database Systems

CIS 330: Applied Database Systems 1 CIS 330: Applied Database Systems Lecture 3: Introduction to ER Modeling The Relational Model Johannes Gehrke johannes@cs.cornell.edu http://www.cs.cornell.edu/johannes Announcements How many laptops

More information

Relational Database design. Slides By: Shree Jaswal

Relational Database design. Slides By: Shree Jaswal Relational Database design Slides By: Shree Jaswal Topics: Design guidelines for relational schema, Functional Dependencies, Definition of Normal Forms- 1NF, 2NF, 3NF, BCNF, Converting Relational Schema

More information

BIRKBECK (University of London)

BIRKBECK (University of London) BIRKBECK (University of London) BSc Examination for Internal Students School of Computer Science and Information Systems Database Management COIY028U - Course Unit Value: 1/2 May 2006 : Afternoon 14.30

More information

CS 348 Introduction to Database Management Assignment 2

CS 348 Introduction to Database Management Assignment 2 CS 348 Introduction to Database Management Assignment 2 Due: 30 October 2012 9:00AM Returned: 8 November 2012 Appeal deadline: One week after return Lead TA: Jiewen Wu Submission Instructions: By the indicated

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

Introduction to Database Design

Introduction to Database Design Introduction to Database Design UVic C SC 370 Daniel M German Introduction to Database Design (1.2.0) CSC 370 4/5/2005 14:52 p.1/33 Overview What are the steps in designing a database? What is the entity-relationship

More information

COSC 304 Introduction to Database Systems Enhanced Entity-Relationship (EER) Modeling

COSC 304 Introduction to Database Systems Enhanced Entity-Relationship (EER) Modeling COSC 304 Introduction to Database Systems Enhanced Entity-Relationship (EER) Modeling Dr. Ramon Lawrence University of British Columbia Okanagan ramon.lawrence@ubc.ca Enhanced Entity-Relationship Modeling

More information

Bachelor in Information Technology (BIT) O Term-End Examination

Bachelor in Information Technology (BIT) O Term-End Examination No. of Printed Pages : 6 I CSI-14 I Bachelor in Information Technology (BIT) O Term-End Examination cn Cn1 June, 2010 CD cp CSI-14 : DATA ANALYSIS AND DATABASE DESIGN Time : 3 hours Maximum Marks : 75

More information

Data Modeling. Yanlei Diao UMass Amherst. Slides Courtesy of R. Ramakrishnan and J. Gehrke

Data Modeling. Yanlei Diao UMass Amherst. Slides Courtesy of R. Ramakrishnan and J. Gehrke Data Modeling Yanlei Diao UMass Amherst Slides Courtesy of R. Ramakrishnan and J. Gehrke 1 Outline v Conceptual Design: ER Model v Relational Model v Logical Design: from ER to Relational 2 Conceptual

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 CS 186 Fall 2002: Lecture 2 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

More information

Object Modeling. Entity-Relationship (ER) diagrams (1976) Object Modelling Technique (OMT) diagrams (1991)

Object Modeling. Entity-Relationship (ER) diagrams (1976) Object Modelling Technique (OMT) diagrams (1991) Created by Janusz R. Getta, School of Computing and Information Technology, University of Wollongong Building 3, room 2120, ext 4339, jrg@uow.edu.au, http://www.uow.edu.au/ jrg Object Modeling Outline

More information

CS403- Database Management Systems Solved MCQS From Midterm Papers. CS403- Database Management Systems MIDTERM EXAMINATION - Spring 2010

CS403- Database Management Systems Solved MCQS From Midterm Papers. CS403- Database Management Systems MIDTERM EXAMINATION - Spring 2010 CS403- Database Management Systems Solved MCQS From Midterm Papers April 29,2012 MC100401285 Moaaz.pk@gmail.com Mc100401285@gmail.com PSMD01 CS403- Database Management Systems MIDTERM EXAMINATION - Spring

More information

Databases 1. Daniel POP

Databases 1. Daniel POP Databases 1 Daniel POP Week 4 Agenda The Relational Model 1. Origins and history 2. Key concepts 3. Relational integrity 4. Relational algebra 5. 12+1 Codd rules for a relational DBMSes 7. SQL implementation

More information

Conceptual Design. The Entity-Relationship (ER) Model

Conceptual Design. The Entity-Relationship (ER) Model Conceptual Design. The Entity-Relationship (ER) Model CS430/630 Lecture 12 Slides based on Database Management Systems 3 rd ed, Ramakrishnan and Gehrke Database Design Overview Conceptual design The Entity-Relationship

More information

Database Design Process. Requirements Collection & Analysis

Database Design Process. Requirements Collection & Analysis 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

Sample Question Paper

Sample Question Paper Sample Question Paper Marks : 70 Time:3 Hour Q.1) Attempt any FIVE of the following. a) List any four applications of DBMS. b) State the four database users. c) Define normalization. Enlist its type. d)

More information

Introduction to Data Management. Lecture #3 (Conceptual DB Design) Instructor: Chen Li

Introduction to Data Management. Lecture #3 (Conceptual DB Design) Instructor: Chen Li Introduction to Data Management Lecture #3 (Conceptual DB Design) Instructor: Chen Li 1 Announcements v HW #1 is now available v Today s plan Conceptual DB design, cont. Advanced ER concepts 2 Weak Entities

More information

DATA Data and information are used in our daily life. Each type of data has its own importance that contribute toward useful information.

DATA Data and information are used in our daily life. Each type of data has its own importance that contribute toward useful information. INFORMATION SYSTEM LESSON 41 DATA, INFORMATION AND INFORMATION SYSTEM SMK Sultan Yahya Petra 1 DATA Data and information are used in our daily life. Each type of data has its own importance that contribute

More information

Database Management Systems

Database Management Systems Database Management Systems Associate Professor Dr. Raed Ibraheem Hamed University of Human Development, College of Science and Technology Computer Science Department 2015 2016 Department of Computer Science

More information

ER Model. CSC 343 Winter 2018 MICHAEL LIUT

ER Model. CSC 343 Winter 2018 MICHAEL LIUT ER Model CSC 343 Winter 2018 MICHAEL LIUT (MICHAEL.LIUT@UTORONTO.CA) DEPARTMENT OF MATHEMATICAL AND COMPUTATIONAL SCIENCES UNIVERSITY OF TORONTO MISSISSAUGA Overview of Database Design Conceptual Designs

More information

CS 4604: Introduction to Database Management Systems. B. Aditya Prakash Lecture #5: Entity/Relational Models---Part 1

CS 4604: Introduction to Database Management Systems. B. Aditya Prakash Lecture #5: Entity/Relational Models---Part 1 CS 4604: Introduction to Database Management Systems B. Aditya Prakash Lecture #5: Entity/Relational Models---Part 1 E/R: NOT IN BOOK! IMPORTANT: Follow only lecture slides for this topic! Differences

More information

Overview of db design Requirement analysis Data to be stored Applications to be built Operations (most frequent) subject to performance requirement

Overview of db design Requirement analysis Data to be stored Applications to be built Operations (most frequent) subject to performance requirement ITCS 3160 Data Base Design and Implementation Jing Yang 2010 Fall Class 12: Data Modeling Using the Entity-Relationship (ER) Model Overview of db design Requirement analysis Data to be stored Applications

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

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

Home Page. Title Page. Page 1 of 14. Go Back. Full Screen. Close. Quit

Home Page. Title Page. Page 1 of 14. Go Back. Full Screen. Close. Quit Page 1 of 14 A BCNF Normalisation Algorithm Input: A specification containing: 1. a relation schema, R, and 2. a set of Functional Dependencies (FDs), F over R. An Entity-relationship Diagram (ERD) conforming

More information

OVERVIEW OF DATABASE DEVELOPMENT

OVERVIEW OF DATABASE DEVELOPMENT DATABASE SYSTEMS I WEEK 2: THE ENTITY-RELATIONSHIP MODEL OVERVIEW OF DATABASE DEVELOPMENT Requirements Analysis / Ideas High-Level Database Design Conceptual Database Design / Relational Database Schema

More information

The Relational Model

The Relational Model The Relational Model UVic C SC 370, Fall 2002 Daniel M. German Department of Computer Science University of Victoria September 25, 2002 Version: 1.03 3 1 The Relational Model (1.03) CSC 370 dmgerman@uvic.ca

More information

Data Modeling During System Analysis. Logical Data Model Stages. What is Conceptual Database Design? Gathering Information for Conceptual

Data Modeling During System Analysis. Logical Data Model Stages. What is Conceptual Database Design? Gathering Information for Conceptual Data Modeling Entity Relationship Diagram Lecture 16 CSC(291) [Software Engineering 1] Instructor: Saif-ur-Rehman Khan COMSATS Institute of Information Technology, Islamabad Data Modeling During System

More information

From ER to Relational Model. Book Chapter 3 (part 2 )

From ER to Relational Model. Book Chapter 3 (part 2 ) From ER to Relational Model Book Chapter 3 (part 2 ) Logical DB Design: ER to Relational Translate Entity sets to tables: ssn name Employees lot CREATE TABLE Employees (ssn CHAR(11), name CHAR(20), lot

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

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

Copyright 2016 Ramez Elmasri and Shamkant B. Navathe

Copyright 2016 Ramez Elmasri and Shamkant B. Navathe CHAPTER 14 Basics of Functional Dependencies and Normalization for Relational Databases Slide 14-2 Chapter Outline 1 Informal Design Guidelines for Relational Databases 1.1 Semantics of the Relation Attributes

More information

Chapter 2 Introduction to Relational Models

Chapter 2 Introduction to Relational Models CMSC 461, Database Management Systems Spring 2018 Chapter 2 Introduction to Relational Models These slides are based on Database System Concepts book and slides, 6th edition, and the 2009 CMSC 461 slides

More information

Table : Purchase. Field DataType Size Constraints CustID CHAR 5 Primary key CustName Varchar 30 ItemName Varchar 30 PurchaseDate Date

Table : Purchase. Field DataType Size Constraints CustID CHAR 5 Primary key CustName Varchar 30 ItemName Varchar 30 PurchaseDate Date Q1. Write SQL query for the following : (i) To create above table as per specification given (ii) To insert 02 records as per your choice (iii) Display the Item name, qty & s of all items purchased by

More information

Introduction to Data Management. Lecture #3 (E-R Design, Cont d.)

Introduction to Data Management. Lecture #3 (E-R Design, Cont d.) Introduction to Data Management Lecture #3 (E-R Design, Cont d.) Instructor: Mike Carey mjcarey@ics.uci.edu Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 1 Announcements Reminders: Sign

More information

1Z0-007 ineroduction to oracle9l:sql

1Z0-007 ineroduction to oracle9l:sql ineroduction to oracle9l:sql Q&A DEMO Version Copyright (c) 2007 Chinatag LLC. All rights reserved. Important Note Please Read Carefully For demonstration purpose only, this free version Chinatag study

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

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

More information

Babu Madhav Institute of Information Technology 2015

Babu Madhav Institute of Information Technology 2015 Paper No.:060010102 Subject: Database Management Systems (Practical) Program: 5 Years Integrated M.Sc.(IT) Semester: 01 Practical No: 1 Enrolment No: Practical Problem Create following tables: CLIENT_MASTER

More information