Need the code in PL/SQL for Procedures and Functions for feature 7 below, please provide the answer using varray data type (read the hint highlighted for the feature). we already done with other feature. Please we only need the feature 7 below. The two tables and attributes below are the tables we made and are using for this assignment. URGENT!! ------------------------------------------------------------------------------------------------------- Each feature will be implemented as one or more Oracle PL/SQL procedures/functions. You can make the following assumptions in this project. The database stores information about houses, each with a house ID, address, and zip code.   The database stores information about person, including person ID, house ID where the person lives, person name, phone number, and status where 1 means currently tested positive (i.e., the most recent test result is positive), 0 means currently tested negative (i.e., the most recent test result is negative), and null (no test so far so status is unknown).   The database stores information about a person's all past tests, including person ID, test date, and result (1 means positive and 0 negative).   The database stores information about events (could be gathering, party, etc.). Each event has an event ID, event name, date, and address.   The database stores information about a person participated in an event.   The database stores information about flights, including flight ID, flight date, flight number (a varchar type e.g., 'DL 345' is a delta 345 flight).   The database stores IDs of people on a specific flight.     --------------------------------------------------------------------------------------------------------------------------     drop table person_events cascade constraints; drop table pevents cascade constraints;    create Table person_events( pid int, eid int, primary key(pid,eid)); insert into person_events values(1,1); insert into person_events values(2,2); insert into person_events values(3,3);     create table pevents( eid int, ename varchar (30), edate varchar (30), eadddress varchar (40)); insert into pevents values (1,'House Party', date '2025-8-8','123 CoreyLake Ave MD'); insert into pevents values (2,'Wedding', date '2025-2-8','13 Cikerlook Ave MD'); insert into pevents values (3,'BBQ', date '2025-1-1','122 Greenbelt Ave MD'); -------------------------------------------------------------------------------------------------------------------------------- Each feature will be implemented as one or more Oracle PL/SQL procedures/functions. Use PL/SQL to answer the following questions. Member 4: Feature 7: Enter a list of people attending an event. Hint: use varray data type as input parameter. Input includes event ID and list of person ids. First check whether the event exists. If not print a message saying the event does not exist. Next check each person ID, if it does not exist print a message saying the person does not exist. Next check whether the person id and event id combination are already in person_event table. If so print a message 'No need to insert'. Otherwise insert a row into person_event.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

 second attempt:

Need the code in PL/SQL for Procedures and Functions for feature 7 below, please provide the answer using varray data type (read the hint highlighted for the feature). we already done with other feature. Please we only need the feature 7 below. The two tables and attributes below are the tables we made and are using for this assignment. URGENT!!

-------------------------------------------------------------------------------------------------------

Each feature will be implemented as one or more Oracle PL/SQL procedures/functions.

You can make the following assumptions in this project.

  1. The database stores information about houses, each with a house ID, address, and zip code.

 

  1. The database stores information about person, including person ID, house ID where the person lives, person name, phone number, and status where 1 means currently tested positive (i.e., the most recent test result is positive), 0 means currently tested negative (i.e., the most recent test result is negative), and null (no test so far so status is unknown).

 

  1. The database stores information about a person's all past tests, including person ID, test date, and result (1 means positive and 0 negative).

 

  1. The database stores information about events (could be gathering, party, etc.). Each event has an event ID, event name, date, and address.

 

  1. The database stores information about a person participated in an event.

 

  1. The database stores information about flights, including flight ID, flight date, flight number (a varchar type e.g., 'DL 345' is a delta 345 flight).

 

  1. The database stores IDs of people on a specific flight.

 

 

--------------------------------------------------------------------------------------------------------------------------

 

 

drop table person_events cascade constraints;

drop table pevents cascade constraints;

  

create Table person_events(

pid int,

eid int,

primary key(pid,eid));

insert into person_events values(1,1);

insert into person_events values(2,2);

insert into person_events values(3,3);

 

 

create table pevents(

eid int,

ename varchar (30),

edate varchar (30),

eadddress varchar (40));

insert into pevents values (1,'House Party', date '2025-8-8','123 CoreyLake Ave MD');

insert into pevents values (2,'Wedding', date '2025-2-8','13 Cikerlook Ave MD');

insert into pevents values (3,'BBQ', date '2025-1-1','122 Greenbelt Ave MD');

--------------------------------------------------------------------------------------------------------------------------------

Each feature will be implemented as one or more Oracle PL/SQL procedures/functions.

Use PL/SQL to answer the following questions.

Member 4: Feature 7: Enter a list of people attending an event. Hint: use varray data type as input parameter. Input includes event ID and list of person ids.

  • First check whether the event exists. If not print a message saying the event does not exist.
  • Next check each person ID, if it does not exist print a message saying the person does not exist.
  • Next check whether the person id and event id combination are already in person_event table. If so print a message 'No need to insert'. Otherwise insert a row into person_event.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY