How JustAnswer Works:
  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.
Ask Ingo U Your Own Question
Ingo U
Ingo U, Software Engineer
Category: Homework
Satisfied Customers: 755
Experience:  Over 25 years experience in software development. Expert in Microsoft .Net, C#, C++, VB, SQL
Type Your Homework Question Here...
Ingo U is online now
A new question is answered every 9 seconds

Suppose you have created tables in assignment 1 listed

Customer Question

Suppose you have created tables in assignment 1 listed below. Please write an anonymous PL/SQL program for each the following problems. Tables: Company(cid, cname, city, state) /* city is the company’s location, cname is ***** ***** */ Employee(eid, ename,
street, city, state, salary, cid) /* city is where the employee lives*/ Manages(eid, mid) /* mid is manager’s ID*/ Problem 1: Write an anonymous PL/SQL program to compute the sum of 1, 3, 5, 7, 9. You must use a loop. Tip: consider how to update your loop
variable. [30 points] Problem 2: Use an implicit cursor to print out the MID of manager of Bob. Please handle exceptions. If you do not have Bob as ename in your employee table, use any name you have (e.g., Jeff). [35 points] Problem 3: Use an explicit cursor
to print out the ename, street, and city of all employees working for Verizon (you can also use any company name you have in your company table if you do not have Verizon as company_name). [35 points]
Submitted: 1 year ago.
Category: Homework
Expert:  Mr. Gregory White replied 1 year ago.

Hello, my name is Greg.

Is there any other information you can send to see if I can assist on it this for you? If you have any documents you can upload, you can do so to or and share the link here with us.

If I had a model and could provide that as a model (would have to check files to see if I have one), would that be sufficient or are you seeking a fully written new model document?

Customer: replied 1 year ago.
Here What I had that can assit.
Solution of problem 1:CREATE TABLE COMPANY(cid VARCHAR2(12) PRIMARY KEY,company_name VARCHAR2(20),city VARCHAR2(15),state VARCHAR2(15));CREATE TABLE EMPLOYEE(eid VARCHAR2(12) PRIMARY KEY,ename VARCHAR2(20),street VARCHAR2(30),city VARCHAR2(15),state VARCHAR2(15),salary NUMBER(10),cid VARCHAR2(12) REFERENCES COMPANY(cid));CREATE TABLE MANAGERS(mid VARCHAR2(12) PRIMARY KEY,eid VARCHAR2(12) REFERENCES EMPLOYEE(eid));Solution of problem 2:INSERT INTO COMPANYVALUES('C123','Randstand','Glenburnie','Maryland');INSERT INTO COMPANYVALUES('C124','Verizon','Washington','Maryland');INSERT INTO COMPANYVALUES('C125','Infosys','Baltimore','Maryland');INSERT INTO COMPANYVALUES('C126','PWCC','Baltimore','Maryland');INSERT INTO MANAGERS VALUES('M888','E457');INSERT INTO MANAGERS VALUES('M889','E459');INSERT INTO MANAGERS VALUES('M890','E460');INSERT INTO MANAGERS VALUES('M891','E461');INSERT INTO EMPLOYEE VALUES('E456','John','123 newstreet','Baltimore','Maryland',70000,'C123');INSERT INTO EMPLOYEE VALUES('E457','Mary','234 oldstreet','Baltimore','Maryland',65000,'C124');INSERT INTO EMPLOYEE VALUES('E458','Tina','768 faststreet','Washington','Maryland',62000,'C124');INSERT INTO EMPLOYEE VALUES('E459','Robert','231 slowstreet','Frederick','Maryland',72000,'C125');INSERT INTO EMPLOYEE VALUES('E460','Tim','435 newstreet','Frederick','Maryland',66000,'C124');INSERT INTO EMPLOYEE VALUES('E461','Danny','210 oldstreet', 'Washington', 'Maryland', 57000, 'C126');Solution of problem 3:Task 1.SELECT ename FROM EMPLOYEE WHERE city = 'Baltimore';Task 2.SELECT ename FROM COMPANY, EMPLOYEE WHERE COMPANY.cid = EMPLOYEE.cid = 'Baltimore';Task 3.SELECT city, COUNT(cid) AS NumberOfCompanies FROM COMPANY GROUP BY city;Task 4.SELECT city, COUNT(cid) AS NumberOfCompanies FROM COMPANY GROUP BY city havingcount(*) >= 2;Task 5.SELECT company_name, COUNT(eid) AS NumberOfEmployees FROM COMPANY, EMPLOYEEWHERE COMPANY.cid = EMPLOYEE.cid GROUP by company_name;Task 6.SELECT ename FROM EMPLOYEE, COMPANY, MANAGERS WHERE COMPANY.cid =EMPLOYEE.cid AND EMPLOYEE.eid = MANAGERS.eid AND COMPANY.company_name ='Verizon';
Expert:  Mr. Gregory White replied 1 year ago.

After going through my resources, I do not have what is necessary to complete at this time.

I am opting out and opening up to the other professionals and messaging a couple who might be able to help.

Someone should be with you shortly.

Expert:  Ingo U replied 1 year ago.


are you still looking for an answer to these questions?

Expert:  Ingo U replied 1 year ago.

You need to spend $3 to view this post. Add Funds to your account and buy credits.
Customer: replied 1 year ago.
Thanks for responding. I don't need this question answered any more.

Related Homework Questions