Describe relational algebra and its relationship

Assignment Help Other Subject
Reference no: EM132404130

ITECH2004 Data Modelling - Federation University

Individual Assignment 2: SQL

Overview
The purpose of this task is to develop student's skills in designing and implementing a relational database for a given case study.

Learning Outcomes Assessed
The following course learning outcomes are assessed by completing this assessment:
K5. Describe relational algebra and its relationship to Structured Query Language (SQL).
S1. Interpret entity-relationship diagrams to implement a relational database.
S2. Demonstrate skills in designing and building a database application using a commercially available database management system development tool.
S3. Use a query language for data manipulation.
A1. Design and implement a relational database using a database management system.
A2. Utilise a query language tools and techniques to obtain data and information from a database.

Assessment Details

Background

Major League Soccer (MLS) is a men's professional soccer league played in the United States. It is equivalent to European (and South American) football. The league comprises 24 teams - 21 in the U.S. and 3 in Canada.

There are many games played in each season by many teams. You can find the details of the team names and home locations listed at this Wikipedia page:

You are part of a SPORTS PERFORMANCE team and you currently gather the following information:
- Video footage of each game - several frames per second, and recorded and stored in MP4 format.
- GPS track logs of each player for each game, including the three referee staff, and even the location of the ball
- Transcription of the "game play" by professional auditors, who have recorded all the important events during a game: when a pass was made, and between which people; whether there was a tackle; shots on goal; corners; fouls and any resultant cards; and so on.
You have been tasked to start analysing this data, and the following SQL commands are a mixture of preprocessing and the beginnings of some useful statistics.

The complete ERD is provided in Figure 1.

Requirements

1. Write the SQL code to create the table structures for the entities shown in Figures 1 and 2. The structures should contain the attributes specified in the ERD. Use data types that are appropriate for the data that will need to be stored in each attribute. Enforce primary key and foreign key constraints as indicated by the ERD.

2. The following descriptions and files (XLSX) provide a very small portion of the data that will be kept in the database. The data needs to be inserted into the database for testing purposes. Write the INSERT commands necessary to place the following data in the tables that were created in Question 1 (If required by your DBMS, be certain to save the rows permanently).

Refer to accompanying data file: "EventsDataView.xlsx".
• There are two teams listed in this example data - Team1 and Team2. Team2 rows are highlighted in red for ease of viewing.
• Type and Subtype refer to the different kinds of events that can occur in a game - for instance there are several ways a ball can be lost, one of which is by interception (see row 13); for instance there are several different kinds of set pieces, such as "Throw In's" (see row 16), and also "Corners" (not listed).
• Period is either 1 or 2, i.e. first half or second half of the game.
• "Start Video Frame" and "End Video Frame" refer to the segment of video footage where this Event is found. "Start Time [s]" and "End Time [s]" refer to the time period for this same Event.
• "From" refers to the first player involved in the Event, sometimes there is only a first player and not a second ("To"), but if the event is a PASS then there are two players listed.
• StartX,Y and EndX,Y refer to the geographic positions of the beginning and end of this Event.

For Questions 3-14, use the tables that were created in Question 1 and the data that was loaded into those tables in Question 2.

3. Write the SQL command to change the season year for season number 3 to 2017.

4. Write SQL command(s) to create a derived attribute that represents a new surrogate primary key for the Game table. It should be comprised of character data, created from the location and date attributes.

5. Write SQL command(s) to create a new table called EventTypes that contains a single listing of all Event types from EventsDataView.

6. Write SQL command(s) to create a new table for player statistics. The table will contain the Players name or ID, and include a derived attribute which represents the average position played on the pitch. The attribute should accept null values.

7. Write SQL command(s) alter the TracksDataView table to include a derived attribute named DistanceFromBall which represents the Euclidean distance between each player and the ball.. The attribute should accept null values.

8. Alter the Game table to include attributes that represent the final score of the game, and update with some simulated values.

9. Alter the EventsDataView and TracksDataView tables to include an attribute named PitchArea to store character data up to ten characters long. The attribute should have a constraint to enforce the domain ("Area1," "Area2,", "Area3" and "Area4") and have a default value of "Unknown."

10. Write SQL command(s) to cerate a new table called TrackLogs and extract all tracklog data into this. The attributes will be the new primary key from Q2, and also Date, PlayerID, Xposition, Yposition, Time.

