1- Create table student5 as:
2- Write PL/SQL program using cursor to display student number and names who's their salary greater than 2500?
3- Update the table students to increase the salary of each customer by 300?
1)
CREATE TABLE student5 (
St_no INT(5),
St_name VARCHAR(12),
Salary NUMBER,
Age INT(2),
Major VARCHAR(10)
);
3)
UPDATE student5 SET salary = salary + 300;
NOTE: As per Chegg policy I am allowed to answer specific number
of questions (including sub-parts) on a single post. Kindly post
the remaining questions separately and I will try to answer them.
Sorry for the inconvenience caused.
The procedure is a sample and needs to be modified. The software used is oracle 11g. Provide screen shot of the program running. EX:NO:7 PLISOL PROCEDURE & FUNCTION AIM To develop the package for finding the number of students under each percentage for individual courses using PLISQL procedure and function. DATABASE SCHEMA STUDENT (ST_ID, NAME, COURSECODE, COURSENAME, TOTAL MARKS, PERCENTAGE) PROCEDURE STEP 1: Start STEP 2: Create a table with table name student. STEP 3: Insert at least 4 records...
10 Exercise 2 We suppose that we have the following dataset on students (GPA: Grade Point Average): ID Name GPA Leila 3.5 7 Adel 4.2 20 Ahmed 3 13 Abir 2.7 30 Iman 3.1 21 Amna 2.7 Hedi 4.5 9 Write a C++ program that will create a binary search tree which nodes are students. The tree will be created based on the ID of students. The program will allow the user to successively do the following tasks: Display the...
Exercise 3 [12.5 marks] Given the Restaurant management system database that contains the following tables (primary keys are underlined and foreign keys are preceded with #): Customer (customerID,customerFirstName,customerLastName,customerAddress) Oreder (orderID,orderDate, #customerID,#menuItemID,#staffID) MenuItem(menuItemID, menuItemName,ingredients,type,availability) Staff(staffID, staffName, staffPhoneNumber, staffRole ) OrderPayment(paymentID,paymentAmount,#orderID,#staffID) 1) Without using DISTINCT, write the SQL query equivalent to the following one:[1.5 marks] SELECT DISTINCT menuItemName FROM MenuItem WHERE type = ‘Vegetarian’ OR availability= ‘Yes’; 2) Express the following queries in SQL: a) Find the number of orders placed by...
SQL Homework Create a single script to do all of the following. Be sure to create in such a way that it can be re-run multiple times. Create a database named homework. In this database, create three tables: Student, Course, StudentCourse - Create the Student table with the following fields in this order: studentID as an integer; do not allow empty values firstName as a variable number of characters, max 30, with a null default value lastName as a variable...
1. Create an PL/SQL anonymous block. Using a “while” loop, display on the console those rows where a quantity of shipments for a project are greater than the average quantity of shipments for that project. 2. Repeat using a FOR loop. // TABLE INFO : SHIPMENTS(SUPPLIERNO, PARTNO, PROJECTNO, QUANTITY, SHIPDATE, ARRIVEDATE)
Tables: Create table Item( ItemId char(5) constraint itmid_unique primary key, Decription varchar2(30), Unitcost number(7,2)); Create table Customer( custID char(5) constraint cid.unique primary key, custName varchar2(20), address varchar2(50)); Create table Orderdata( orderID char(5) constraint oid_uniq primary key, orderdate date, shipdate date, ItemId char(5) references Item.ItemId, No_of_items number(4), Unitcost number(7,2), Order_total number(7,2), custID char(5) references customer.custID); Insert Into Item values(‘A123’,’Pencil’,2.5); Insert Into Item values(‘B123’,’Pen’,15); Insert Into...
Java Programing Code only Ragged Array Assignment Outcome: Student will demonstrate the ability to create and use a 2D array Student will demonstrate the ability to create and use a jagged array Student will demonstrate the ability to design a menu system Student will demonstrate the ability to think Program Specifications: Write a program that does the following: Uses a menu system Creates an array with less than 25 rows and greater than 5 rows and an unknown number of...
HELP DATABASE QU Question 1: Think About the relational database table data as given below, write the following queries in Oracle SQL. Company (Cid, Cname, City, Budget, Branch) Department (Deptno, Dname, Building, Cname) Employee (Ename, Deptno, Street, City, Phone, Salary) Works (Ename, Deptno, Hire_date) Location (Cname, Location ) 1. Write Query to Create the Company table, suggest appropriate data type of each attribute, consider that there should be a name for each company. 2. Find employee name/names who live in...
1. Create a PL/SQL program block that determines the top students with respect to GPA. Assume that the database has four tables. Student(SSN, SName, DOB, Major) , Grade(SSN, CNo, Grade(0,1,2,3,4)) and Course table(CNo,CName, Credit Hour), Prerequisite(CNo, PreCNo); Student and couse data ae given in the following SQL statements a. Accept a number n as user input with SQL*Plus telling top n%. b. In a loop get the SName and GPA of the top n% people with respect to GPA. c....
Using MySQL commands answer the questions listed below using the Premier Products Company schema. 1.Using Views a) Create a view called part_location that has the following attributes: part_num, part_description, part_quantity, warehouse_name, warehouse_address. This data comes from the part and warehouse entities. b) Write a query using the view that shows the total number of parts ordered from each warehouse. The output should look like this: 2. Using Triggers a) Execute the following SQL to create the customer_audit table in the...