You are hired to design a database for a fitness center. As thefitness center is expanding with more than one branch, they want tocreate a database to keep track of its customers, facilities andemployees. Each branch has a unique id and address (buildingnumber, street, district, and city). A branch may have more thanone facility (e.g. swimming pool, spa, etc.). Each facility mustbelong to only one branch, and the information for a facility isname and fees. In addition, each fitness branch offers differentclasses (such as Yoga, Pilates, Zumba, etc.). All classes should beled by at most one trainer, who is an employee.
Employees must work at one and only one branch. Each employeehas an id, name, address (building number, street, district, andcity) and can have multiple phone numbers. An employee can only bean admin, managing the facility or working as a clerk, or atrainer. An employee cannot be a trainer and an admin because thetrainer id compensated an hourly wage while an admin staff paid amonthly salary. Trainers can train individual customers atdifferent time sessions.
A customer must register at one branch. Each customer has amembership number, name (stored as first name and last name),email, and only one phone number. A customer can join more than oneclass or uses any number of facilities. A customer may also decideto be trained by at most one personal trainer.
Given the above description:
1. Draw a Chen's Notation ERDiagram for the database, identifying the following:
a.All the entities, attributes andrelationships
b.Primary key and (discriminator in weakentity, if any). Don’t forget each entity has to have PK.
c.Participation and cardinality constraints.(Explain your choices for two constraints- i.e. identify the wordsthe guided your decision)
d.Specialization and completeness constraints(if there is an ISA relationship).
2. Write a schema for two entities and two relationshipsof your choice. Remember, sometimes a relationship isbetter not be represented in a separate schema; if this is the casewith your chosen relationship explain what you will do.