Practice of ER modeling Yong Choi School of

  • Slides: 8
Download presentation
Practice of ER modeling Yong Choi School of Business CSUB

Practice of ER modeling Yong Choi School of Business CSUB

Identify Cardinality n n A purchase order can be placed for many products. A

Identify Cardinality n n A purchase order can be placed for many products. A product may appear on many purchase orders. A customer may submit many orders. An order is placed for exactly one customer.

Eliminate unnecessary details and refine Business Rule 1 n According to the policy of

Eliminate unnecessary details and refine Business Rule 1 n According to the policy of the California Hospital, a patient can have patient records. That is, each patient may have at least one or many records. However, each patient record should belong to one patient. n

Eliminate unnecessary details and refine Business Rule 2 n The California State University has

Eliminate unnecessary details and refine Business Rule 2 n The California State University has changed one of the policies about course schedule based on feedback from professors and students. One of the changed policies is that a course may have one or more scheduled sections. Also, each section can have one course. Creating a correct number of sections for each semester is very important.

Universally Applicable…. n The piano technicians have a hierarchy of reporting relationships: some of

Universally Applicable…. n The piano technicians have a hierarchy of reporting relationships: some of them have supervisory responsibilities in addition to their inspection role and have multiple other technicians report to them.

Universally Applicable…. n Each dependent must be identified uniquely by the last name and

Universally Applicable…. n Each dependent must be identified uniquely by the last name and employee’s ID. Since each dependent must depend on an employee’s health insurance, we do not want to keep and maintain health insurance information about a child once the parent leaves the company.

Multiple Entities and Attributes n Recently, our company installed a new relation database system

Multiple Entities and Attributes n Recently, our company installed a new relation database system and the company database needs to store information about employees, departments and children of employees. Each employee can be identified by ssn with salary and office phone number. Likewise, each departments also can identified by dno with dname and budget. Especially, children of employees should be identified with last name and age.

Multiple Entities and Attributes n (con’t) Employees work in departments; each department is managed

Multiple Entities and Attributes n (con’t) 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.