Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. We will create a concerts database: create the following tables that will store information about 11. Write the SQL statement to update the performance

image text in transcribed

1. We will create a concerts database: create the following tables that will store information about 11. Write the SQL statement to update the performance type name for 'dancer performance types (ex. song, dance, etc.), about performers, arenas (for performances) and concerts. Save your work as Yourname lab2_1.sql Here is the schema for these tables, with primary key underlined and foreign keys in RED italic in PerformanceTypes to be 'dance performer 12. Execute the statement above. Does the query succeed? 13. Write the SQL statements to insert 3 rows with ids 1, 2, and respectively 3 into the Arenas table 14. Write the SoL statements to insert 4 rows in the Concerts table, two of them for arena 1, and two for arena 2 15. Write the SQL statement to update all arenas with at least 2 concerts to have the seat capacity Performers PertormeriD, FirstName, LastName, Address, PerformanceTypeNome)- Each performer has a performediD (integer), a name, address and type of performance Center), a city where the arena is located, and seating capacity of the arena arena, at a given date 1. Write and execute the soL statements to create the 4 tables given above. Choose appropriate 50000. The query should work for any possible data in the database. -Arenas Arenaip, ArenaName, city, Capacity) -Each arena has an id (integer), a name (Ex.Allstate 16. Create a new Dancers' table with the same structure as the Performers table 17 Insert all performers of type 'dancer trom the Performers table into the Dancers table ate)- each concert is given by one performer, on a given 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. Insert one row in the Performers table with PerformeriD 1, name John Dow, address Annapolis, MD, and performance type 'singer 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 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 4. 5. 6. 7. Change the DateOfBirth of the performer with id 1 to be '1990-03-02 8. Remove the performer Matt Smith' from the Performers table. 9. Write the SQL statement to remove performance type 'singer from the PerformanceTypes table. 10. Execute the statement above, then list all rows from the PerformanceTypes table. was 'singer removed? Explain why the row was removed from the PerformanceTypes table, or why it was not removed 1. We will create a concerts database: create the following tables that will store information about 11. Write the SQL statement to update the performance type name for 'dancer performance types (ex. song, dance, etc.), about performers, arenas (for performances) and concerts. Save your work as Yourname lab2_1.sql Here is the schema for these tables, with primary key underlined and foreign keys in RED italic in PerformanceTypes to be 'dance performer 12. Execute the statement above. Does the query succeed? 13. Write the SQL statements to insert 3 rows with ids 1, 2, and respectively 3 into the Arenas table 14. Write the SoL statements to insert 4 rows in the Concerts table, two of them for arena 1, and two for arena 2 15. Write the SQL statement to update all arenas with at least 2 concerts to have the seat capacity Performers PertormeriD, FirstName, LastName, Address, PerformanceTypeNome)- Each performer has a performediD (integer), a name, address and type of performance Center), a city where the arena is located, and seating capacity of the arena arena, at a given date 1. Write and execute the soL statements to create the 4 tables given above. Choose appropriate 50000. The query should work for any possible data in the database. -Arenas Arenaip, ArenaName, city, Capacity) -Each arena has an id (integer), a name (Ex.Allstate 16. Create a new Dancers' table with the same structure as the Performers table 17 Insert all performers of type 'dancer trom the Performers table into the Dancers table ate)- each concert is given by one performer, on a given 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. Insert one row in the Performers table with PerformeriD 1, name John Dow, address Annapolis, MD, and performance type 'singer 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 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 4. 5. 6. 7. Change the DateOfBirth of the performer with id 1 to be '1990-03-02 8. Remove the performer Matt Smith' from the Performers table. 9. Write the SQL statement to remove performance type 'singer from the PerformanceTypes table. 10. Execute the statement above, then list all rows from the PerformanceTypes table. was 'singer removed? Explain why the row was removed from the PerformanceTypes table, or why it was not removed

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

Pro Database Migration To Azure Data Modernization For The Enterprise

Authors: Kevin Kline, Denis McDowell, Dustin Dorsey, Matt Gordon

1st Edition

1484282299, 978-1484282298

More Books

Students also viewed these Databases questions