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...
-
Most people find it easy to think of negative outcomes that occur because of high prices. Can you think of situations where high prices can lead to positive outcomes? Explain.
-
Given that the country is actively seeking foreign investors and appears to be creating a pro-business atmosphere, what non-oil businesses do you think would be best suited for expanding into the UAE?
-
Deer in the suburbs. Westchester County is a suburban area covering 438 square miles immediately north of New York City. A garden magazine claimed that the county is home to 800,000 deer. Do a...
-
Total tuition is $3050 for full-time students taking 12 credits or more and $125 per credit hour for part-time students (taking less than 12 credits). Use a function to determine the correct tuition...
-
Entries for bond (held-to-maturity) investments Gillooly Co. purchased $93,000 of 7%, 12-year Lumpkin County bonds on May 11, Year 1, directly from the county, at their face amount plus accrued...
-
The bar codes above represent locations in a warehouse. How many units would be left in each location? If you picked 250 units from location 00000113774360000 If you picked 250 units from location 00...
-
Transcribed image text: Near the end of 2019, the management of Dimsdale Sports Co., a merchandising company, prepared the following estimated balance sheet for December 31, 2019 DIRI DE SPORTS...
-
Saskatchewan Soy Products (SSP) buys soy beans and processes them into other soy products. Each tonne of soy beans that SSP purchases for $300 can be converted for an additional $200 into 500 lbs of...
-
Pharoah Acres sponsors a defined-benefit pension plan. The corporation's actuary provides the following information about the plan: January 1, 2025 December 31, 2025 Vested benefit obligation $510...
-
Company panther is compelled to pick between two machines An and B. The two machines are planned in an unexpected way, yet have indistinguishable limit and do the very same work. Machine A costs...
-
On April 30, 2023, a company issued $600,000 worth of 5% bonds at par. The term of the bonds is 9 years, with interest payable semi- annually on October 31 and April 30. The year-end of the company...
-
Identify the following; MethodBodyReturn statementReturn typeParameter Look at this example we saw in our Methods lesson: public double findTheArea (double length, double w idth) { double area =...
-
Favorites AMALGAMATED - Google Search Inbox7 Graded homework #5 6 Saved Help Save & Exit Su The following amounts appeared on the Mendelstein Company's adjusted trial balance as of October 31, 2020,...
-
Refer to the data in QS 10-1. Based on financial considerations alone, should Helix accept this order at the special price? Explain.
-
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...
-
52. A city receives a copy of its original charter from the year 1799 as a gift from a citizen. The docu ment will be put under glass and displayed in the city hall for all to see. The fair value is...
-
50. A city has a solid waste landfill that was filled 12 percent in Year 1 and 26 percent in Year 2. Dur ing those periods, the government expected that total closure costs would be $2 million. As a...
-
48. The City of Wolfe bought a $20,000 machine with a five-year life and no salvage value for its school system. It was capitalized but no other entries were ever made. The machine was monitored...
Study smarter with the SolutionInn App