Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In the downloadable files, you will find two CSV files countries.csv and winter.csv that contain data on all the Winter Olympic Games from Chamonix in

In the downloadable files, you will find two CSV files countries.csv and winter.csv that contain data on all the Winter Olympic Games from Chamonix in 1924 to Sochi in 2014. The countries.csv file provides names and population data for countries that have competed in the Olympics. (It also contains some GDP per capita data, but you can ignore that.) Note that some countries that no longer exist (such as the Soviet Union or East Germany) don't have a population figure given. Using Neo4j and Cypher create the following Cypher commands: (a) Load the Country nodes from the countries.csv file. Each Country node should have the following properties: name code (the 3-letter International Olympic Committee code for the country) population (an integer) 5 Marks (b) Load the Games nodes from the winter.csv file. Note that some cities have hosted the games more than once, so you need to include the year as a property. The properties are: city year (an integer) 5 Marks (c) Load the Event nodes from the winter.csv file. Each event is classified into a discipline, each discipline is classified into a sport and there are separate events for men and women. The properties of each Event node will then be: name (the "Event" field from the CSV file) discipline sport gender

Each Event node has an AT relationship to a Games node. (An Event is AT a Games.) It should be clear that for a given combination of values of the four Event properties shown above, there will be a separate such Event node for each games. You need to be aware of this when creating Event nodes. 10 Marks (d) Put an index called athlete_name on name property of Athlete nodes. Note that we haven't yet created the Athlete nodes, but creating the index first will speed up the process. 2 Marks (e) Load the Athlete nodes from the winter.csv files and create their relationships. You need to create a REPRESENTED relationship between each athlete and the country they were representing at the time. There should also be a COMPETED_IN relationship between each athlete and each event that they competed in. The COMPETED_IN relationship should have a medal property which has the type of medal they won in that event. Assume that athletes are unique by name across the entire data-set, but may represent more than one country over time. 20 Marks (f) Write a query to return the total number of athletes represented from each country. 3 Marks (g) Write a query to list the all-time top five countries in the medal tally, with the number of medals in each case. (Note: The United States and Canada have both won more than 600 medals at the Winter Olympics.) 5 Marks (h) Write a query to list the all-time top five gold medal-winning athletes in total across multiple games. Give the athlete's name, their country and their gold medal total. 5 Marks (i) Write a query to list the top five Olympic gold medal winners at any one games. Give the athlete's name, the city the games were held in and the gold medal total. (Note: Eric Heiden won 5 gold medals at the Lake Placid games.) 5 Marks

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

Database Systems Design Implementation And Management

Authors: Peter Robb,Carlos Coronel

5th Edition

061906269X, 9780619062699

More Books

Students also viewed these Databases questions

Question

manageremployee relationship deteriorating over time;

Answered: 1 week ago