Question

In: Computer Science

Which scenario requires the use of a cursor?

Which scenario requires the use of a cursor? 

 Given a list of product code, display the products whose product code is in the list, and the products have been ordered at least twice. The products must also cost at least 50 dollars.

 Given a list of customer id, insert the ids in the list if they are not in the customer table yet. 

 Given a list of student id, module code, and an assignment score and an exam score for the module, display the student id, module code and final score for the module. Assume that assignment score contributes 30% and exam score contributes 70% to the final score. 

 None of the above.

Solutions

Expert Solution

Answer :

option A)

Given a list of product code,disply whose product code is in list and the products have ordered at least twice. The products must also cost at least 50 dollars.

CURSOR are the named context's in PL/SQL

there are two types of CURSOR namely,

1)Implicit CURSOR (We can not alter these as these are maintained by oracle it self when ever we are giving a select statement)

2)explicit CURSOR (we can DECLARE OPEN USE CLOSE a CURSOR for our purpose)


Related Solutions

1. Describe when to use cursor:     implicit cursor      explicit  cursor 2. Please give one example for each...
1. Describe when to use cursor:     implicit cursor      explicit  cursor 2. Please give one example for each of below statement:    TCL -- Transaction Control statement    DML -- Data Manipulation statement    Implicit Cursor Attributes --  PL/SQL statement
Data Scenario: You have just been hired into a management position which requires the application of...
Data Scenario: You have just been hired into a management position which requires the application of your budgeting skills. You find out that budgeting has not been a priority of the company and that they have been experiencing cash shortages. You have contacted various areas on the organization and have accumulated the information below to assist you in preparing a comprehensive budget.                                                                                                                               The following is actual information that relates to the operations of a merchandiser named Sled Company, a wholesaler...
Data Scenario: You have just been hired into a management position which requires the application of...
Data Scenario: You have just been hired into a management position which requires the application of your budgeting skills. You find out that budgeting has not been a priority of the company. You have contacted various areas on the organization and have accumulated the information below to assist you in preparing a comprehensive budget. Manufacturing Inc. produces a part used in the production of engines. Actual Sales and Projected sales in units: March (Actual) 38,000 April 40,000 May 50,000 June...
Please write an anonymous PL/SQL program which uses an implicit cursor to print out the score...
Please write an anonymous PL/SQL program which uses an implicit cursor to print out the score and rank of team 'Mad Scientists' in the competition 'Science Olympiad Regional Baltimore'. Please handle exceptions. Problem 4: [15 points] Please write an anonymous PL/SQL program to print out the names of students and their school names for the team that won the first place (rank=1) in Science Olympiad Maryland State (name of a competition). drop table school cascade constraints; drop table student cascade...
Which of the following liabilities usually requires the use of an estimate when it is first...
Which of the following liabilities usually requires the use of an estimate when it is first recorded? Warranty obligation Mortgage payable Accounts payable Unearned revenue
To use a normal distribution in this scenario, which of the following conditions must be satisfied?
2020 Election ~ Bernie Sanders is a popular presidential candidate among university students for the 2020 presidential election. Leading into Michigan’s presidential primary election in 2020, a journalist, Lauren, took a random sample of 12133 university students and found that 9674 of them support Bernie Sanders. Using this data, Lauren wants to estimate the actual proportion of university students who support Bernie Sanders.We want to use statistical inference to estimate the actual proportion of university students who support Bernie Sanders.To...
What is the difference between independent and conditional probability? Which one requires the use of the...
What is the difference between independent and conditional probability? Which one requires the use of the Addition Rule? Explain.
What is the difference between independent and conditional probability? Which one requires the use of the...
What is the difference between independent and conditional probability? Which one requires the use of the Addition Rule? Explain.
I want to find out which SPSS test I would use in this scenario: In this...
I want to find out which SPSS test I would use in this scenario: In this scenario a social psychologist working for an advertising firm was interested in whether the frequency of exposure to an advertisement would have an effect on the liking of that ad. He suggested that the more often a subject was exposed to an ad would have an effect on how much she / he would enjoy the ad. The study involved exposing a subject to...
Consider a scenario in which a lab need DNA samples for use in genetic testing studies....
Consider a scenario in which a lab need DNA samples for use in genetic testing studies. Researchers are searching for a variant of a gene that provides resistance to specific bacterial diseases. If the company finds this gene, it may be able to produce a drug to sell to people who have these disease. Would you agree to have your DNA be part of the study? Why or why not? Would you want to royalties for your part in finding...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT