In: Computer Science
Draw an ERD diagram for Hair Saloon and describe its relationship
The resultant entity relationship diagram has five entities. First entity is customer. Customer has attributes naming customer ID, customer name, age, and gender. Customer ID is primary key here. Second entity is employee. Employee has attributes naming employee ID which is primary key, gender, address, and pay. Third entity is services. Services has attributes naming service ID which is a primary key , service name, service duration, materials required and price. Fourth entity is appointment which keeps track of of all the appointments made by the customer in the hair salon. It has attributes naming appointment ID, date, time and service Id, where appointment ID is a primary key. The last entity is service provisioning. This entity has the record of the services which have been performed until a particular time it has attributes named service ID, and service time.
Customer and appointment entity has a 'makes' relationship in
which customer makes an appointment and one customer can make one
or more appointments. Employee has a relationship with service
provisioning entity where a service provisioning is performed by I
an employee. One service can be performed by multiple employees and
one employee cand provision multiple services. Appointment has
relationship name 'Provision for' with service provisioning where
each service provisioning is provisioned for a particular
appointment. One service provisioning can be performed for one
appointment only so it is a one to one relationship. Services
entity has a undergoes relationship with service provisioning. One
service can be provisioned multiple times due to multiple
appointment of the same service, so it is a one to many
relationship.