EBK A GUIDE TO SQL
9th Edition
ISBN: 8220103671682
Author: Last
Publisher: CENGAGE L
expand_more
expand_more
format_list_bulleted
Question
Chapter 2, Problem 20RQ
To determine
To describe the purpose of SELECT command in Relational Algebra.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Write the syntax for AUTO_INCREMENT in sql databases.
Assignment III (5%): Design of the conceptual model (ERD) from the given relational
database. (Note: students has to give appropriate labels on relationships and type of relationships
between the entities)
Use the same Assignment- I schema to perform the PL/SQL programs
Q1. The management of the organization has decided to increase the salaries of all employees to
15% for this, write a PL/SQL block to accept the employee number and to update the salary of
that employee. Display the output based on the existing records of the employees. (2 marks)
Q2.
having the employee age above 40 years. (2 marks)
Create a PL/SQL a cursor program that will increase the employee salary to 25% who are
Q3.
where place belongs to Ibri, dunk or Yanul (hint: Project (projectID. projectName, place,
start Year, end Year, #DepartmentID) (2 marks)
Write a PL/SQL procedure to change the name of the project to "AL Dahariyah Projects"
Below 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 OUTPUT
Chapter 2 Solutions
EBK A GUIDE TO SQL
Ch. 2 - Prob. 1RQCh. 2 - Prob. 2RQCh. 2 - Prob. 3RQCh. 2 - Prob. 4RQCh. 2 - Prob. 5RQCh. 2 - Prob. 6RQCh. 2 - Prob. 7RQCh. 2 - Prob. 8RQCh. 2 - Prob. 9RQCh. 2 - Prob. 10RQ
Ch. 2 - Prob. 11RQCh. 2 - Prob. 12RQCh. 2 - Prob. 13RQCh. 2 - Prob. 14RQCh. 2 - Prob. 15RQCh. 2 - Prob. 16RQCh. 2 - Prob. 17RQCh. 2 - Prob. 18RQCh. 2 - Prob. 19RQCh. 2 - Prob. 20RQCh. 2 - Prob. 21RQCh. 2 - Prob. 22RQCh. 2 - Prob. 23RQCh. 2 - Prob. 24RQCh. 2 - Prob. 25RQCh. 2 - Prob. 26RQCh. 2 - Prob. 27RQCh. 2 - Prob. 28RQCh. 2 - Prob. 29RQCh. 2 - Prob. 30RQCh. 2 - Prob. 1BCEQBECh. 2 - Prob. 2BCEQBECh. 2 - Prob. 3BCEQBECh. 2 - Prob. 4BCEQBECh. 2 - Prob. 5BCEQBECh. 2 - Prob. 6BCEQBECh. 2 - Prob. 7BCEQBECh. 2 - Prob. 8BCEQBECh. 2 - Prob. 9BCEQBECh. 2 - Prob. 10BCEQBECh. 2 - Prob. 11BCEQBECh. 2 - Prob. 12BCEQBECh. 2 - Prob. 13BCEQBECh. 2 - Prob. 14BCEQBECh. 2 - Prob. 15BCEQBECh. 2 - Prob. 16BCEQBECh. 2 - Prob. 17BCEQBECh. 2 - Prob. 18BCEQBECh. 2 - Prob. 1BCERACh. 2 - Prob. 2BCERACh. 2 - Prob. 3BCERACh. 2 - Prob. 4BCERACh. 2 - Prob. 5BCERACh. 2 - Prob. 6BCERACh. 2 - Prob. 7BCERACh. 2 - Prob. 1CATCCh. 2 - Prob. 2CATCCh. 2 - Prob. 3CATCCh. 2 - Prob. 4CATCCh. 2 - Prob. 5CATCCh. 2 - Prob. 6CATCCh. 2 - Prob. 7CATCCh. 2 - Prob. 8CATCCh. 2 - Prob. 9CATCCh. 2 - Prob. 10CATCCh. 2 - Prob. 11CATCCh. 2 - Prob. 12CATCCh. 2 - Prob. 13CATCCh. 2 - Prob. 14CATCCh. 2 - Prob. 15CATCCh. 2 - Prob. 16CATCCh. 2 - Prob. 17CATCCh. 2 - Prob. 18CATCCh. 2 - Prob. 1SPTCCh. 2 - Prob. 2SPTCCh. 2 - Prob. 3SPTCCh. 2 - Prob. 4SPTCCh. 2 - Prob. 5SPTCCh. 2 - Prob. 6SPTCCh. 2 - Prob. 7SPTCCh. 2 - Prob. 8SPTCCh. 2 - Prob. 9SPTCCh. 2 - Prob. 10SPTCCh. 2 - Prob. 11SPTCCh. 2 - Prob. 12SPTCCh. 2 - Prob. 13SPTCCh. 2 - Prob. 14SPTCCh. 2 - Prob. 15SPTCCh. 2 - Prob. 16SPTCCh. 2 - Prob. 17SPTCCh. 2 - Prob. 18SPTCCh. 2 - Prob. 19SPTC
Knowledge Booster
Similar questions
- Compare and contrast scalar functions and table-valued functions in SQL. When might you choose one type of function over the other in your database design?arrow_forwardUse the DDL SQL command “CREATE” to define each of your entities in the following E-R diagramarrow_forwardhttps://sqliteonline.com/ : Program link The first requirement: Using the SQL language, transform the following entity model into tables in the database. Entity Manger contains: M-name The name of the manager. M-ID and manager number.The department entity contains: D-name The name of the department. D-ID and department number.Create constraint master key name of the manager when creating the Manger table.Creating the foreign key constraint The name of the manager when creating the Department table. The second requirement: After creating the tables and specifying the primary and foreign key, do the following: * Add a column D_loc to the Department table, specifying the type of column.* Remove the column named M_name from the Manger table* Change the name of the department table to Dep Please:: ******* ATTACH A PICTURE OF THE CODES USED AND PICTURE OF THE PROGRAM SCREEN *******arrow_forward
- Write a query in relational algebra to find the ID and the brand of those trucks whose type is S. ( Database Management Systems )arrow_forwardQuestion 10 Distinguish between SQL views and SQL entitiesarrow_forwardFirst query—selecting columns from table Display the query objects in the database. For each of the queries you create in this lab, you will work with the SQL View in Access. Create a new query in Design view. If necessary, close the Show Table window, and change the view to SQL View. In the Query View window, edit the SELECT statement that is shown to read: SELECT ID, FirstName, LastName, PayRate, HoursWorked FROM Employees; Recall that the SELECT clause specifies the columns that we want from the table(s), and the FROM clause specifies the table(s) to be used. Run the query. Describe the results.arrow_forward
- What is the purpose of keywords in SQL (Structured Query Language) when writing database queries?arrow_forwardUse the following relational schema write functions, procedures and triggers in PL/SQL:Student (studid, FirstName, LastName, Email, phoneNumber, DateofBirth, GPA)Club (clubid, ClubName, # studid)MemberOf (#clubid, #studid, joiningDate )Activities (actid, actdt, place, durationNbHour)Organize (#actid , #clubid , fee)1. Write a function called 'Checkavailability' that accepts a date and check whether 'SalalahHall' is busy or not on that date. 2. Write a function called 'CheckStudentClub' that accepts a student id and returns thename of the club in which the student is participating. 3. Write a procedure called ‘MainProc' to call the functions 'Checkavailability' and'CheckStudentClub'. This procedure should display the appropriate messages accordingto the values returned by the each of the called functions (For example: If the firstfunction returns true, the procedure will display 'Salalah Hall is free on date ######'otherwise 'Salalah Hall is busy on date ######')4. Write a Trigger that…arrow_forwardWhat is a PL/SQL function? Write the general syntax of it.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- 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
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education