In your new job as a backend developer for keepfitgyms.com - a chain of
leisure centres - you are responsible for implementing a MySQL
database system. Your task is to design and develop a web application
allowing users to do the following:
• Setup a member profile with standard information such as membership
id, firstname, surname, email, password, etc.
• Purchase a subscription for a particular leisure centre by choosing
from a range of subscription types. These will have extra attributes
such as a renewal date, status and a list of facility types included in
the subscription.
• Make a booking for a specific time for a facility at a specific leisure
centre.
(a) For the keepfitgyms.com database, create an Entity Relationship Diagram
using crow's foot notation (as covered in this module). Entities, relationships
between entities, and appropriate association types should all be included
in your diagram.
[10]
(b) For each table of the database you designed in part (a), list the primary
and foreign keys.
[4]
(c) Using the appropriate SQL code write commands to create two of the
tables you mentioned in your answer to part (a). To gain maximum
points include all of the relevant fields and specify each as accurately as
possible.
[12]
(d) How could you design your database schema to ensure that each member
only holds a single subscription?
[4]