Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

We will create a concerts database: create the following tables that will store information about performance types (ex. song, dance, etc.), about performers, arenas (for

We will create a concerts database: create the following tables that will store information about performance types (ex. song, dance, etc.), about performers, arenas (for performances) and concerts.

Here is the schema for these tables, with primary key underlined and foreign keys in RED italic

-PerformanceTypes(PerformanceTypeName) types of performance

-Performers(PerformerID, FirstName, LastName, Address, PerformanceTypeName) Each performer has a performedID (integer), a name, address and type of performance

-Arenas(ArenaID, ArenaName, City, Capacity) -- Each arena has an id (integer), a name (Ex. Allstate Center), a city where the arena is located, and seating capacity of the arena

-Concerts(PerformerID, ArenaID, ConcertDate) each concert is given by one performer, on a given arena, at a given date .

1)Write and execute the SQL statements to create the 4 tables given above. Choose appropriate data types for each column, and declare primary key and foreign key constraints as appropriate.

2)Insert rows in the PerformanceTypes table, for type singer, dancer and comedian.

3)Write the SQL statement to modify your Performers table to add a new column called DateOfBirth. Choose the appropriate data type for this column. The values in the column could be null.

4)Insert one row in the Performers table with PerformerID 1, name John Dow, address Annapolis, MD, and performance type singer.

5)Try now to insert a performer row with a PerformanceTypeName that does not exist in PerformanceTypes table (ex. painter). What happens? Show your work with errors.

6)Insert 3 more rows in the Performers table, with names Matt Smith, Jane Brown, and respectively Jennifer Shade, and addresses Baltimore, MD, New York, NY, and respectively Seattle, WA. All these 3 performers should be of type dancer.

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 Concepts

Authors: David M Kroenke, David J Auer

6th Edition

0132742926, 978-0132742924

More Books

Students also viewed these Databases questions

Question

10. How does intangibility of services affect quantity decisions?

Answered: 1 week ago