In: Computer Science
Requirements Specification (this is a fictional scenario)
A large business, with several medical practices, contacted your company to create a database design. You received the task to investigate if there is a need for a hierarchy based on the specifications below, and to create the hierarchy analysis if needed. You must not create the entire analysis but only the aspects related to the hierarchy as described in the instructions, class lectures and sample examples. This is the relevant fragment from the requirements specification related to your task.
In the practice we have medical doctors, nurses, staff and other employees (e.g. cleaners for which we just keep contact information: name, SSN, phone).
For the doctors we keep the name, SSN, phone, email, main specialty, medical school. A doctor may have appointments and write prescripions. For nurses we keep the name, SSN, phone, and nurse program they completed. A nurse will prepare the patient during the visit and may collect various data. For staff we keep the name, SSN, phone and their role (e.g. receptionist, scheduler, accountant). Based on the practice policies, a nurse will not be allowed to perform staff duties.
The company wants to keep a log with who was working daily, between what hours and in which role. The company also wants to fast identify the role of a person in the organization (e.g. doctor, nurse, ...), based on the last name or id.
a) Here we can take the employees as a supertype because all the staff including doctors, nurses, staffs and other employees share a some common type of informations. So the super type is SUPERTYPE employees ;
b) the subtypes are doctors, staffs, nurses. because these peoples are also working under the same place but have different duties . So we can consider them as subtypes.
SUBTYPE are doctors,nurses, staffs, other_employees ;
c)
d)
Here we do not include other staff as a subtype because we don't want to store any special information about those type of employees.