Reference no: EM133422690
Question: Suppose that you need to design a simple database for COVID-19 testing. Some basic requirements are as follows.
- There are many test centers in Hong Kong. Each test center has an id, a name, and an address. A test center can serve many clients.
- A client can go to any test center for testing. A client has an id, a name, and a phone number.
- The client should make an appointment before he/she sets out for testing. Each appointment should have the id of the client, the id of the test center, and the appointed time.
The test center takes a swab sample for a client and the testing result of the sample will be sent to the client within 48 hours.
(a) Draw the ER diagram for the database. You need to specify the keys of the entity sets and relationship sets. You also need to mark the cardinality and participation constraints of the relationship sets and explain the reason for the constraints. Note that this question is open and different designs are possible due to different considerations.
(b) Map the ER diagram in (a) to the relational tables (Write down the SQL for creating these tables). You need to capture as many constraints in the ER diagram as possible. If you cannot capture a constraint, you need to explain the reason.