11. Write SQL command(s) to see if any particular players have been sent off (Type="CARD", Subtype="RED") more than once by a particular referee.

12. Alter the player statistics table to include attributes named "YellowCards" and "RedCards" which represent the count of these cards issued to a player. The attribute should not accept null values, and it should have a default value of 0.

13. Create a new table to contain the following statistics about each game: the number of Cards issued;the number of passes; and, the number of scoring attempts.

14. For each scoring event calculate derived attributes which represent the distance of the scorer from the goal line, and the distance from them to the nearest opponent.

Documentation requirements
1. A title page clearly stating your name and student ID and your tutor's name.
2. A copy of the relational schema you have developed from the ER diagram provided and all additional table.
3. A zipped copy of the files you are required to create for questions 3-14 (ie nnnn_question_n.txt, nnnn).
4. Full APA referencing of any resources you have used to complete your submission

Attachment:- Assignment SQL.rar

Verified Expert

In this task, ERD diagrams were drawn of a football game scenario.The ERD diagrams were then converted into relational schema by writing down the sql code.Data was inserted into the tables using insert queries.Aside, the different database related questions were answered in regard to this task.

Reference no: EM132404130

Questions Cloud

Compliance with legislation and examples of prohibited acts : Medical Tourism has become a growing industry, especially in developing countries. Compliance with legislation. Examples of prohibited acts.
Define the types of marketing research : Develop a Marketing Plan. Define the types of marketing research. Analyze potential pricing alternatives.
Ethical issues confronting your field of business : Specifically, identify the top five ethical issues confronting your field of business in contracting and acquisition.
Charge of job evaluation for organization : Charge of job evaluation for organization and that you have been given the following jobs to evaluate and determine their overall worth to the organization
Describe relational algebra and its relationship : Describe relational algebra and its relationship to Structured Query Language and Demonstrate skills in designing and building a database application.
Write a reflective essay on the learnings : Reflect on the learnings gained from undertaking the capstone subject and assessments. In addition, students are to look back at their MBA course.
System modelling - modelling diagrams assignment : Draw use case, Domain model, System Sequence modelling diagrams for the given case study, justify the choose of modeling tools, and explain the conclusions
Represent the proportion of all actors who are extroverts : Let p represent the proportion of all actors who are extroverts. Find a point estimate for p. (Round your answer to four decimal places.)
Problem regarding the phstat solution : The population mean waiting time to check out of a supermarket has been 4 minutes. Recently, in an effort to reduce the waiting time

Reviews

Write a Review

Other Subject Questions & Answers

  Cross-cultural opportunities and conflicts in canada

Short Paper on Cross-cultural Opportunities and Conflicts in Canada.

  Sociology theory questions

Sociology are very fundamental in nature. Role strain and role constraint speak about the duties and responsibilities of the roles of people in society or in a group. A short theory about Darwin and Moths is also answered.

  A book review on unfaithful angels

This review will help the reader understand the social work profession through different concepts giving the glimpse of why the social work profession might have drifted away from its original purpose of serving the poor.

  Disorder paper: schizophrenia

Schizophrenia does not really have just one single cause. It is a possibility that this disorder could be inherited but not all doctors are sure.

  Individual assignment: two models handout and rubric

Individual Assignment : Two Models Handout and Rubric,    This paper will allow you to understand and evaluate two vastly different organizational models and to effectively communicate their differences.

  Developing strategic intent for toyota

The following report includes the description about the organization, its strategies, industry analysis in which it operates and its position in the industry.

  Gasoline powered passenger vehicles

In this study, we examine how gasoline price volatility and income of the consumers impacts consumer's demand for gasoline.

  An aspect of poverty in canada

Economics thesis undergrad 4th year paper to write. it should be about 22 pages in length, literature review, economic analysis and then data or cost benefit analysis.

  Ngn customer satisfaction qos indicator for 3g services

The paper aims to highlight the global trends in countries and regions where 3G has already been introduced and propose an implementation plan to the telecom operators of developing countries.

  Prepare a power point presentation

Prepare the power point presentation for the case: Santa Fe Independent School District

  Information literacy is important in this environment

Information literacy is critically important in this contemporary environment

  Associative property of multiplication

Write a definition for associative property of multiplication.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd