You have been given the following specifications of a


You have been given the following specifications of a simple database for keeping track of venues and events at the Olympics (note that primary keys are shown underlined, foreign keys in bold).

You should run your SQL to demonstrate that it works correctly, and paste the queries into your assignment document.

VENUE (VenueName, Location, Capacity)

EVENT (EventName, ScheduledStart, VenueName)

Based on the table specifications provided, answer the following questions. Each question is worth 3 marks.

a. Give the SQL to create the VENUE table. Choose appropriate data types. None of the attributes should be allowed to be null. Include the primary key constraint.

b. Give the SQL to create the EVENT table. Use appropriate data types, and include the primary key and foreign key constraints. Referential integrity should be set such that a venue may not be deleted from the database if there is an event recorded in it.

c. Give the SQL to add the Maracana Stadium to the VENUE table. The stadium is located in Avenida Maracana and has a capacity of 78,838.

d. Give the SQL to add an attribute Sport to EVENT. (Possible values include Athletics, Swimming.

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: You have been given the following specifications of a
Reference No:- TGS02308355

Now Priced at $20 (50% Discount)

Recommended (93%)

Rated (4.5/5)