Q2) UPDATE (40 points) First, create a table course_sections_copy then insert all the data from the...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Q2) UPDATE (40 points) First, create a table course_sections_copy then insert all the data from the original table. When creating the tables, preserve column attributes and indexes (this can be done with the LIKE keyword). To allow for repeated clean executions of your script, precede the statements with DROP TABLE statements. To ensure that the script will run cleanly even when the tables have not yet been created, use DROP TABLE IF EXISTS. Write update statements to change Fall 2021 records to create information for the Fall 2023 courses and sections offered in Fall 2021 are being offered again in Fall 2023. However, all the online courses and sections have been changed to blended delivery. All the face-to-face delivery courses will place in the same locations as they did in Fall 2021 but the blended courses will take place in Hornbake, Room 103. Then, write a SELECT query that returns details of the courses and sectio sort as shown in the picture below. HINT: You may need to turn off the SQL_SAFE_UPDATES system variable as we did in class. Course ID Section No. Term 0201 0301 0101 0102 1 1 2 2 2 2 3 4 5 7 7 7 7 7 7 0103 01xx 0102 0101 0101 0101 0102 IM01 0101 0101 0102 0101 0101 0101 Fall 2023 Fall 2023 Fall 2023 Fall 2023 Fall 2023 Fall 2023 Fall 2023 75 80 81 82 99 rows should be returned. Fall 2023 Fall 2023 Fall 2023 Fall 2023 Fall 2023 Fall 2023 Fall 2023 Fall 2023 Fall 2023 Fall 2023 Fall 2023 Fall 2023 Location F Computer Science Instructional Center Room #1121 John S Toll Physics Building Room #4221 John S Toll Physics Building Room #1204 Engineering Classroom Building (Martin) Room #3106 Edward St John Learning Center Room #2204 Plant Sciences Room #1130 sters from w Edward St John Learning Center Room #1224 Edward St John Learning Center Room # 215 Plant Sciences Room #1140 Skinner Building Room #200 Hornbake Room # 0302H Hornbake Room #105 Atlantic Building Room # 2330 Microbiology Building Room #1207 Plant Sciences Room #1117 John S Toll Physics Building Room #1204 Jimenez Building Room #205 Tawes Fine Arts Building Room #320 nec Do not post on he Hornbake Room #105 Atlantic Building Room #1106 Plant Sciences Room #1146 violation & co st. for the Fall 2023 term and Fall 2023 Fall 2023 Fall 2023 Fall 2023 Atlantic Building Room #1106 Fall 2023 Computer Science Instructional Center Room #1121 JM Patterson Building Room # 1109 Fall 2023 Fall 2023 Edward St John Learning Center Room #1215 licy. Q2) UPDATE (40 points) First, create a table course_sections_copy then insert all the data from the original table. When creating the tables, preserve column attributes and indexes (this can be done with the LIKE keyword). To allow for repeated clean executions of your script, precede the statements with DROP TABLE statements. To ensure that the script will run cleanly even when the tables have not yet been created, use DROP TABLE IF EXISTS. Write update statements to change Fall 2021 records to create information for the Fall 2023 courses and sections offered in Fall 2021 are being offered again in Fall 2023. However, all the online courses and sections have been changed to blended delivery. All the face-to-face delivery courses will place in the same locations as they did in Fall 2021 but the blended courses will take place in Hornbake, Room 103. Then, write a SELECT query that returns details of the courses and sectio sort as shown in the picture below. HINT: You may need to turn off the SQL_SAFE_UPDATES system variable as we did in class. Course ID Section No. Term 0201 0301 0101 0102 1 1 2 2 2 2 3 4 5 7 7 7 7 7 7 0103 01xx 0102 0101 0101 0101 0102 IM01 0101 0101 0102 0101 0101 0101 Fall 2023 Fall 2023 Fall 2023 Fall 2023 Fall 2023 Fall 2023 Fall 2023 75 80 81 82 99 rows should be returned. Fall 2023 Fall 2023 Fall 2023 Fall 2023 Fall 2023 Fall 2023 Fall 2023 Fall 2023 Fall 2023 Fall 2023 Fall 2023 Fall 2023 Location F Computer Science Instructional Center Room #1121 John S Toll Physics Building Room #4221 John S Toll Physics Building Room #1204 Engineering Classroom Building (Martin) Room #3106 Edward St John Learning Center Room #2204 Plant Sciences Room #1130 sters from w Edward St John Learning Center Room #1224 Edward St John Learning Center Room # 215 Plant Sciences Room #1140 Skinner Building Room #200 Hornbake Room # 0302H Hornbake Room #105 Atlantic Building Room # 2330 Microbiology Building Room #1207 Plant Sciences Room #1117 John S Toll Physics Building Room #1204 Jimenez Building Room #205 Tawes Fine Arts Building Room #320 nec Do not post on he Hornbake Room #105 Atlantic Building Room #1106 Plant Sciences Room #1146 violation & co st. for the Fall 2023 term and Fall 2023 Fall 2023 Fall 2023 Fall 2023 Atlantic Building Room #1106 Fall 2023 Computer Science Instructional Center Room #1121 JM Patterson Building Room # 1109 Fall 2023 Fall 2023 Edward St John Learning Center Room #1215 licy.
Expert Answer:
Answer rating: 100% (QA)
The question presents a task that involves creating a copy of an existing table named coursesections updating records from Fall 2021 to create new rec... View the full answer
Related Book For
Concepts of Database Management
ISBN: 978-1285427102
8th edition
Authors: Philip J. Pratt, Mary Z. Last
Posted Date:
Students also viewed these programming questions
-
Project Scope management involves defining and controlling what work is or is not included in a project. Despite this Scope Creep occurs. What measures as a project manager would you adopt to either...
-
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...
-
To demonstrate the ability to propose, implement, and query the database. Problem: MovinOn Inc. is a moving company that provides moving and storage services in California, Nevada, and Arizona....
-
A company with a seasonal demand for its products may have an opportunity to obtain an off-season order. The relevant factors for such a short-run decision include the a. additional revenues and...
-
When a uranium nucleus at rest breaks apart in the process known as fission in a nuclear reactor, the resulting fragment have a total kinetic energy of about 200 MeV. How much mass lost in the...
-
Is the U.S. economy too dependent on Fiscal and Monetary Policy? Are government-mandated minimum wages, government spending and artificially low interest rates necessary for the economy to be...
-
Discuss why, in a relational database, first normal form is necessary. Is it sufficient to reduce redundancy? Why?
-
Recall exercise 3 from Chapter 4 in which a country imposes an import fee on the crude oil it imports. Imagine that all the crude oil imports to the country are made by ships owned by its nationals....
-
During 2021, Albert redeems Series EE savings bonds for $6,000 - - consisting of $2,000 interest and $4,000 principal. Albert has net qualifying education expenses of $5,000 in 2021. Albert, a single...
-
For Simonsen Village, prepare a government-wide statement of net position and statement of activities, and a governmental funds balance sheet and statement of revenues, expenditures, and changes in...
-
Marcia Blakely, plant manager at the Newmarket International Manufacturing Company (NIMCO), was preparing for a meeting with her management team. Joining her would be Jack Novak, the company...
-
Orangutans can move by brachiation, swinging like a pendulum beneath successive handholds. If an orangutan has arms that are \(0.90 \mathrm{~m}\) long and repeatedly swings to a \(20^{\circ}\) angle,...
-
A block oscillating on a spring has period \(T=2.0 \mathrm{~s}\). a. What is the period if the block's mass is doubled? b. What is the period if the value of the spring constant is quadrupled? c....
-
Suppose for an i.i.d. sample of size \(n\), the disease status, \(d_{i}\), is MCAR with the probability of each \(d_{i}\) being observed given by \(\pi=0.75\). (a) Show that \(\frac{1}{n} \sum_{d_{i}...
-
To determine an athlete's body fat, she is weighed first in air and then again while she's completely underwater, as discussed on page
-
True or False: Annual worth analysis is the most popular DCF measure of economic worth.
-
3. A coaxial cable consists of a copper wire, radius a, surrounded by a concentric copper tube of inner radius b and thickness c-b. The area between these two conductors is filled with a dielectric...
-
Assume a simple Keynesian depression economy with a multiplier of 4 and an initial equilibrium income of $3,000. Saving and investment equal $400, and assume full employment income is $4,000. a. What...
-
What does it mean when a data warehouse is nonvolatile?
-
How do you indicate criteria in an Access query?
-
When do you use a make-table query?
-
A rifle is aimed horizontally at a target \(100 \mathrm{~m}\) away, and the bullet leaves the rifle barrel at \(650 \mathrm{~m} / \mathrm{s}\). If the gun is aimed right at the bull's-eye, by how...
-
On a rifle that has a telescopic sight, the telescope is usually not parallel to the barrel of the rifle. The angle the telescope makes with the barrel has to be adjusted for the distance to the...
-
A package is dropped from a helicopter traveling at \(15 \mathrm{~m} / \mathrm{s}\) (horizontally) at an altitude of \(200 \mathrm{~m}\), but the parachute attached to the package fails to open. (a)...
Study smarter with the SolutionInn App