Lab4
Lab4
Tutorial 4
Topic: Developing ERD
1. What is a multivalued attribute? Give one example. Then, explain two methods to
implement a multi-valued attribute in a relational database.
2. What two conditions must be met before an entity can be classified as a weak entity?
3. Draw an entity relationship diagram (ERD) (crow’s foot and Chen’s model each) to
represent this business rule.
“A customer can make many payments, but each payment is made by only one customer.”
4. Draw a conceptual model for Deal Co by using Crow’s foot notation. One region can be
the location for many stores. Each store is located in only one region. Each store employs
one or more employees. Each employee is employed by one store. However, an employee
cannot work in more than one store at a time. A job -- such as accountant or sales
representative -- can be assigned to many employees. (For example, one would reasonably
assume that a store can have more than one sales representative. Therefore, the job title
“Sales Representative” can be assigned to more than one employee at a time.) However,
each employee can have only one job assignment at a time.
1. Create “Orders” table in “Lab20” database. Then, insert this record into “Orders”
table. Use AUTO_INCREMENT for Customer ID.
To do:
i) Please check the date format of MySQL before you insert the date.
ii) Define the auto increment syntax of Microsoft SQL server and Oracle.
3. Change the order of your attributes. Notice the difference in the displayed result.
1
TDB1131 Database Systems
EXTRA ACTIVITIES
(a) Given the following business rules, identify the needed entities and draw the ERD by using
Crow’s foot notation.
A trainee can take more than one class, and each class contains many (ten or more)
trainees, so there is a M:N relationship between TRAINEE and CLASS. (Therefore, a
composite entity is used to serve as the bridge between TRAINEE and CLASS.)
A class is taught by only one instructor, but an instructor can teach up to two classes.
Therefore, there is a 1:M relationship between INSTRUCTOR and CLASS.
Finally, a COURSE may generate more than one CLASS, while each CLASS is based on
one COURSE, so there is a 1:M relationship between COURSE and CLASS.
"I didn't get there by wishing for it or hoping for it, but by working for it." -Estée Lauder