Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

Schema The schema below represents data for the 2018 FIFA World Cup, where people can buy tickets for matches they would like to attend. It

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

Schema The schema below represents data for the 2018 FIFA World Cup, where people can buy tickets for matches they would like to attend. It attempts to represent the domain well, but in order to keep the assignment manageable, some things are simplified and other details are not represented. For example, the different stages of the competition are ignored and only matches between any two countries are considered Remember that all your queries will be written with respect to the schema below. Your goal is to produce answers that are correct with respect to this schema, even if they aren't quite correct in the real world Relations Team(country, coach) A tuple in this relation represents the team of a country that participates in the competition. country is the team's country name, and coach is the name of the team's coach . Player(PID, fname, lname, position, goals, country) A tuple in this relation represents a football player who is participating in the contest. PID is the player's ID, fname is their first name, Iname is their last name, position is the positioin they are playing on the pitch, goals is the number of goals the player has scored so far in the competition, and country is the country of the team they are playing for. Stadium(SID, capacity, city) A tuple in this relation represents a stadium where a match takes place. SID is the stadium's ID, capacity is the capacity of the stadium, and city is the city where the stadium is located Match(MID, date, time, SID) A tuple in this relation represents a match. MID is the id of the match, date is the date the match is scheduled on, time is the time the match is scheduled on, and SID is the SID of the stadium where the match takes place. . Ticket (TID, datelssued, timelssued, MID) A tuple in this relation represents a ticket that was purchased. TID is the ticket's id, datels- sued is the date that it was purchased, timelssued is the time that it was purchased, and MID is the MID of the match it was purchased for . Competes(MID, countryl, country2, goals1, goals2) A tuple in this relation represents which teams are competing in a match. MID is the id of the match, countryl is the country of the first team, country2 is the country of the second team, goals 1 is the number of goals scored by the first team, and goals2 is the number of goals scored by the second team Player country] Team country] Match SID StadiumSID] Ticket MID C Match MID Competes MID] Match MID Competes(countryl] C Team[country] Competes[cou ntry2] C Team[country] Part 1 20%-4 marks each: Additional Integrity Constraints Below are some additional integrity constraints on our schema. Express each of them using the notation from Section 2.5.1 of your textbook. If a constraint cannot be expressed using this notation, simply write "cannot be expressed", 1. No team can play against itself. 2. All tickets for a match have to be purchased before the time of the match. 3. The number of tickets purchased for a match should not exceed the capacity of the stadium where the match takes place. 4. A coach can only coach one team. 5. A player's position should be one of 'G', 'D', 'M' or 'S' representing a goalkeeper, defender, midfielder or striker, respectively

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions