EBK CONCEPTS OF DATABASE MANAGEMENT
8th Edition
ISBN: 8220100706004
Author: Last
Publisher: Cengage Learning US
expand_more
expand_more
format_list_bulleted
Question
Chapter 2, Problem 22RQ
To determine
To describe the purpose of JOIN command in Relational Algebra.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
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
https://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 *******
Write the syntax for AUTO_INCREMENT in sql databases.
Chapter 2 Solutions
EBK CONCEPTS OF DATABASE MANAGEMENT
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. 1TDEQBECh. 2 - Prob. 2TDEQBECh. 2 - Prob. 3TDEQBECh. 2 - Prob. 4TDEQBECh. 2 - Prob. 5TDEQBECh. 2 - Prob. 6TDEQBECh. 2 - Prob. 7TDEQBECh. 2 - Prob. 8TDEQBECh. 2 - Prob. 9TDEQBECh. 2 - Prob. 10TDEQBECh. 2 - Prob. 11TDEQBECh. 2 - Prob. 12TDEQBECh. 2 - Prob. 13TDEQBECh. 2 - Prob. 14TDEQBECh. 2 - Prob. 15TDEQBECh. 2 - Prob. 16TDEQBECh. 2 - Prob. 17TDEQBECh. 2 - Prob. 18TDEQBECh. 2 - Prob. 1TDERACh. 2 - Prob. 2TDERACh. 2 - Prob. 3TDERACh. 2 - Prob. 4TDERACh. 2 - Prob. 5TDERACh. 2 - Prob. 6TDERACh. 2 - Prob. 7TDERACh. 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. 1SCGCCh. 2 - Prob. 2SCGCCh. 2 - Prob. 3SCGCCh. 2 - Prob. 4SCGCCh. 2 - Prob. 5SCGCCh. 2 - Prob. 6SCGCCh. 2 - Prob. 7SCGCCh. 2 - Prob. 8SCGCCh. 2 - Prob. 9SCGCCh. 2 - Prob. 10SCGCCh. 2 - Prob. 11SCGCCh. 2 - Prob. 12SCGCCh. 2 - Prob. 13SCGCCh. 2 - Prob. 14SCGCCh. 2 - Prob. 15SCGCCh. 2 - Prob. 16SCGCCh. 2 - Prob. 17SCGCCh. 2 - Prob. 18SCGCCh. 2 - Prob. 19SCGCCh. 2 - Prob. 20SCGCCh. 2 - Prob. 21SCGC
Knowledge Booster
Similar questions
- Write the SQL code to calculate the ASSIGN_CHARGE values in the ASSIGNMENT table in the Ch07_ConstructCo database. (See Figure P7.1.) Note that ASSIGN_CHARGE is a derived attribute that is calculated by multiplying ASSIGN_CHG_HR by ASSIGN_HOURS.arrow_forwardAssignment 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"arrow_forwardCompare 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_forward
- What are the advantages of using table-valued parameters in SQL functions?arrow_forwardIn Sql These are some database from a set of tables insert into AccountHolder(AccountID, CustomerID, AccountType)values (55003, 115, 'Savings'),(44001, 101, 'Chequing'),(55006, 109, 'Savings'),(44002, 102, 'Chequing'),(44003, 113, 'Chequing'),(55007, 108, 'Savings'),(44004, 103, 'Chequing'),(44005, 110, 'Chequing'),(55005, 112, 'Savings'),(44006, 114, 'Chequing'),(55001, 111, 'Savings'),(44007, 107, 'Chequing'),(44008, 104, 'Chequing'),(55004, 106, 'Savings'),(44009, 105, 'Chequing'),(44010, 113, 'Chequing'),(55002, 107, 'Savings'),(44011, 110, 'Chequing'),(44012, 104, 'Chequing') select * from AccountHolder insert into Branch(LocationID, BranchName, Address, Type, DepositSum, LoanSum)values (1, 'Boulevard Branch', '3268 Wade Boulevard', 'Rural', 171848.88, 37681.72),(2, 'Avenue Branch', '4814 Dare Avenue', 'Rural', 232707.42, 68324.56),(3, 'Street Branch', '208 Ferry Street', 'Commercial', 375010.75, 44665.08),(4, 'Road Branch', '468 Zulauf Road', 'Commercial', 496001.41,…arrow_forwardCourse: Database Given the following schemas for a student record: STUDENTS (student_id, student_name, region)COURSES (course_id, course_name, subject_type, lecturer_name)RESULTS (student_id, course_id, score, result_status) STUDENTS relation shows the information of the students. The COURSE relation specifies the course details. The RESULTS relation lists the scores that students obtain for each course taken. *Please execute this SQL codes for creating the table schemas mentioned above, Then execute the tasks in the table accordingly using proper SQL queries and Write your answer into the Answer Template CREATE TABLE STUDENTS (student_id VARCHAR(10) PRIMARY KEY, student_name VARCHAR(150), region VARCHAR(50)); CREATE TABLE COURSES (course_id VARCHAR(10) PRIMARY KEY, course_name VARCHAR(150), subject_type VARCHAR(50), lecturer_name VARCHAR(150)); CREATE TABLE RESULTS (student_id VARCHAR(10), course_id VARCHAR(10), score NUMBER, result_status VARCHAR(20), CONSTRAINT pk_results PRIMARY…arrow_forward
- Explain the following statement regarding SQL: Any query that can be written using the subquery approach can also be written using the joining approach but not vice versa.arrow_forwardIn the book Database Systems: Design, Implementation & Management - 13th edition Problem 5 states: Write the SQL code to validate the ASSIGN_CHARGE values in the ASSIGNMENT table. Your query should retrieve the assignment number, employee number, project number, the stored assignment charge (ASSIGN_CHARGE), and the calculated assignment charge (calucated by multiplying ASSIGN_CHG_HR by ASSIGN_HOURS). Sort the results by the assignment number.arrow_forwardtrue/false INNER JOIN combines two relations. It takes the second relation, and appends it to the end of the first relation. In Corelated Subqueries, subquery is executed independent of the outer query: subquery is executed only once. SELECT * FROM sys.Relations displays information about all the user-defined relations within a database. Given GENDER and STUDENT relations, SELECT Gender, FName, LName FROM GENDER LEFT OUTER JOIN STUDENT ON STUDENT.GenderCode = GENDER.GenderCode ≡ SELECT Gender,FName, LName FROM STUDENT RIGHT OUTER JOIN GENDER ON STUDENT.GenderCode = GENDER.GenderCode The statements select RIGHT('I wish I had attended the practice hours', 9) and select…arrow_forward
- SQL optimizer tries to convert queries with nested subqueries into a join operation for better performance True Falsearrow_forwardQuestion 10 Distinguish between SQL views and SQL entitiesarrow_forwardConsidering Vaccination Database, write queries to: Display the Subject CNIC, Name, Contact, Dose1 Center, and Dose2 Center as shown below: CNIC Name Contact Dose1 Center Dose2 Center 22401-6645321-1 Nasir 3409991112 Lachi Kohat 2 14301-6045321-5 Shahab 3409991112 kohat 3 Dara The subjects who have been vaccinated different types in Dose1 and Dose2. For instance, subjects who were vaccinated ‘Sinovac’ in the first dose, while Pfizer in the second dose.How many Viles of each type have been consumed so far. How many subjects are vaccinated from expired viles. Suggest the name of Incharge for the best performance award based on the highest number of subjects vaccinated on a single dayarrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781305627482Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781285196145Author:Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos CoronelPublisher:Cengage LearningA Guide to SQLComputer ScienceISBN:9781111527273Author:Philip J. PrattPublisher:Course Technology Ptr
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781305627482
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781285196145
Author:Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos Coronel
Publisher:Cengage Learning
A Guide to SQL
Computer Science
ISBN:9781111527273
Author:Philip J. Pratt
Publisher:Course Technology Ptr