1. Create a 'Part_Structure' table as follows (key attributes are underlined): (5 points) Part_Structure Table: MAJOR...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
1. Create a 'Part_Structure' table as follows (key attributes are underlined): (5 points) Part_Structure Table: MAJOR P MINOR P P1 P1 P2 P2 P3 P4 P5 print UPPER_P# ; DO "forever"; P3 P2 P4 P3 CALL RECURSION (GIVENP# ); RECURSION: PROC (UPPER_P# ) RECURSIVE ; DCL UPPER_P# ... ; P5 P5 P6 2. Write a Java program (use JDBC to connect to the database) that implements the following function (written in pseudo code) that prints out the subparts of a part using a depth-first search, and the branch with a smaller part number will be searched first (where there is more than branch): (20 points) DCL LOWER P#... INITIAL (' ')); EXEC SQL DECLARE C CURSOR FOR END DO; END PROC; SELECT MINOR_P# FROM PART_STRUCTURE WHERE MAJOR_P# = :UPPER_P# AND MINOR_P# > LOWER_P# ORDER BY MINOR_P# ; QTY 2 4 1 3 983 EXEC SQL OPEN C ; EXEC SQL FETCH C INTO :LOWER_P# ; EXEC SQL CLOSE C; IF no "lower P#" retrieved THEN RETURN; IF "lower P#" retrieved THEN CALL RECURSION (LOWER_P#) ; END IF; END IF; Given the value of the input parameter 'P1', it should print out the following sequence (in the exact same order) for the table in Q1: P1 P2 P3 P5 P6 P4 P5 P6 P3 P5 P6 1. Create a 'Part_Structure' table as follows (key attributes are underlined): (5 points) Part_Structure Table: MAJOR P MINOR P P1 P1 P2 P2 P3 P4 P5 print UPPER_P# ; DO "forever"; P3 P2 P4 P3 CALL RECURSION (GIVENP# ); RECURSION: PROC (UPPER_P# ) RECURSIVE ; DCL UPPER_P# ... ; P5 P5 P6 2. Write a Java program (use JDBC to connect to the database) that implements the following function (written in pseudo code) that prints out the subparts of a part using a depth-first search, and the branch with a smaller part number will be searched first (where there is more than branch): (20 points) DCL LOWER P#... INITIAL (' ')); EXEC SQL DECLARE C CURSOR FOR END DO; END PROC; SELECT MINOR_P# FROM PART_STRUCTURE WHERE MAJOR_P# = :UPPER_P# AND MINOR_P# > LOWER_P# ORDER BY MINOR_P# ; QTY 2 4 1 3 983 EXEC SQL OPEN C ; EXEC SQL FETCH C INTO :LOWER_P# ; EXEC SQL CLOSE C; IF no "lower P#" retrieved THEN RETURN; IF "lower P#" retrieved THEN CALL RECURSION (LOWER_P#) ; END IF; END IF; Given the value of the input parameter 'P1', it should print out the following sequence (in the exact same order) for the table in Q1: P1 P2 P3 P5 P6 P4 P5 P6 P3 P5 P6
Expert Answer:
Answer rating: 100% (QA)
It seems that youve shared the details of a question which involves creating a SQL table and writing a corresponding Java program that uses JDBC to se... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
In this project you will implement a very simple TTY game. In this game, the user has a catapult that can launch projectiles. In each round of the game, the computer places a wall in front of the...
-
In this project, you will implement a new class called a bag with receipts. This new class is similar to an ordinary bag, but the data consists of strings, and the way that the strings are added and...
-
For your capstone project, you will implement a simple Character Creation Screen as found in many different RPGS (role playing games.) This screen will allow the user to pick and save a character's...
-
Reading material Raymond Frost, Alexa K. Fox & Judy Strauss (2019). Product: The Online Offer. E-Marketing , 9, 206 - 228. Raymond Frost, Alexa K. Fox & Judy Strauss (2019). Price: The Online Value....
-
How fixed cost allocation affects a pricing decision Neumann Manufacturing Company expects to make 30,000 travel sewing kits during 2012. In January, the company made 1,800 kits. Materials and labor...
-
The table below lists the number of cellular telephone subscribers (in millions) and subscriber's average local monthly bills for service (in dollars) for the years 1998 through 2008. What type of...
-
Develop procedures for single-stage and crossflow systems for leaching using a triangular diagram. Hint: Study Section 13.9.
-
Centennial Catering, Inc., is considering two mutually exclusive investments. The company wishes to use a CAPM-type risk adjusted discount rate (RADR) in its analysis. Centennials managers believe...
-
Langford Co. issued 14-year bonds a year ago at a coupon rate of 8.3%. The bonds make semiannual payments. If the YTM on these bonds is 6.6%, what is the current bond price? (Do not round...
-
Windemere Limited is a Canadian-controlled private corporation founded 12 years ago by Mr. White who holds all of the shares which he purchased at that time from the company for $1,000. As of...
-
Conveying Bad News Scenario In groups, compose a bad news email to Emily Coroner. Remember to follow the format for an indirect approach as discussed in class and to write it professionally. Your...
-
Greene Co. reported a loss in 2018 of $595,000 and carried the loss back is allowed. The company reported taxable income of $183,000 in 2016 and $200,000 in 2017. It has no permanent or temporary...
-
Prior to 1961, the atomic mass unit (amu)(amu) wasdefined as 1/16 the mass of the atomic weight of oxygen; that is,the atomic weight of oxygen was defined as exactly 16. The atomicweight of oxygen on...
-
The thermal conductivity of Aluminum at 40 F is 200 Btu/hr)(ft2)(F/ft). Find the equivalent value in terms of Btu/hr) (ft)(K/ft). rSuppose the cylinder of fluid is a column of benzene that has A=2 cm...
-
Skysong Company uses the LCNRV method, on an individual-item basis, in pricing its inventory items. The inventory at December 31, 2025, consists of products D, E, F, G, H, and I. Relevant per unit...
-
The prescribed dose of a medication is 1.2 cg-per-kilogram of body weight. Your patient weighs 174 pounds. Given: 1 kilogram = 2.2 pounds a) What is the patient's weight in kilograms? How many cg of...
-
Use the definitions for TFC, TVC, TC, AFC, AVC, ATC and SMC along with the data provided above to fill in the missing values. Use space below for worksheet. * means infinitely large. Applicable...
-
Marc Company assembles products from a group of interconnecting parts. The company produces some of the parts and buys some from outside vendors. The vendor for Part X has just increased its price by...
-
Kent Pham, CPA, is a 45-year-old single taxpayer living at 169 Trendie Street, La Jolla, CA 92037. His Social Security number is 865-68-9635. In 2012, Kent's W-2 as the controller of a local...
-
Amy is a calendar-year taxpayer reporting on the cash basis. Please indicate how she should treat the following items for 2012: a. She makes a deductible contribution to an IRA on April 15,...
-
Mary paid $2,000 of state income taxes in 2012. The total sales tax she paid during 2012 was $5,500, which included $3,000 for the cost of a new car. How should Mary treat the taxes paid on her 2012...
-
Why can we say that the sale of a manufactured product is recorded at two different amounts?
-
Lyle Manufacturing Company applies manufacturing overhead at the rate of 150% of direct labor cost. During October 2019, Lyle incurred \($82,000\) of direct labor costs and \($120,000\) of...
-
Contrast service departments with production departments. Give three examples of a service department.
Study smarter with the SolutionInn App