The document describes three exercises to create entity relationship diagrams and transform them into relational data models. The first exercise involves entities for invoices, customers, sales representatives, product lines and products. The second involves entities for instructors, teaching teams, courses, training sessions and trainees. The third involves entities for employees, departments, contracts, projects, and dependents.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
15 views4 pages
Lab 3
The document describes three exercises to create entity relationship diagrams and transform them into relational data models. The first exercise involves entities for invoices, customers, sales representatives, product lines and products. The second involves entities for instructors, teaching teams, courses, training sessions and trainees. The third involves entities for employees, departments, contracts, projects, and dependents.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4
Lab 3: Entity Relationship Diagram
Draw an entity relationship diagram then transform it to relation
data model for each of the following situation. When you draw the ERD, add the attributes that you think necessary for each entity in the model. Exercise 1: Create an E-R model for the following requirements. An INVOICE is written by a SALESREP. Each sales representative can write many invoices, but each invoice is written by a single sales representative. The INVOICE is written for a single CUSTOMER. However, each customer may have many invoices. An INVOICE may include many detail lines (LINE) which describe the products bought by the customer. The product information is stored in a PRODUCT entity. The product's vendor information is found in a VENDOR entity. Relationships:
+ SALESREP writes INVOICE (1:N)
+ CUSTOMER receives INVOICE (1:N) + INVOICE includes LINE (1:N) + LINE describes PRODUCT (1:1) + PRODUCT belongs to VENDOR (N:1) Exercise 2: You are required to create a conceptual data model of the data requirements for a company that specializes in IT training. The Company has 30 instructors and can handle up to 100 trainees per training session. The Company offers five advanced technology courses, each of which is taught by a teaching team of two or more instructors. Each instructor is assigned to a maximum of two teaching teams or may be assigned to do research. Each trainee undertakes one advanced technology course per training session.
Relationships:
+ Instructor is part of Teaching Team (M:N)
+ Instructor assigned Research (1:N) + Training Session provides Course (M:N) + Trainee attend to Training Session (M:1) + Teaching Team teaches Course (M:N)
Exercise 3: 300 employees of a company are organized into different
departments. For each employee, we have his social security number, name, address, sex, birthdate, phone and email. Each department has a name, a role and a head (who is also an employee). Note that each employee works for only one department at a time but he could change from one department to another department. Each time he works for a department, the company signs a contract specifying his salary, start date and end date. Each department handle a number of projects (each project is handled by only one department). Each project has a name, start date, end date, a project manager and a number of employees who work on it. Note that an employee could work on different projects with a specified number of hour. Each employee may have a number of dependents. For each dependent, we keep track of their name, sex, birthdate and relationship to the employee.
Relationships:
+Employee works in Department (1:N)
+ Employee has Contracts (1:N) + Employee assigned Project (M:N) + Department handles Project (1:N) + Project has Project Manager (1:1) + Employee has Dependent(1:N)