CPSC 333: Lab Exercise #1: Components of Entity-Relationship Diagrams

Location: [CPSC 333] [Lab Exercises] [Next Exercise] Exercise #1


The following exercises will be taken up in labs during the week of January 20-24. If at all possible, you should try to solve these problems ahead of time, so that you can compare your own solutions to the ones presented during labs, or have questions ready to ask in case you had trouble solving them.

The first question is based on material presented in classes before and on Wednesday, January 15. The next two questions are based on material (concerning relationships) presented on and before Friday, January 17. These questions, and possibly the last question, will be discussed during the first lab next week. The remaining questions also depend on material that will be presented on Monday, January 20, so they will be discussed in the second of next week's labs.


  1. Which of the following are likely to be reasonable entities in the entity-relationship diagram for a typical business system? Which might be attributes of entities, instead? Finally, which should probably not appear on the ERD at all? Why?

    If these answering these questions is difficult, try to describe extra information about the system that is to be modeled that would make this easier to do.

    1. customer
    2. Compute sales tax.
    3. height
    4. product
    5. tomato
    6. ASCII~character
    7. temperature
    8. Edit a transaction.
    9. manufactured part
    10. map
    11. religion

  2. Which of the following are likely to be reasonable relationships in the ERD for a typical business system, and which are not? Why?

    1. purchases
    2. customer
    3. belongs to
    4. weight
    5. produces
    6. Compute sales tax.

  3. Describe the changes (if any) that should be made to the entity-relationship diagram for Version Two of the Student Information System, if each of the following changes was made to the system. Say as well whether primary keys or attributes of existing entities should change, and what the primary keys and attributes should be for any entities that you add.

    1. It is necessary to keep track of a telephone number and address of each student. The address should include up to two lines of information that could be in a variety of formats (you might as well think of them as ``character strings;'' they'll be hard to describe in any more detail than that), as well as a town, province, and postal code.

    2. In order to ensure that students are qualified to enter courses they attempt to register in, the system should keep track of prerequisites for courses. Any course can have zero or more other courses as prerequisites, and any course can be a prerequisite for zero or more other courses.

  4. Describe the changes that would need to be made to the entity-relationship diagram for the final version of the Student Information System described in lectures, if the system was also required to keep track of the different weekly meetings of each course section of each class. Each ``weekly meeting'' of a particular section of a particular course will occur on a different day of the week (Monday, Tuesday, Wednesday, Thursday, Friday, or Saturday); each weekly meeting might (or might not) have a different start time and duration.

    For example, our section of ``CPSC 333'' (the only one for Winter, 1997) has three weekly meetings, occurring on the days Monday, Wednesday, and Friday.

    Now, what additional changes would you make if it were possible for each weekly meeting to have a different location as well?

  5. Suppose the system is expanded again, in order to keep track of academic programmes, so that it must keep track of programme requirements as well as students' progress in their programmes.

    Based on your knowledge of how programmes work at this university (and, perhaps, using the University of Calgary calendar and the computer science department's calendar entry as a guide), briefly describe additions and changes that might be made to the entity-relationship diagram for the system, in order to reflect the system's new responsibilities.

  6. Briefly consider how you might design and implement a subsystem responsible for ``data management'' for the first version of the Student Information System - that is, a subsystem that is responsible for the long term management of system data and for providing access to it. Are there additional requirements, which haven't been discussed yet in this course, that might be helpful for you to decide how such a system would be designed and implemented? If your answer is ``yes,'' what additional requirements would you need to know about?

Location: [CPSC 333] [Lab Exercises] [Next Exercise] [Exercise #1]


Department of Computer Science
University of Calgary

Office: (403) 220-5073
Fax: (403) 284-4707

eberly@cpsc.ucalgary.ca