- A Running Club Gets The Results Of Races That Its Members Run From The Provincial Association The Format Of The Raw Dat 1 (183.69 KiB) Viewed 37 times
A running club gets the results of races that its members run from the provincial association. The format of the raw dat
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
A running club gets the results of races that its members run from the provincial association. The format of the raw dat
A running club gets the results of races that its members run from the provincial association. The format of the raw data that is received is shown in an extract below. Each line gives the name of the race, distance, date, position of the runner, name of the runner, gender, age, time taken for race, and number of people who ran the race, if known ("-1" if unknown). Jozi South, 21km, 2015-10-21,938, R, Wenley, M, 62, 02:51:46,996 Jozi South, 21km, 2015-10-21,972, H, Johnson, F, 59,03:01:13,996 Jozi South, 10km, 2015-10-21, 204, N, Bontley, F, 52,00:59:43,818 Jozi South, 10km, 2015-10-21,301, T, Rao, F,40,01:05:16,818 Constantia Valley Grape Run, 21km, 2015-10-21,742, S, Phaahle, M,, 02:24:13,-1 SABS Jacaranda Challenge, 42km, 2015-10-20, 68, R, Mathoba, M, 30, 03:14:39,782 SABS Jacaranda Challenge, 21km, 2015-10-20,576, J, Murray, M, 31, 02:06:48, 1536 SABS Jacaranda Challenge, 21km, 2015-10-20,587, F, Menges, M, 44, 02:07:14, 1536 SABS Jacaranda Challenge, 21km, 2015-10-20, 1303, R, Wenley, M, 62,02:41:08, 1536 SABS Jacaranda Challenge, 10km, 2015-10-20, 1604, J, Barnes, M, 62, 01:35:29, 1740 Spar Ladies, 10km, 2015-10-14,489,Q,Dale (W), F, 27,00:59:17,4620 Spar Ladies, 10km, 2015-10-14,895, N, Ghul (W), F,19,01:05:14,4620 Spar Ladies, 10km, 2015-10-14, 1261, M, Gray, F, 55, 01:09:27,4620 a) Give the SQL code to declare a single table that would store this data sensibly as is. (4 marks) b) The above data is a set of results for the University's Alumni Running Club. The Wits Ath- letics Club is the club for students and although it is technically a separate club, we like to keep their records too. The person who currently keeps the data attaches the string "(W)" next to the name of anyone in Wits Athletics Club, believing this is elegant and compact. Critique this decision, giving justifications for supporting or opposing this decision. (3 marks) c) This is a small club with at most 100-150 active runners in a year, who run on average 5 races a year. Design a normalised database (third normal form) for this data. Give the SQL CREATE statements needed to create the database's tables and justify your design with respect to the rules of normalisation. Identify any primary keys or foreign keys (or if it is not appropriate or possible to have such, explain). Do not give the SQL that would put the data in the tables. You can make any reasonable assumptions, stating and justifying them. (7 marks) (4 marks) d) What indexes do you need? Give the SQL and a justification. e) Give the SQL to populate one of the new tables from the single unnormalised table you created in part a). (2 marks) ITULM