Create a new database that holds the same tables and data as Question 2a's solution from...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Create a new database that holds the same tables and data as Question 2a's solution from the Midterm Review Questions (which I put below this class activity's details for your convenience). Put the query you use for each task in a word document and submit it. Create Tables (create the same tables from Question 2a's solution). Don't forget to correctly set up the foreign key columns (see slide 12 from today's lecture). Insert the records of data into each table (use the same data from Question 2a's solution). Select all time slots where 'movie_id' is 7 (in the time slots and room table). Update the record of data from the rooms table where 'room_id' is 4 by changing the 'room_number' value to '1C' Delete a record of data from the movie tickets table where 'customer_id' equals 8. Drop the movie tickets table from your database. Question 2a From Midterm Review Questions Imagine you are designing a database for a movie theater. The database should have a table designed to hold all customers who enter the theater, a table holding all movie tickets bought by customers, a table containing the movies that are shown at the movie theater, and a table containing the time slots that a movie can be played during as well as the room the movie would be played in during that time slot (the movie theater has multiple movie rooms). You may also want to create a table for the theater rooms (to reduce redundancy). *Enter 3-4 test records of data for each table. Design the database tables for the scenario described above. Think of some possible attributes for each table. Write "PK" above each column that is a Primary Key and "FK" above each column that is a Foreign Key. Question 2a's Solution PK movie TicketID 1 2 3 PK customers customer.ID name 1 8 movie Tickets FK customerID 8 8 Max Daniels Meghan Ivan Stephan Lot FK timeslotID 3 7 5 PK movies movielD movieName 5 7 10 Cars Baby Driver Fist Fight PK timeSlotID 3 5 PK rooms roomiD roomNumber 2 7 timeSlotsAndRoom timeSlot 1:00 PM - 3:00 PM 3:00 PM - 5:00 PM 2:00 PM - 4:00 PM 2A 4A 3B FK room ID 2 7 FK movielD 7 7 10 Create a new database that holds the same tables and data as Question 2a's solution from the Midterm Review Questions (which I put below this class activity's details for your convenience). Put the query you use for each task in a word document and submit it. Create Tables (create the same tables from Question 2a's solution). Don't forget to correctly set up the foreign key columns (see slide 12 from today's lecture). Insert the records of data into each table (use the same data from Question 2a's solution). Select all time slots where 'movie_id' is 7 (in the time slots and room table). Update the record of data from the rooms table where 'room_id' is 4 by changing the 'room_number' value to '1C' Delete a record of data from the movie tickets table where 'customer_id' equals 8. Drop the movie tickets table from your database. Question 2a From Midterm Review Questions Imagine you are designing a database for a movie theater. The database should have a table designed to hold all customers who enter the theater, a table holding all movie tickets bought by customers, a table containing the movies that are shown at the movie theater, and a table containing the time slots that a movie can be played during as well as the room the movie would be played in during that time slot (the movie theater has multiple movie rooms). You may also want to create a table for the theater rooms (to reduce redundancy). *Enter 3-4 test records of data for each table. Design the database tables for the scenario described above. Think of some possible attributes for each table. Write "PK" above each column that is a Primary Key and "FK" above each column that is a Foreign Key. Question 2a's Solution PK movie TicketID 1 2 3 PK customers customer.ID name 1 8 movie Tickets FK customerID 8 8 Max Daniels Meghan Ivan Stephan Lot FK timeslotID 3 7 5 PK movies movielD movieName 5 7 10 Cars Baby Driver Fist Fight PK timeSlotID 3 5 PK rooms roomiD roomNumber 2 7 timeSlotsAndRoom timeSlot 1:00 PM - 3:00 PM 3:00 PM - 5:00 PM 2:00 PM - 4:00 PM 2A 4A 3B FK room ID 2 7 FK movielD 7 7 10
Expert Answer:
Answer rating: 100% (QA)
Based on the task outlined in the first image below are the SQL queries you would use to perform the specified actions using the tables from Question ... View the full answer
Related Book For
Modern Systems Analysis And Design
ISBN: 9780134204925
8th Edition
Authors: Joseph Valacich, Joey George
Posted Date:
Students also viewed these databases questions
-
How is the flow of direct materials recorded in the accounting system?
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
List three specific parts of the Case Guide, Objectives and Strategy Section (See below) that you had the most difficulty understanding. Describe your current understanding of these parts. Provide...
-
Consider the examples of groupthink explained in this chapter and discuss how they can relate to situations you have experienced on your projects.
-
Give an acceptable IUPAC name for each of the following Alkanes: (a) CH2 CH3 CH3CH2CHCHCHCH2CHCH3 CH3 CH3 CH3 (b) (CH3CH2)2CHCH2CH (CH3)2 (c) CH3 CH3CH2CHCH2CHCH2CHCH (CH3)2 CH2CH3 CH2CH (CH3)2
-
Using the data from P10-3, analyze and interpret the differences between the estimated and actual costs. Data from P10-3 Hallmark Furniture Company refinishes and reupholsters furniture. Hallmark...
-
Determine the drag on a small circular disk of \(0.01-\mathrm{ft}\) diameter moving \(0.01 \mathrm{ft} / \mathrm{s}\) through oil with a specific gravity of 0.87 and a viscosity 10,000 times that of...
-
On July 1, 2018, the beginning of its fiscal year, the trial balance of the general fund of the city of Wentworth was as follows: The following events occurred: a. The budget shows estimated general...
-
Keller Company makes two models of battery-operated boats, the Sandy Beach and the Rocky River. Basic production information follows: Sandy Beach Direct materials cost per unit Direct labor cost per...
-
In the lecture, Professor Murayama talked about how we can use cosmic ray muons to map otherwise invisible things. A particularly novel example he discussed was Luis Alvarez looking for a hidden...
-
Match the following: 1. instructions a. Heap section 2. Global and Static data b. Stack section 3. Function call invocations c. Data section 4. Dynamic Allocation d. Text section A. 1-d , 2-c, 3-b,...
-
Visit and review the American Arbitration Association??s official website at www.adr.orgLinks to an external site.. This assignment is to be posted in the Discussion Forum at the Link above. CREATE A...
-
1. Show that the hard-SVM rule, namely, argmax min w, x) + b| s.t. Vi, yi((w, x) + b) > 0, (w,b):||w| 1 i[m] is equivalent to the following formulation: argmax min yi((w, xi) + b). (w,b):||w|| 1 i[m]...
-
For this project, you will play the role of a financial analyst. You have been assigned to do an in-depth analysis of the business and its industry from the perspective of an independent research...
-
Example 6: Determine the resultant of the force system shown. Hint: use components method 6kips 15 7 8 10kips 6.8kips
-
3. T (n) is defined recursively as 1 T(n) = { 2. [ 2 =1 if n = 1, otherwise. T(i) What is the order of T(n)? In other words, find an expression f(n) such that T(n) = 0(f(n)). You now implement the...
-
27)A ladder 25 cm long is leaning against a vertical wall. The floor is slightly slippery and the foot of the ladder slips away from the wall at the rate of 0.2cm/sec. How fast is the top of the...
-
An example of prescriptive analytics is when an action is recommended based on previously observed actions. For example, an analysis might help determine procedures to follow when new accounts are...
-
Imagine an information system built without using a systems analysis and design methodology and without any thinking about the SDLC. Use your imagination and describe any and all problems that might...
-
What are three generic competitive strategies?
-
Describe the activities performed by the project manager during project closedown.
-
When you were playing the employees role, how did the managers suggestions make you feel?
-
Which of the three quarters exhibited the most consistent increase in value for this security?
-
What was the mean price of the security on the first of January 2004?
Study smarter with the SolutionInn App