CREATE TABLE employee AS SELECT * FROM emp; CREATE TABLE department AS SELECT * FROM dept;...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
CREATE TABLE employee AS SELECT * FROM emp; CREATE TABLE department AS SELECT * FROM dept; 1. Add a table level PRIMARY KEY constraint to the EMPLOYEE table using the empno column. 2. Create a PRIMARY KEY constraint on the DEPARTMENT table using the dept no column. 3. Add a foreign key reference on the EMPLOYEE table that will ensure that the employee is not assigned to a nonexistent department. 4. Confirm that the constraints were added by querying USER_CONSTRAINTS. Note the types and names of the constraints. The output should be similar to the following: CONSTRAINT NAME DEPARTMENT ID PK EMPLOYEE ID PK EMPLOYEE DEPT ID FK DEPARTMENT 5. Display the object names and types from the USER_OBJECTS data dictionary view EMPLOYEE and DEPARTMENT tables. You may want to format the columns for readability. Notice that the new tables and a new index were created. OBJECT NAME OBJECT TYPE DEPARTMENT_ID_PK TABLE INDEX TABLE C EMPLOYEE EMPLOYEE_ID_PR INDEX P P R 6. Modify the EMPLOYEE table. Add a SALARY column of NUMBER data type, precision 7. CREATE TABLE employee AS SELECT * FROM emp; CREATE TABLE department AS SELECT * FROM dept; 1. Add a table level PRIMARY KEY constraint to the EMPLOYEE table using the empno column. 2. Create a PRIMARY KEY constraint on the DEPARTMENT table using the dept no column. 3. Add a foreign key reference on the EMPLOYEE table that will ensure that the employee is not assigned to a nonexistent department. 4. Confirm that the constraints were added by querying USER_CONSTRAINTS. Note the types and names of the constraints. The output should be similar to the following: CONSTRAINT NAME DEPARTMENT ID PK EMPLOYEE ID PK EMPLOYEE DEPT ID FK DEPARTMENT 5. Display the object names and types from the USER_OBJECTS data dictionary view EMPLOYEE and DEPARTMENT tables. You may want to format the columns for readability. Notice that the new tables and a new index were created. OBJECT NAME OBJECT TYPE DEPARTMENT_ID_PK TABLE INDEX TABLE C EMPLOYEE EMPLOYEE_ID_PR INDEX P P R 6. Modify the EMPLOYEE table. Add a SALARY column of NUMBER data type, precision 7.
Expert Answer:
Answer rating: 100% (QA)
here are the SQL statements to accomplish the tasks youve described Add a table level PRIMARY KEY co... View the full answer
Related Book For
Basic Technical Mathematics
ISBN: 9780137529896
12th Edition
Authors: Allyn J. Washington, Richard Evans
Posted Date:
Students also viewed these databases questions
-
For your survey project, develop an introductory statement (ethics statement) that you would include on a letter of introduction or as part of a survey questionnaire. There should be a minimum of...
-
Write project about the capital structure of Amazon or any publicly traded company and the M&M theory of capital structure. project should consist of The I-Abstract II - Table of Contents III -...
-
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...
-
The specifications for the water supply system of the Sears Tower in Chicago require that 100 gpm of water be pumped to a reservoir at the top of the tower, which is 340 m above street level. The...
-
If the resultant moment about point A is M clockwise, determine the magnitude of F3. Units Used: kN = 103 N Given: M = 4.8 kN⋅ m a = 2 m F1 = 300 N b = 3 m F2 = 400 N c = 4 m θ1 = 60 deg d...
-
5x + 6y = 11 Step 1 of 2: Determine the missing coordinate in the ordered pair (-5, ?) so that it will satisfy the given equation.
-
Infections Can Lower IQ A headline in June 2015 proclaims "Infections can lower IQ." The headline is based on a study in which scientists gave an IQ test to Danish men at age 19. They also analyzed...
-
Bernadette, a longtime client of yours, is an architect and the president of the local Rotary chapter. To keep up to date with the latest developments in her profession, she attends continuing...
-
Greenwood Company manufactures two products-13,000 units of Product Y and 5,000 units of Product Z. The company uses a plantwide overhead rate based on direct labor-hours. It is considering...
-
Describe how to apply stratified sampling to sample from the Credit Risk Data file based on the different types of loans. Implement your process in Excel to choose a random sample consisting of 10%...
-
For the hydrogen atom in the 5d (I = 2) excited state, select each of the following which is a set of possible quantum numbers (, m.j, s, m, m) followed by the correct term notation for each set. O...
-
How much force must the tendon exert to keep the leg in this BIO position? A. \(40 \mathrm{~N}\) B. \(200 \mathrm{~N}\) C. \(400 \mathrm{~N}\) D. \(1000 \mathrm{~N}\) Use the information in the...
-
A good quarterback can throw a football at \(27 \mathrm{~m} / \mathrm{s}\) (about \(60 \mathrm{mph}\) ). If we assume that the ball is caught at the same height from which it is thrown, and if we...
-
You can use a simple technique to find the center of gravity of an irregular shape. Figure Q7. 10 shows a cardboard cutout of the outline of the continental United States. The map is suspended from...
-
A construction crew would like to support a \(1000 \mathrm{~kg}\) steel beam with two angled ropes as shown in Figure P5.4. Their rope can support a maximum tension of \(5600 \mathrm{~N}\). Is this...
-
A \(2.0-\mathrm{m}-\) long slab of concrete is supported by rollers, as shown in Figure P7.54. If the slab is pushed to the right, it will move off the supporting rollers, one by one, on the left...
-
Beth has $200 of income to spend on e-books (E), priced at $10per book, and Zumba (Z) classes, priced at $8 per class. Which ofthe following consumption bundles is infeasible? E = 10 and Z =13 E = 2...
-
PC Contractors, Inc., was an excavating business in Kansas City, Missouri. Union Bank made loans to PC, subject to a perfected security interest in its equipment and other assets, including...
-
Solve for x: (x + 2j) 2 = 5 + 12j
-
In Example 2, change the + sign before y 2 to . Data from Example 2 Plot the graph of the equation x 2 + y 2 = 25. We first solve this equation for y, and we obtain which we write as We now assume...
-
The diameter of the sun is 1.38 10 6 km, the diameter of the Earth is 1.27 10 4 km, and the distance from the Earth to the sun (center to center) is 1.50 10 8 km. What is the distance from the center...
-
Consider the following time series data. a. Construct a time series plot. What type of pattern exists in the data? b. Show the four-quarter and centered moving average values for this time series. c....
-
Refer to exercise 35. a. Deseasonalize the time series using the adjusted seasonal indexes computed in part (c) of exercise 35. b. Using Minitab or Excel, compute the linear trend regression equation...
-
The following table reports prices and usage quantities for two items in 2009 and 2011. a. Compute price relatives for each item in 2011 using 2009 as the base period. b. Compute an unweighted...
Study smarter with the SolutionInn App