ScholarMatic | 24/7 Homework Help

ScholarMatic Will Help You Write Your Essays and Term Papers

Answered » You can buy a ready-made answer or pick a professional tutor to order an original one.

PLSQL

by | Nov 29, 2023 | questions

http://mahler.cse.unsw.edu.au/webcms2/course/index.php?cid=2290

Please refer to the above link for the details regarding the assignment.
The answers should be in ass3.sql that is there in the zip folder i have attached
Document Preview:

assignment3/ass3.sql — — COMP9311 Database Systems
— — Assignment 3
— — Written By: YOUR NAME
— — ID: YOUR ID
— — Date:

set serveroutput on

— Q1 create a function that returns the number of times a player has played in
— his favorite stadiums. Return -2 if the player doesn’t exist in our database.
— Return -1 if the player doesn’t have any favorite stadium

create or replace function favS(pname varchar2) return number
as
— Write your declarations here
begin
— Write your statements here
return 0; — CHANGE THIS LINE TO RETURN APPROPRIATE VALUE
end;
/

— Q2 create a procedure that inserts in Q2 table match ID and name of the stadium
— for each player where he was declared man of the match but his team had lost.
create or replace procedure manofthematch
is
— Write your declarations here
begin
delete from Q2; — DON’T REMOVE THIS LINE (it makes the table empty at start of the procedure)
— Write your statements here
end;
/

— Q3 create a procedure that inserts the league results into a table Q3

create or replace procedure league_results
as
— Write you declarations here
begin
delete from Q3; — DON’T REMOVE THIS LINE (it makes the table empty at start of the procedure)
— Write your statements here
end;
/

— Q4 create your triggers on AUTOGRAPHS table after this line

assignment3/create.sql
set feedback on
prompt creating tables …
set feedback on

create table players (
name varchar(20) primary key,
birthdate date,
shirtNumber number(2),
team varchar(20) not null
);

create table officials (
staffID NUMBER(2) primary key,
name varchar(20),
address varchar(20),
birthdate date,
staysAt varchar(20) not null,
checkIn date,
checkOut date
);

create table hotels(
name varchar(20) primary key,
rooms integer check (rooms > 0),
address varchar(20),
manager number(2) not null
references officials(staffID)
initially deferred deferrable
);

create table teams (
name varchar(20) primary key,
staysAt…

Attachments:


ScholarMatic: Explanation & Answer

Your ready answer from a verified tutor is just a click away for as little as $14.99


  

Click Order Now to get 100% Original Answer Customized to your instructions!

HOME TO CERTIFIED WRITERS

Why Place An Order With Us?

  • Certified Editors
  • 24/7 Customer Support
  • Profesional Research
  • Easy to Use System Interface
  • Student Friendly Pricing

Have a similar question?

PLAGIRAISM FREE PAPERS

All papers we provide are well-researched, properly formatted and cited.

TOP QUALITY

All papers we provide are well-researched, properly formatted and cited.

HIGHLY SECURED

All papers we provide are well-researched, properly formatted and cited.

ScholarMatic: Get Started

Assignment Writing Service

Feel safe and secure when placing an order on our portal!
Fruitful cooperation begins with solid guarantees, and we are professional enough to promise perfect results. Let’s get it started!