Practice of ER modeling

Slides:



Advertisements
Similar presentations
ER Model For a college DB
Advertisements

ER Modeling Case Studies
More Diagramming & Practice with Relationship Modeling
Exercise 1 Consider the ER diagram below. Assume that an employee may work in up to two departments or may not be assigned to any department. Assume that.
Database Design The process of finding user requirement
ER Tutorial 2 Chapter 9 - Questions 3, 4 and 5 V3.0 Napier University Dr Gordon Russell.
ER Modeling Case Studies
Entity-Relationship Models
Ch5: ER Diagrams - Part 1 Much of the material presented in these slides was developed by Dr. Ramon Lawrence at the University of Iowa.
Data Modeling Yong Choi School of Business CSUB. Part # 2 2 Database Collection of data in electronic format – A digital library of organization Managed.
1 Database Design Victor Matos. 2 Phases of Database Design u Conceptual design begins with the collection of requirements and results needed from the.
Information Resources Management January 30, 2001.
Data modeling using the entity-relationship model Winter 2006Ron McFadyen Entity-relationship model (ER model) P. 49: “This model and its variations.
Data Modeling 1 Yong Choi School of Business CSUB.
Data Modeling 1 Yong Choi School of Business CSUB.
Things are bad. Children no longer obey their parents and everyone is writing a book. -- Marcus Tillius Cicero.
ER Modeling Case Studies
Entity Relationship Model Chapter 6. Basic Elements of E-R Model Entity Object of the real world that stores data. Eg. Customer, State, Project, Supplier,
Data Modeling Using the Entity-Relationship Model
Data Modeling Using the Entity-Relationship Model
Advanced Entity Relationship Concepts. Advanced Concepts UIDs Intersection Entities Recursive Relationships Roles Subtypes Exclusivity Historical Fan.
CSE 441: Systems Analysis & Design
Database. Basic Definitions Database: A collection of related data. Database Management System (DBMS): A software package/ system to facilitate the creation.
Instructor :Huda Al-Omair
Objectives for Week (1/29 & 1/31)  Know how to read, understand, and create a database model using a modeling tool - ERD’s.  Know the process of completing.
Database Design Sections 6 & 7 Second Normal Form (2NF), Unique Identifiers (UID), Third Normal Form (3NF), Arcs, Hierarchies and Recursive relationships.
Practice of ER modeling - Answer Yong Choi School of Business CSUB.
Database Systems. Entity Relationship Diagram How to Develop an ERD? Typically you will start with a case study or perhaps a logical model of the system.
Chapter 7 Data Modeling with Entity Relationship Diagrams
1 A Demo of Logical Database Design. 2 Aim of the demo To develop an understanding of the logical view of data and the importance of the relational model.
3 & 4 1 Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel Keys Consists of one or more attributes that determine other.
Data modeling using the entity-relationship model Chapter 3 Objectives How entities, tuples, attributes and relationships among entities are represented.
Database Management COP4540, SCS, FIU Database Modeling Using the Entity-Relationship Model (Continued)
ERD ( Conceptual data model From the statement of data requirements a conceptual data model is produced. This describes.
Weak Entity Sets A weak entity is an entity that cannot exist in a database unless another type of entity also exists in that database. Weak entity meets.
Entity-Relationship Model Chapter 3 II COSC 457 Sungchul Hong.
Copyright Ó Oracle Corporation, All rights reserved. Assign Unique Identifiers A Unique Identifier (UID) is any combination of attributes and/or.
Practice of ER modeling Yong Choi School of Business CSUB.
Entity Relationship Diagram (ERD). Objectives Define terms related to entity relationship modeling, including entity, entity instance, attribute, relationship.
Introduction to Database Systems
1 Information System Analysis Topic-3. 2 Entity Relationship Diagram \ Definition An entity-relationship (ER) diagram is a specialized graphic that illustrates.
Entity Relationship Diagram ERD. Background Peter Chen developed ERDs in Charles Bachman and James Martin have added some slight refinements to.
Dr Gordon Russell, Napier University Tutorial - ER2 - V2.0 1 ER Tutorial 2 Questions 3, 4 and 5.
Chapter 7 Data Modeling Using the Entity-Relationship (ER) Model
1 Database Design Sections 6 & 7 First Normal Form (1NF), Second Normal Form (2NF), Unique Identifiers (UID), Third Normal Form (3NF), Arcs, Hierarchies.
ENTITY-RELATIONSHIP MODELLING. Objectives: How to use Entity–Relationship (ER) modelling in database design. Basic concepts associated with ER model.
Entity Relationship (E-R) Model
Data Modeling Using the Entity- Relationship (ER) Model
Databases (CS507) CHAPTER 7.
Let try to identify the conectivity of these entity relationship
E-R Diagram (Cont.) Draw ER Diagram for the following scenario:
Entity-Relationship Modeling
ER MODEL Lecture 3.
Lecture3: Data Modeling Using the Entity-Relationship Model.
ER Modeling Case Studies
بسم الله الرحمن الرحيم.
ER Models ISSUES and Examples CS263 Lecture 9
Practice of ER modeling
Practice of ER modeling
Entity-Relationship Modeling "Extended"
CS4222 Principles of Database System
Conceptual Data Modeling Using Entities & Relationships
ER Modeling Case Studies
ER Modeling Case Studies
Mapping an ERD to a Relational Database
Entity Relation Model Tingting Zhang.
Database Management system
Database Management system
Entity-Relationship Modeling "Extended"
Entity-Relationship Modeling "Extended"
Presentation transcript:

Practice of ER modeling Yong Choi School of Business CSUB

Practice 1 A department hires many employees. A employee is hired by one department. A manager manages one department. A department is managed by one manager.

Practice 2 An author may write many books. A book may be written by many authors. A team consists of many players. A player plays for only one team.

Practice 3 A lecturer teaches, at most, one course. A course is taught by exactly one lecturer. A flight-hub connects two airports. An airport is used by many flight-hubs.

Practice 4 A purchase order may be for many products. A product may appear on many purchase orders. A customer may submit many orders. An order is for exactly one customer.

Practice 5 A college has a large number of professors. Each professor may belong to one or several colleges in one university. In some cases, a professor may not belong to any college at all.

Practice 6 The California State University has changed one of the policies about course schedule based upon feedback from professors and students. One of the changed policies is that a course may have one or more scheduled sections, or may not have a scheduled section at all. Each section has one course or may not have any course at all.

Practice 7 According to the policy of the California Hospital, a patient must have a patient record. In other words, each patient may have one or more records. Each patient record must belong to exactly one patient.

Practice 8 Since the growth rate of the California video store is very fast, the store has decided to change the inventory management policy. One of the policy is that a video store may stock more than one copy of a given movie and only one copy of a given movie can belong to one video store.

Practice 9 – Multiple Entities A college runs many classes. Each class may be taught by several professors. A particular class may always use the same room. Because classes may held at different times or on different evenings, it is possible that each room can be used by many different classes. By the way, A professor can teach several classes.

Practice 10 – Multiple Entities There are several departments in School of Business and Public Administration at CSUB (indication that cardinality from school to Dept is many). Each department belongs to one school. A department has many professors, but a professor may belong to more than one department. Similarly, courses may be offered by several departments and a department must have at least one course. A professor may teach more than one student, and a student may have more than one professor.

Practice 11 – Multiple Entities Each employee in an engineering company has one recognized skill (e.g., mechanic, electrician), but a given skill may be possessed by several employees. An employee must be able to operate a given machine-type (e.g., milling machine, grinder). If any employee has one of several skills, each skill must be associated with the operation of only one machine type. Possession of a given skill (e.g., mechanic, electrician) allows an employee to maintain several machine-types. On the other hand, maintenance of any given machine-type requires a specific skill (e.g., a milling machine must be maintained by a mechanic). A single employee can have multi skills. That is, each employee can operate more than one machine. - at most means maximum is one (according to dictionary). Can a skill itself operate machines? - Since any skills must be associated with employees, a skill itself cannot operate any machines.

Practice 12 – Recursive Relationship In our company, we have several departments with more than 1000 employees. Each department is managed by one person, and must have a manager all the time by our corporate regulations. We would like to keep the following information on each department: department ID, department name, budget, and location. Each employee is supervised directly by one person, but each supervisor can manage many supervisees. As for employees, we would like to keep the following information: employee id, employee name, address, salary. Since data management of our company is becoming so complex, we plan to develop a database system to manage our current data requirements described here. Develop business rules Develop model using the case tool Attributes of Employees Attributes of Employees Dept_ID Emp_ID Dept_Name Emp_Name Budget Address Location Salary (if Manager is included as attribute, -3) (If supervisor & Dept are included as attributes, -3 for each one) Assumptions have to be stated in following cases: NO Optionality (-2 for each) supervisor

Practice 13-1 Read the following case study, which describes the data requirements for a video rental company: The video rental company has several branches throughout the USA. The data held on each branch is the branch address made up of street, city, state, and zip code, and the telephone number. Each branch is given a branch number, which is unique throughout the company. Each branch is allocated staff, which includes a Manager. The Manager is responsible for the day-today running of a given branch. The data held on a member of staff is his or her name, position, and salary.

Practice 13-2 Each member of staff is given a staff number, which is unique throughout the company. Each branch has a stock of videos. The data held on a video is the catalog number, video number, title, category, daily rental, cost, status, and the names of the main actors, and the director. The catalog number uniquely identifies each video. However, in most cases, there are several copies of each video at a branch, and the individual copies are identified using the video number. A video is given a category such as Action, Adult, Children, Drama, Horror, or Sci-Fi. The status indicates whether a specific copy of a video is available for rent.

Practice 13-3 Before hiring a video from the company, a customer must first register as a member of a local branch. The data held on a member is the first and last name, address, and the date that the member registered at a branch. Each member is given a member number, which is unique throughout all branches of the company. Once registered, a member is free to rent videos, up to maximum of ten at any one time. The data held on each video rented is the rental number, the full name and number of the member, the video number, title, and daily rental, and the dates the video is rented out and date returned. The rental number is unique throughout the company.

Real World Example 1-1 NCFCComp would like to keep track of their employees, departments and projects. The company is organized into departments. Each department has a unique name, a unique number and a particular employee who manages the department. We keep track of the start date when that employee began managing the department. A department may have several locations. A department controls a number of projects, each of which has a unique name, a unique number and a single location. We need to store each employee's name, social security number, address, salary, sex, and birth date.

Real World Example 1-2 An employee is assigned to one department but may work on several projects, which are not necessarily controlled by the same department. We need to keep track of the number of hours per week that an employee works on each project. We also should keep track of the direct supervisor of each employee. For insurance purposes, we want to keep track of the dependents of each employee. We keep each dependent's name, sex, birth date, and relationship to employee. Develop business rules Develop data model using ERD