Ask Question, Ask an Expert

+1-415-315-9853

info@mywordsolution.com

Ask DBMS Expert


Home >> DBMS

1. prepare a pl/sql block which declares and uses cursors with the parameters.

In a loop, use a cursor to retrieve the department number and department name from the departments table for a department whose department_id is less than 100. Pass the department number to the another cursor as a parameter to retrieve from the  employees table the information of employee last name, job, hire date, and salary of those employees whose employee_id is less than 120 and who work in that department.

a) In the declarative section, declare a cursor dept_cursor to retrieve department_id and department_name for those departments with the department_id less than 100.  Order by department_id.

b) Declare another cursor emp_cursor that takes the deparment number as parameter and retrieves last_name, job_id, hire_date, and salary of those employees whose employee_id is less than 120 and who work in that department.

c) Declare variables to contain the values retrieved from each cursor. Use the % type attribute while declaring variables.

d) Open the dept_cursor, use a simple loop, and fetch values in variables declared. Display the department number and department name.

e) For each department, open emp_cursor by passing the current department number as a parameter. Begin another loop and fetch the values of emp_cursor in variables and print all the details retrieved from employees table.

Note: You might desire to print a line after you have displayed the details of each department. Use proper attributes for the exit condition. As well, determine whether a cursor is already open before opening the cursor.

f) Close all the loops and cursors, and then end the executable section. Execute the script.

DBMS, Programming

  • Category:- DBMS
  • Reference No.:- M91082

Have any Question? 


Related Questions in DBMS

Listed the five important software components of a dbms the

Listed the five important software components of a DBMS: the DBMS engine, the data definition, data manipulation, application generation, and data administration subsystems. Which of those are most and least important to ...

Discussion questionsdatabase programs are used to store and

Discussion Questions Database programs are used to store and to retain data for a variety of applications, and are often used in conjunction with Web content to deliver dynamic Web pages. Please respond to all of the fol ...

Advanced relational database final programming project in

Advanced Relational Database Final Programming Project In this project, you will design a secure database with several tables using good relational database design techniques. Project Objectives: After completing this Pr ...

Database designfrom textbook fundamentals of database

Database Design From Textbook: Fundamentals of Database Management Systems 2nd Edition. 1. Convert the Video Centers of Europe, Ltd., entity-relationship diagram in Exercise 2.2 into a well structured relational database ...

Learning outcomes1 manage user access and user profiles

Learning Outcomes 1. Manage user access and user profiles within a complex DBMS 2. Conduct database audits 3. Develop backup and recovery procedures Read the given scenario and perform all tasks. You have to answer all q ...

Oracle erp systemsoracle provides erp solutions for

Oracle ERP Systems Oracle provides ERP solutions for mid-size business organizations. For this assignment, you are to write a research report on these ERP solutions. Your report should include: • a description of Oracle ...

Assignment business rules for sam symthes

Assignment: Business Rules for Sam Symthe's Database Overview Sam Smyth is an expert puppy trainer. His specialty is training troubled puppies to behave for their owners. The name of his business is Sam Smythe's Kennel f ...

1 draw and explain erm diagram andnbsp explain what is

1. Draw and explain ERM diagram and  explain what is REM 2. Explain what is Normalization . what is 0NF,1NF, 2NFand ,3NF and explain what is in the tables Entity Relationship Modeling and Normalization: 1 System Analysis ...

This assignment consists of two 2 sections a design

This assignment consists of two (2) sections: a design document and a revised Gantt chart or project plan. You must submit both sections as separate files for the completion of this assignment. Label each file name accor ...

Discussionatleast 1 paragraph for each partpart 1 remote

Discussion Atleast 1 paragraph for each part Part 1: "Remote Access" Please respond to the following: • Remote access to corporate resources is becoming commonplace. From an auditing perspective, suggest two or more cont ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Section onea in an atwood machine suppose two objects of

SECTION ONE (a) In an Atwood Machine, suppose two objects of unequal mass are hung vertically over a frictionless

Part 1you work in hr for a company that operates a factory

Part 1: You work in HR for a company that operates a factory manufacturing fiberglass. There are several hundred empl

Details on advanced accounting paperthis paper is intended

DETAILS ON ADVANCED ACCOUNTING PAPER This paper is intended for students to apply the theoretical knowledge around ac

Create a provider database and related reports and queries

Create a provider database and related reports and queries to capture contact information for potential PC component pro

Describe what you learned about the impact of economic

Describe what you learned about the impact of economic, social, and demographic trends affecting the US labor environmen