University of Maryland Global Adeoye Gym Fitness Tracking System Project

User Generated

abvqaboyr

Programming

University of Maryland Global Campus

Description

  • Step #1 - Write a 1-2 page Statement of Work (SOW) to describe the need to create, design and implement the database that you propose for your project.
  • Step #2 - Create requirement definition document and use ER Assistant, Visio, or SQL Developer Data Modeler to create Entity Relationship Diagram (ERD) for your project.
  • Step #3 - Use SQL DDL statements to create your tables/views/triggers and other required database objects for you project. Also include queries (select statements on database catalog/data dictionary such as user_objects and user_tables) to demonstrate all objects are created successfully.
  • Step #4 - Use SQL DML statements to insert sample data into your tables. Use SQL SELECT statements to query your data. This submission should be a final technical report which includes Project Step #1, Step #2, Step #3, Step #4 and follow the technical report template.
  • --------------------------------------------------------------------------------------------------------------------------------------------------
  • Instructions

    Create and submit your final consolidated technical report which will include the new requirements outlined below that are from project step 4 as well as all of the previous project steps (1-3). From project step 4, you must create and submit a SQL script containing your data manipulation language (DML) statements to insert your sample data into your database and your twenty queries (12 basic, 8 advanced). Within the consolidated technical report, you must include the complete textual output from running your DDL, DML, and queries successfully. You will also include a literature review of similar systems in your report. Your final score will include the evaluation of the collection of output as well as a live, error-free expected run of your script in the environment. Within your DML and query scripts, the following minimum requirements must be met:Data Manipulation Language (DML) SQL Script Minimum Requirements:
    1. All Tables Populated with Minimum of 10 Rows
    Unless a valid and approved exception exists within your requirements definition document, all tables must have at least 10 rows of sample data.
    1. All Surrogate Keys Populated Automatically
    All of your project sequences and triggers must be used to automatically populate your surrogate keys.
    1. Separate DML for Different Tables with Comments
    For readability, each block or grouping of DML statements for each table must be separated with an appropriate comment header with a blank line after the last statement in the group. Note: the last group does not require a blank line afterwards.
    1. Executable, Error-Free Script
    The script you submit must fully execute and be error-free. 20 SQL Queries (12 Basic, 8 Advanced) Minimum Requirements:
    1. Query 1: Select all columns and all rows from one table
    2. Query 2: Select five columns and all rows from one table
    3. Query 3: Select all columns from all rows from one view
    4. Query 4: Using a join on 2 tables, select all columns and all rows from the tables without the use of a Cartesian product
    5. Query 5: Select and order data retrieved from one table
    6. Query 6: Using a join on 3 tables, select 5 columns from the 3 tables. Use syntax that would limit the output to 10 rows
    7. Query 7: Select distinct rows using joins on 3 tables
    8. Query 8: Use GROUP BY and HAVING in a select statement using one or more tables
    9. Query 9: Use IN clause to select data from one or more tables
    10. Query 10: Select length of one column from one table (use LENGTH function)
    11. Query 11: Delete one record from one table. Use select statements to demonstrate the table contents before and after the DELETE statement. Make sure you use ROLLBACK afterwards so that the data will not be physically removed
    12. Query 12: Update one record from one table. Use select statements to demonstrate the table contents before and after the UPDATE statement. Make sure you use ROLLBACK afterwards so that the data will not be physically removed
    13. Perform 8 Additional Advanced Queries
    NOTE: each query should have comment to describe the purpose of that queryThese queries are open for you to design but must be complex in nature such as including multiple (3 or more) table joins, sub-queries, aggregate functions, etc. These queries will not only be evaluated on their design and execution but also on their depth of complexity. Challenge yourself and leverage the techniques learned throughout the course to design your advanced queries. Technical Report
    1. Introduction
    2. Overview
    3. Literature Review
    4. Assumptions
    5. Design Decisions
    6. Statement of Work (SOW)
      • Revised, updated, and expanded as needed to include incorporation of all feedback given as part of the project part 1 evaluation.
    7. Requirements Definition Document
      • Revised, updated, and expanded as needed to include the incorporation of all feedback given as part of the project part 2 evaluation.
    8. Detailed Database Design
      1. Entity Relationship Diagram (ERD)
        • Revised, updated, and expanded as needed to include the incorporation of all feedback given as part of the project part 2 evaluation.
      2. DDL Source Code Embedded
        • Ensure that all source code embedded in your report is formatted professionally and legibly.
      3. DML and Query Source Code Embedded
        • Project Part 4 DML script + 20 SQL queries assignment; see above. Ensure that all source code embedded in your report is formatted professionally and legibly.
      4. DDL, DML, and Query Output
        • Show output from the execution of all DDL, DML, and SQL queries. Ensure that all output is formatted professionally and legibly.
    9. Database Administration and Monitoring
    Project Step #4 Deliverables
    1. Technical Report in Word or PDF: LastName_FirstName_final_project.[doc|pdf]
    2. Updated DDL Script in SQL or TXT: LastName_FirstName_DDL.[sql|txt]
    3. DML Script in SQL or TXT: LastName_FirstName_DML.sql
    To clarify, you are required to submit your final scripts (DDL and DML to include your queries) as embedded into your consolidated lab report along with their output as well as separately in SQL or TXT format to be executed and verified as error-free.

Unformatted Attachment Preview

Statement of Work (SOW): Adeoye Gym Fitness Tracking System Overview: The goal of the project is to design and develop a database system for Adeoye Gym that will help keep track of a customer’s overall fitness journey. Adeoye Gym currently has one gym location. The gym is looking to expand operations by launching 10 facilities in Milwaukee, WI. In order, to keep up with competition, Adeoye Gym wants to create a tailored fitness experience for its customers. The gym will offer nutrition advice, fitness classes, fitness exercises, fitness coaching, supplements, mental exercises, and fitness equipment. In addition, the customer will be able to interact with coaches virtually. In order, for customers to maximize the full benefits of the services offered by the gym, customers will be required to create online accounts. Purpose and Objective: Adeoye Gym needs clients to enter health, fitness, and personal information so the gym can take a tailored approach in tracking a specific clients fitness journey. The database will collect and store information on dates of exercise, specific exercise done, type of exercise, weight, type of diet, repetition of specific exercise for instance, 10 repetitions of push-ups. The information gathered will enable fitness coaches to inspect and adapt to the client's fitness journey. For instance, a coach will have to adjust and refine a client's diet and exercise after a week of no improvements. Project Scope: The new fitness tracking system will be created for use of all Adeoye Gyms. Features of the new system must be able to provide virtual coaching between instructor and client, nutritional information on various foods, calorie counter, body measurements, fitness timeline, names of exercises, videos of how to do various exercises. Out of scope: The new system will provide a reward program in the future. A program for members that achieve their fitness goals that will give rewards to members who achieve and maintain their fitness goals. Also, video journals of each client's fitness journey will be captured and shared with other members for informational, educational, and motivational purposes. Database Goals, Expectations, and Deliverables (10 points) Upon completion of the system, the tracking system will give Adeoye Gym a competitive edge over the competition. Customers will be able to log into the mobile application or website and in real time monitor metrics, track performance, and adjust goals. The database is expected to have a high degree of functionality, quality, and security with a low tolerance for downtime. The system is expected to be delivered on December 12, 2021, it will take 6 months to complete the project. Database Benefits The business wants to keep the customer happy. Connecting with the customer from a tailored perspective shows care and passion for fitness. Keeping the customer happy will in turn generate revenue and create expansion opportunities once customers testify to the value the new tracking system will provide. For the customer, ease of use, convenience, opportunity to quickly adapt fitness goals are all merits for the customer. Overall, the tracking system is providing a customized way to tackle obesity in the USA. Diagram Tool: The data modeling tool that will be used to create and provide an entity relation diagram is ER assistant. The ERD will show how the relationships and cardinality that connects them. Also, the ERD will provide a visual representation of the fitness tracking database and show the rational structure of the database. Database: Oracle 11g database will be accessed using virtual desktop applications. Hardware and Software: Virtual Desktop Application- This is a server that allows a connection into a personal computer. The Virtual machine provided by UMGC will be used. Citrix Receiver will be the link between the virtual application and client computer (MAC OS) ER assistant is the software that will be used for creating the ERD DDL and DML: Structured query language (SQL) will be used for the data definition language and data manipulation language. SQL will be used in building the tables in the tracking system. Also, SQL will be used to translate information like entities, relationships, and attributes in the ERD into tables. Project 2: Requirements Definition Document Business Rules 1) A gym may have a member enrolled at one gym location exclusively or have membership access to several other gym locations. 2) Members can only be assigned to one type of coach 3) Members must be assigned to a nutritionist 4) Entities: GYMS, MEMBERS, NUTRITIONIST, EXERCISE, AND COACH. Entity Name: GYMS Description: Gym Primary key: GYM ID Attributes of GYM ID: GYM1, GYM2, GYM3, GYM MANAGER Entity Name: MEMBERS Description: Members can be enrolled exclusively in one gym location or have access to other locations Primary Key: MEMBER ID Attributes of MEMBER ID: First Name, Last Name, DOB, EMAIL, PHONE NUTRITIONIST Description: Each member will be assigned a nutritionist who will prescribe a special type of diet to aid fitness Primary Key: Nutritionist ID Attributes: First Name, Last Name, Keto, Low carb, and vegan EXERCISE Description: Many members can participate in one or many types of exercises Primary Key: Exercise ID Attributes: Exercise ID Swimming, Boxing, Running, Weightlifting, Cycling COACH Description: One specialty coach can coach multiple members. Each member must have a coach. Multiple members can have the same coach Primary Key: COACH ID Attributes: First Name, Last Name, Strength Coach, Cardio Coach Relationships and Cardinality Relationship 1: M- GYM and MEMBER Cardinality/ Business Rule a gym shall provide service to one or many members Relationship 1: M- MEMBERS and MEMBER Cardinality/ Business Rule a gym shall provide service to one or many members Data Definition Language (DDL) SQL Script 1: Drop Statements for All Objects as needed (5 points) at the beginning of your script, ensure that all objects that are required to be dropped are properly dropped. Answer: In this section we will drop the table which is not useful for our database and we use the Drop key word using in My SQL with table name. Using the database DLD we have drop the persons table for add some useful tables for our future work 2: 1. Create/Alter Statements for All Tables and Constraints (30 points) Database: `dld` --- -------------------------------------------------------- --- Table structure for table `classes` -CREATE TABLE `classes` ( `cls_id` int(11) NOT NULL, `cls_name` varchar(255) NOT NULL, `cls_add` varchar(255) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- ---------------------------------------------------------- Table structure for table `coaching` -CREATE TABLE `coaching` ( `c_id` int(11) NOT NULL, `c_name` varchar(255) NOT NULL, `c_mobile` varchar(255) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- ---------------------------------------------------------- Table structure for table `fitness` -- CREATE TABLE `fitness` ( `f_id` int(11) NOT NULL, `f_desc` varchar(255) NOT NULL, `f_type` int(255) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- ---------------------------------------------------------- Table structure for table `gyms` -CREATE TABLE `gyms` ( `g_id` int(11) NOT NULL, `g_desc` varchar(255) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- ---------------------------------------------------------- Table structure for table `members` -CREATE TABLE `members` ( `m_id` int(11) NOT NULL, `m_add` varchar(255) NOT NULL, `m_name` varchar(255) NOT NULL, `m_email` varchar(255) NOT NULL, `m_pass` varchar(255) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- ---------------------------------------------------------- Table structure for table `nutrition` -CREATE TABLE `nutrition` ( `n_name` int(255) NOT NULL, `n_desc` varchar(255) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; --- Indexes for dumped tables ---- Indexes for table `classes` -ALTER TABLE `classes` ADD PRIMARY KEY (`cls_id`); --- Indexes for table `coaching` -ALTER TABLE `coaching` ADD PRIMARY KEY (`c_id`); --- Indexes for table `fitness` -ALTER TABLE `fitness` ADD PRIMARY KEY (`f_id`); --- Indexes for table `gyms` -ALTER TABLE `gyms` ADD PRIMARY KEY (`g_id`); --- Indexes for table `members` -ALTER TABLE `members` ADD PRIMARY KEY (`m_id`); --- Indexes for table `nutrition` -ALTER TABLE `nutrition` ADD KEY `n_name` (`n_name`); --- Constraints for dumped tables ---- Constraints for table `gyms` -ALTER TABLE `gyms` ADD CONSTRAINT `gyms_ibfk_1` FOREIGN KEY (`g_id`) REFERENCES `classes` (`cls_id`); --- Constraints for table `nutrition` -ALTER TABLE `nutrition` ADD CONSTRAINT `nutrition_ibfk_1` FOREIGN KEY (`n_name`) REFERENCES `fitness` (`f_id`); 3: 1. Create Indexes for Natural, Foreign Key, and Frequently Queried Columns (10 points) Answer: List of indexes for all choices: 4: 1. Create a Minimum of Two Views (10 points) 5: 1. Create a Minimum of Two Sequences (10 points) 2. Answer: 3. 4. 5. 6. 6: 1. 2. Create a Minimum of Two Triggers (10 points) 7: 1. Describe the Business Purpose of your Views and Triggers (5 points) Business purpose of Views: No need to apply same query again and again No need to create separate table for view Views are auto updated Provides better view to business table Business purpose of Triggers: To insert automate To make auto operations Fast business query operations 2. 8: 1. Database Catalog/Data Dictionary Queries (5 points) 9: 1. 2. 1: 2: 3: 4: Output Report (5 points) 5: 6: 7: Business purpose of Views: No need to apply same query again and again No need to create separate table for view Views are auto updated Provides better view to business table Business purpose of Triggers: To insert automate To make auto operations Fast business query operations 8: 10: Executable, Error-Free Script (10 points) -- Database: `dld` --- ---------------------------------------------------------- Stand-in structure for view `business1` -- (See below for the actual view) -CREATE TABLE `business1` ( `m_id` int(11) ,`m_add` varchar(255) ,`m_name` varchar(255) ,`m_email` varchar(255) ,`m_pass` varchar(255) ); -- ---------------------------------------------------------- Stand-in structure for view `business2` -- (See below for the actual view) -CREATE TABLE `business2` ( `c_id` int(11) ,`c_name` varchar(255) ,`c_mobile` varchar(255) ); -- ---------------------------------------------------------- Table structure for table `classes` -CREATE TABLE `classes` ( `cls_id` int(11) NOT NULL, `cls_name` varchar(255) NOT NULL, `cls_add` varchar(255) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='data dictionaries'; --- Dumping data for table `classes` -INSERT INTO `classes` (`cls_id`, `cls_name`, `cls_add`) VALUES (1, 'msc', 'cs department'); -- ---------------------------------------------------------- Table structure for table `coaching` -CREATE TABLE `coaching` ( `c_id` int(11) NOT NULL, `c_name` varchar(255) NOT NULL, `c_mobile` varchar(255) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; --- Dumping data for table `coaching` -INSERT INTO `coaching` (`c_id`, `c_name`, `c_mobile`) VALUES (1, 'msc', '225235'); -- ---------------------------------------------------------- Table structure for table `fitness` -CREATE TABLE `fitness` ( `f_id` int(11) NOT NULL, `f_desc` varchar(255) NOT NULL, `f_type` int(255) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `fitness` -INSERT INTO `fitness` (`f_id`, `f_desc`, `f_type`) VALUES (452, 'fit', 1); -- ---------------------------------------------------------- Table structure for table `gyms` -CREATE TABLE `gyms` ( `g_id` int(11) NOT NULL, `g_desc` varchar(255) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; --- Dumping data for table `gyms` -INSERT INTO `gyms` (`g_id`, `g_desc`) VALUES (1, 'xyz'); --- Triggers `gyms` -DELIMITER $$ CREATE TRIGGER `test2` BEFORE INSERT ON `gyms` FOR EACH ROW set @sum = @sum+g_desc $$ DELIMITER ; -- ---------------------------------------------------------- Table structure for table `members` -CREATE TABLE `members` ( `m_id` int(11) NOT NULL, `m_add` varchar(255) NOT NULL, `m_name` varchar(255) NOT NULL, `m_email` varchar(255) NOT NULL, `m_pass` varchar(255) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; --- Dumping data for table `members` -INSERT INTO `members` (`m_id`, `m_add`, `m_name`, `m_email`, `m_pass`) VALUES (444, 'usa', 'david', 'davic@gmail.com', 'qwer'); --- Triggers `members` -- DELIMITER $$ CREATE TRIGGER `test` BEFORE INSERT ON `members` FOR EACH ROW set @sum = @sum+new.m_pass $$ DELIMITER ; -- ---------------------------------------------------------- Table structure for table `nutrition` -CREATE TABLE `nutrition` ( `n_name` int(255) NOT NULL, `n_desc` varchar(255) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; --- Dumping data for table `nutrition` -INSERT INTO `nutrition` (`n_name`, `n_desc`) VALUES (452, 'full'); -- ---------------------------------------------------------- Structure for view `business1` -- DROP TABLE IF EXISTS `business1`; CREATE ALGORITHM=UNDEFINED DEFINER=`view1`@`%` SQL SECURITY DEFINER VIEW `business1` AS SELECT `members`.`m_id` AS `m_id`, `members`.`m_add` AS `m_add`, `members`.`m_name` AS `m_name`, `members`.`m_email` AS `m_email`, `members`.`m_pass` AS `m_pass` FROM `members` WHERE 1 ; -- ---------------------------------------------------------- Structure for view `business2` -DROP TABLE IF EXISTS `business2`; CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `business2` AS SELECT `coaching`.`c_id` AS `c_id`, `coaching`.`c_name` AS `c_name`, `coaching`.`c_mobile` AS `c_mobile` FROM `coaching` WHERE `coaching`.`c_name` = 'david' ; --- Indexes for dumped tables ---- Indexes for table `classes` -ALTER TABLE `classes` ADD PRIMARY KEY (`cls_id`), ADD UNIQUE KEY `cls_add` (`cls_id`,`cls_name`,`cls_add`); --- Indexes for table `coaching` -ALTER TABLE `coaching` ADD PRIMARY KEY (`c_id`); --- Indexes for table `fitness` -ALTER TABLE `fitness` ADD PRIMARY KEY (`f_id`); --- Indexes for table `gyms` -ALTER TABLE `gyms` ADD PRIMARY KEY (`g_id`), ADD UNIQUE KEY `test` (`g_desc`), ADD KEY `g_desc` (`g_desc`); --- Indexes for table `members` -ALTER TABLE `members` ADD PRIMARY KEY (`m_id`); --- Indexes for table `nutrition` -ALTER TABLE `nutrition` ADD KEY `n_name` (`n_name`); --- AUTO_INCREMENT for dumped tables ---- AUTO_INCREMENT for table `members` -ALTER TABLE `members` MODIFY `m_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=445; --- Constraints for dumped tables ---- Constraints for table `gyms` -ALTER TABLE `gyms` ADD CONSTRAINT `gyms_ibfk_1` FOREIGN KEY (`g_id`) REFERENCES `classes` (`cls_id`); --- Constraints for table `nutrition` -ALTER TABLE `nutrition` ADD CONSTRAINT `nutrition_ibfk_1` FOREIGN KEY (`n_name`) REFERENCES `fitness` (`f_id`); COMMIT;
Purchase answer to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Explanation & Answer

View attached ex...


Anonymous
Really great stuff, couldn't ask for more.

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4

Similar Content

Related Tags