Concept explainers
Below is part of a Student
Student (studNo, studName, address, mobileNo)
Registration (studNo, courseNo, regDate, semester, session)
Course (courseNo, courseName, creditHour, level)
Project (projNo, projName, courseNo)
Assignment (projectNo, studNo, startDate, dueDate, hoursSpent)
INSERT INTO STUDENT VALUES (175,'Ali Ahmad','10 jalan Bukit Bintang','019-123');
INSERT INTO STUDENT VALUES (176,'Hanna Syamil','32A Jalan Danau Kota','012-234');
INSERT INTO STUDENT VALUES (182,'Ibnu Hassan','19 Jalan Kota Raya','011-345');
INSERT INTO STUDENT VALUES (183,'Aliya Hamidi','233 Jalan Matahari ','013-456');
INSERT INTO STUDENT VALUES (184,'Kayla Adila','98 Jalan Enau','018-567');
INSERT INTO REGISTRATION VALUES (175,1100,'5/SEP/19',1,'2019/2020');
INSERT INTO REGISTRATION VALUES (175,1103,'3/SEP/19',2,'2019/2020');
INSERT INTO REGISTRATION VALUES (176,1103,'7/SEP/19',2,'2019/2020');
INSERT INTO REGISTRATION VALUES (182,1100,'2/SEP/19',1,'2020/2021');
INSERT INTO REGISTRATION VALUES (182,1103,'6/SEP/19',2,'2020/2021');
INSERT INTO REGISTRATION VALUES (183,1102,'4/SEP/19',2,'2020/2021');
INSERT INTO COURSE VALUES (1100,'
INSERT INTO COURSE VALUES (1103,'DATABASE',3,1);
INSERT INTO COURSE VALUES (1707,'MATHEMATICS',3,1);
INSERT INTO COURSE VALUES (2302,'WEB TECHNOLOGIES',3,2);
INSERT INTO COURSE VALUES (3102,'DATA WAREHOUSING',3,3);
INSERT INTO PROJECT VALUES (11001,'Tic Tac Toe',1100);
INSERT INTO PROJECT VALUES (11002,'Word Generator',1100);
INSERT INTO PROJECT VALUES (11031,'eZakat',1103);
INSERT INTO PROJECT VALUES (17071,'Stochastic BioNet',1707);
INSERT INTO PROJECT VALUES (17072,'Ensemble Kalman Filter',1707);
INSERT INTO ASSIGNMENT VALUES (11001,175,'01/OCT/17','30/NOV/17',10);
INSERT INTO ASSIGNMENT VALUES (11001,182,'01/OCT/18','30/NOV/18',9.5);
INSERT INTO ASSIGNMENT VALUES (11031,175,'01/MAR/18','30/APR/18',8);
INSERT INTO ASSIGNMENT VALUES (11031,176,'01/MAR/18','30/APR/18',9);
INSERT INTO ASSIGNMENT VALUES (11031,182,'01/MAR/19','12/APR/19',8.5);
QUESTION :
1. Write a PL/SQL PROCEDURE that will list the project names given the course ID.
2. Call the procedure from an anonymous block. Allow the user to enter the course ID (courseno)
Step by stepSolved in 4 steps with 2 images
- The Motor Vehicle Department Database The Motor Vehicle Branch administers driving tests and issues driver's licenses. Any person who wants a driver's license must take a learner's exam at any Motor Vehicle Branch in the province. If he/she fails the exam, he can take the exam again any time after a week of the failed exam date, at any branch. If he passes the exam, he is issued a license (type = learner's) with a unique license number. A learner's license may contain a single restriction on it. The person may take his driver's exam at any branch any time before the learner's license expiry date (which is usually set at six months after the license issue date). If he passes the exam, the branch issues him a driver's license. A driver's license must also record if the driver has completed driver's education, for insurance purposes.arrow_forwardCode SQLarrow_forwardBelow is part of a Student database. The primary keys are highlighted in bold. Student (studNo, studName, address, mobileNo) Registration (studNo, courseNo, regDate, semester, session) Course (courseNo, courseName, creditHour, level) Project (projNo, projName, courseNo) Assignment (projectNo, studNo, startDate, dueDate, hoursSpent) QUESTION 1. Write a PL/SQL FUNCTION that calculates the cost each student has to pay for all courses taken. In the photo is example the cost detail for each course. 2. Write a PL/SQL Procedure to call the function you created in question 1 . Allow the user to enter the student ID (studno). SECOND PHOTO IS THE EXAMPLE OF EXPECTED OUTPUTarrow_forward
- # Create College Database: # input choice using integer # create if-else conditions: # if you entered number 1 # enter student id, # enter student name # enter student major # enter students grade1 # enter students grade2 # calculate total grades # calculate average of grades # create if else condition where based on average will display their grade too # display all variables # if you entered number 2 # enter faculty id, # enter faculty name # enter faculty department # enter faculty monthly salary # show yearly salary by calculating monthly salary with 12 # display all variablesarrow_forwardWhen is it acceptable to manually create an index?arrow_forwardThe following fields are presented in the table: Member Last Name, MemberFirstName, Street, City, State, ZipCode and MemberFee. The table contains 75,000 documents. How would you build indexes for the table and why would you create these indexes?arrow_forward
- Assume that the Authors table is already built in the database with the following specifications: Authors: Column Name Data Type constrains Authors ID Author Name Varchar2(10) |Varchar2(30) Primary key Unique You Need to Create the Books table with the following specifications Column Name Data Type Constrains ISBN Book Title Book Price Author id Number (10) Varchar2(40) Number (4,2) Varchar2(10) Primary key Not Null referencing the Author_ID in the Author Table Complete the create statement by drag and drop the correct word: Create Table lblank (ISBN Number (10) plank, Book Title Varchar2blank ) Not Null, Book Price Number(4, 2), Auther IR blank (10) references Jolank (blank ); Author ID Books Number||Authors Not Nul Varchar2| Primary Key 40 h (United States)arrow_forwardPROBLEM -1 The table name is "users" and its structure is shown below. You can insert as many rows in your database as you want to check your queries. ID int Name varchar(100) Email varchar(50) Influence_count int Member_since date Multiplier int Task Find all the unique multipliers in the table and show them in descending order. Find the names where multipliers are odd. Find the name, email and member_since of users who became a member of the platform between 31st of July, 2020 and 15th of August, 2020 Show the name and email of the latest 5 members. Find all ids and email addresses where the TLD (Top Level Domain) is 'com' (ends with 'com') Show the name and email of the person who has the highest number of influence counts. Retrieve the id, name, email and influence count of the users who have 'u,o,v,n,s,m' - all of these in their name. Find highest influence_count for each multiplier that is greater than 9. Count the number of users in each multiplier who has joined after the month…arrow_forwardSQL Database helparrow_forward
- Access Assignment Problem: JMS TechWizards is a local company that provides technical services to several small businesses in the area. The company currently keeps its technicians and clients’ records on papers. The manager requests you to create a database to store the technician and clients’ information. The following table contains the clients’ information. Client Number Client Name Street City State Postal Code Telephone Number Billed Paid Technician Number AM53 Ashton-Mills 216 Rivard Anderson TX 78077 512-555-4070 $315.50 $255.00 22 AR76 The Artshop 722 Fisher Liberty Corner TX 78080 254-555-0200 $535.00 $565.00 23 BE29 Bert's Supply 5752 Maumee Liberty Corner TX 78080 254-555-2024 $229.50 $0.00 23 DE76 D & E Grocery 464 Linnell Anderson TX 78077 512-555-6050 $485.70…arrow_forwardHaving this information. StudentsAttribute Name Data TypeStudentID char(11)FirstName varchar(20)LastName varchar(20)Gender char(1)DateofBirth date CoursesAttribute Name Data TypeCourseCode varchar(6)CourseName varchar(70)Level char(2)Credits int RegistrationAttribute Name Data TypeStudentID char(11)CourseCode varchar(6)Grade decimal(2, 1) Write SQL code to: 1. How many courses are there on each level? 2. What is the average grade of courses that have been taken by the student with student ID 861103-2438? 3. Which students (studentID only) have the highest grade for the course ‘CS052’? 4. Find the courses (course codes only) that have been taken by both the student 861103-2438 and the student 123456-0980.arrow_forwardAccess: Tables and Controlsarrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education