Post date: Sep 28, 2017 6:14:15 AM
Chapter 7: Data Modeling Using Entity-Relationship (ER) Model
High-level conceptual data models
Entity types, entity sets, attributes, and keys
Relationship types, relationship sets, roles, and structural constraints
Weak entity type
ER diagrams, naming conventions, and design issues
Interesting websites:
In-Class Exercises:
Ex 1:
Problem :
A company database needs to store information about employees (identified by ssn, with salary and phone as attributes), departments (identified by dno, with dname and budget as attributes), and children of employees (with name and age as attributes). Employees work in departments; each department is managed by an employee; a child must be identified uniquely by name when the parent (who is an employee; assume that only one parent works for the company) is known. We are not interested in information about a child once the parent leaves the company.
Draw an ER diagram that captures this information.
Ex 2:
Translate the following in a ER diagram:
Customers (Cust-No) get discounts (Disc-No) on items (Item-No). Each item can only have one discount rate.
Items belong to a single category (Categ-ID).
Ex 3:
Translate the following in a ER diagram:
A supplier (Supp-#) processes many purchase orders (PO-#) and sells a number of products (Prod-#). A product is sold by only one supplier.
Each of the purchase orders that a supplier may process includes several products. The relationship between order and product is defined as "Line Item".
A customer (Cust-#) may place one or more purchase orders. A purchase order may be placed by only one customer.