数据库期中考试题(关系图部分)
Question 2 (10 marks)Create an E-R diagram for a video rental shop. Show primary keys, foreign key, non-key attributes and all relationships.
Use the following description of operations on which your business rules must be based:
The video rental shop classified (movie) titles according to their type: comedy, western, classical, science fiction, cartoon, action, musical, and new release. Each type contains many possible titles, and most titles within a type are available in multiple copies. For example, note the following summary:
| Type |
Title |
|
| Musical | My Fair Lady | (Copy 1) |
| My Fair Lady | (Copy 2) | |
| Oklahoma | (Copy 1) | |
| Oklahoma | (Copy 2) | |
| Oklahoma | (Copy 3) | |
| etc. | etc. |
Movies classified as new releases are reclassified to an appropriate type after they have been in stock for more than thirty days. The video shop manager wants to have an end-of-period (week, month, year) report for the number of rentals by type.
If a customer requests a title, the clerk must be able to find it quickly. When a customer selects one or more titles, an invoice is written. Each invoice may thus contain charges for one or more titles. All customers pay in cash.
When the customer checks out a title, a record is kept of the checkout date and time and the expected return date and time. Upon the return of rented titles, the clerk must be able to check quickly whether or not the return is late and to assess the appropriate late return fee.
注:primary key 用粗体字表示。 读者需使用Internet Explorer 5.0 以上版本的游览器及安装了VML组件(Vector Graphics Rendering),才能显示各表之间的联系。
*** 2001年12月15日 ***