Question

In: Computer Science

You are hired to design a database for a fitness center. As the fitness center is...

You are hired to design a database for a fitness center. As the fitness center is expanding with more than one branch, they want to create a database to keep track of its customers, facilities and employees. Each branch has a unique id and address (building number, street, district, and city). A branch may have more than one facility (e.g. swimming pool, spa, etc.). Each facility must belong to only one branch, and the information for a facility is name and fees. In addition, each fitness branch offers different classes (such as Yoga, Pilates, Zumba, etc.). All classes should be led by at most one trainer, who is an employee.

Employees must work at one and only one branch. Each employee has an id, name, address (building number, street, district, and city) and can have multiple phone numbers. An employee can only be an admin, managing the facility or working as a clerk, or a trainer. An employee cannot be a trainer and an admin because the trainer id compensated an hourly wage while an admin staff paid a monthly salary. Trainers can train individual customers at different time sessions.

A customer must register at one branch. Each customer has a membership number, name (stored as first name and last name), email, and only one phone number. A customer can join more than one class or uses any number of facilities. A customer may also decide to be trained by at most one personal trainer.

Given the above description:

1. Draw a Chen's Notation ER Diagram for the database, identifying the following:

a.All the entities, attributes and relationships

b.Primary key and (discriminator in weak entity, 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 words the guided your decision)

d.Specialization and completeness constraints (if there is an ISA relationship).

2. Write a schema for two entities and two relationships of your choice. Remember, sometimes a relationship is better not be represented in a separate schema; if this is the case with your chosen relationship explain what you will do.

Solutions

Expert Solution

Lets’ follow the below steps to create ERD and relational database model for given fitness centre:

Step 1: List entities:

1) Branch

2) Facility

3) Customer

4) Staff

5) Admin

6) Trainer

7) Class

Step 2: List relationship among entities:

1) Branch has many facilities, but a facility is available to one branch only. It is 1: M relationship.

2) Branch offers many classes, but a class belongs to one branch only. It is 1:M relationship.

3) Each class led by a trainer and a trainer can lead many classes. It is M:1 relationship.

4) Employee class has below two sub types:

a) Admin

b) Trainer

5) Customer attends many classes and a class is attended by many customers.

6) A customer used none or many facilities; a facility is used by many customers.

Step 3: List attributes to the entities:

1) Branch(branch_id , address –composite attribute (building_number, street, district, city)

2) Facility(facility_name , fee)

3) Customer(membership_no, name –composite attribute (first name and last name), email, phone_number

4) Employee( emp_id, name, address –composite attribute (building_number, street, district, city) ,phone_numbers(multivalued attribute))

5) Admin(monthly_Salary)

6) Trainer(hourly_wage)

7) Class(class_id, date_time, duration_in_mins)

Step 4: Create ERD in crow’s foot notation:

Step 5: ERD Notations:

Step 6: Schema for 2 entities and 2 relationships

Consider the schema for below entities:

Branch, Customer

1) Branch(branch_id , building_number, street, district, city)

2) Customer(membership_no, first name , last name, email, phone_number)

Relationships in schema:

Let’s solve below relationship:

1) Customer to Branch: Each customer is registered at one branch, thus there is not need to create a new schema to store this relationship. A customer schema will store the link to its branch where he is registered:

Customer(membership_no, first name , last name, email, phone_number, branch_id(fk))

2) Class to Customer: A class is attended by many Customers and a Customer attends many classes. It is M:N relationship which can not be stored in existing tables. Thus a new schema will be created as below:

ClassCustomers(Class_id(fk), customer_membership_no(fk))


Related Solutions

You are hired to design a database for a fitness center. As the fitness center is...
You are hired to design a database for a fitness center. As the fitness center is expanding with more than one branch, they want to create a database to keep track of its customers, facilities and employees. Each branch has a unique id and address (building number, street, district, and city). A branch may have more than one facility (e.g. swimming pool, spa, etc.). Each facility must belong to only one branch, and the information for a facility is name...
The owner of Horne Design Wallcoverings has hired you as a consultant to design a database...
The owner of Horne Design Wallcoverings has hired you as a consultant to design a database management system for his chain of three stores that sell wallpaper and accessories. He would like to track sales, customers and employees. After initial meeting with him, you have developed a list of business rules and specifications to begin the design of an E-R Model. The list of business rules are: Customers place orders through a branch A customer may place many orders A...
Database __________ which is the logical design of the database, and the database _______ which is...
Database __________ which is the logical design of the database, and the database _______ which is a snapshot of the data in the database at a given instant in time. a) Instance, Schema b) Relation, Schema c) Relation, Domain d) Schema, Instance
True or False: Logical database design is the process of modifying the physical database design to...
True or False: Logical database design is the process of modifying the physical database design to improve performance. The two major logical database design techniques are conversion of E-R diagrams to relational tables and data normalization. Multivalued attributes are not permitted in unnormalized data. A many-to-many binary relationship in an E-R diagram requires the creation of a total of three tables in a relational database. A one-to-one unary relationship in an E-R diagram requires the creation of a total of...
You have been hired as the manager of a community health center. This health center provides...
You have been hired as the manager of a community health center. This health center provides medical care to children. One of your first tasks is to develop a static annual budget for the health center. In fact, the Board of Directors wants to see your budget by Saturday at midnight. In order to develop an accurate static budget you know you need to get some facts. You ask around to see what kind of information you can gather. *This...
Creating a Database Design Lab 1: Creating a Database Design (Wk 3) - OR - Draw...
Creating a Database Design Lab 1: Creating a Database Design (Wk 3) - OR - Draw with pencil and paper diagram (take photo of it and submit) along with a summary of the diagram you prepared in a Word document. Use the scenario from Assignment 1: Business Rules and Data Models to complete the lab: Suppose a local college has tasked you to develop a database that will keep track of students and the courses that they have taken. In...
Database You have just started a new position on the database design staff at Gizmonic Consultants,...
Database You have just started a new position on the database design staff at Gizmonic Consultants, Inc. Your first project is to translate the database requirements for Continental Hotels into an ER representation. In the next project, you will derive a relational schema from an ER diagram and implement the schema, populate it, and query over it. Requirements: Develop an ERD to capture the entities and relationships specified in the requirements documentation below. Use only the conventions covered in class....
You are hired to create a database for a Real Estate firm that lists and sells...
You are hired to create a database for a Real Estate firm that lists and sells properties at multiple sales offices . Draw an ER diagram using ERDPlus for the following description of the firm, indicate all primary keys and cardinalities. List any assumptions you made. There are many sales offices in several states. Attributes of a sales office include office number (identifier) and location. Components of location include Address (number & street), City, State and Zip. Each sales office...
Pitt Fitness would like to analyze their options for an in-house database versus a cloud database-as-a-service. What are the benefits to moving their database to the cloud?
Pitt Fitness would like to analyze their options for an in-house database versus a cloud database-as-a-service. What are the benefits to moving their database to the cloud? 
You are a data analyst with strong backgrounds in database design and management. In fact, you...
You are a data analyst with strong backgrounds in database design and management. In fact, you have learned from education, mentors, and experience the art of collecting data and transforming data into business intelligence and your experience in database design and management complements your abilities to analyze data. Your hypothetical employer, Park University, is in the process planning a new employee payroll database and has asked you for assistance. The database will be standalone but will need to have ability...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT