Exercise 2

Exercises 1.3, 1.4, and 1.7 from the book "Database System Concepts".

Look at the database that was used in Exercise 1. Make a UML class diagram of this mini world (or use the class diagram technique you prefer). In particular pay attention to which attributes that you add to each class, and how classes are associated (object reference and aggregation). Also, sketch the methods for each class. Then answer the following questions.

  1. Does a class correspond to a table?
  2. Does each tuple in a table correspond to an object?
  3. Exercise 1 used a file with queries and modifications (insert/delete/updates). Would you map each query and modification to a method?
  4. How would you handle queries from interactive users?
  5. Can a UML diagram be used for generating a relational schema (tables)?
Best regards,
Kristian Torp