Database Systems: Design, Implementation, & Management
11th Edition
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
expand_more
expand_more
format_list_bulleted
Concept explainers
Expert Solution & Answer
Chapter 7, Problem 67C
Explanation of Solution
COMMIT:
COMMIT is the SQL command that is used to save all the changes performed the last transaction. Syntax for COMMIT is given as follows.
BEGIN;
QUERY;
COMMIT;
SQL code:
The SQL code COMMIT the transaction is as follows:
COMM...
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Please written by computer source
1. For this project, you need to create the company database and populate it with the data given in the Oracle SQL PLUS environment (if you have not done so) 2. Your SQL commands should be placed in file(s) and run from the file(s). 3. Implement Triggers on all the tables to change character data to uppercase in the character data type columns. 4. Implement a Function that returns Dname from Department for any give employee. The parameter to the function would be the SSN. 5. Implement a Function that returns manager’s full name for any given department. The parameter to the function would be the department name. 6. Implement another Function that returns manager’s full name for any given department. The parameter to the function would be the department number. 7. Implement a Procedure that increases an employee salary by x%. Employee is identified by SSN and the percentage of increase is given as an input. 8. Implement a Package that contains the…
please follow the steps
Write a PL/SQL block that will allow the user to enter FNo and that will display Customer Name from Booking table. Include predefined exception with suitable messages1- SQL returns more than one records2- Records are not available
Chapter 7 Solutions
Database Systems: Design, Implementation, & Management
Ch. 7 - Prob. 1RQCh. 7 - Explain why the following command would create an...Ch. 7 - Prob. 3RQCh. 7 - Explain why it might be more appropriate to...Ch. 7 - What is the difference between a column constraint...Ch. 7 - What are referential constraint actions?Ch. 7 - Rewrite the following WHERE clause without the use...Ch. 7 - Explain the difference between an ORDER BY clause...Ch. 7 - Explain why the following two commands produce...Ch. 7 - What is the difference between the COUNT aggregate...
Ch. 7 - Prob. 11RQCh. 7 - Prob. 12RQCh. 7 - Write the SQL code that will create the table...Ch. 7 - Having created the table structure in Problem 1,...Ch. 7 - Prob. 3PCh. 7 - Prob. 4PCh. 7 - Write the SQL code to change the job code to 501...Ch. 7 - Write the SQL code to delete the row for William...Ch. 7 - Prob. 7PCh. 7 - Prob. 8PCh. 7 - Write the SQL code to change the EMP_PCT value to...Ch. 7 - Prob. 10PCh. 7 - Prob. 11PCh. 7 - Write the SQL code that will change the PROJ_NUM...Ch. 7 - Prob. 13PCh. 7 - Prob. 14PCh. 7 - Prob. 15PCh. 7 - Prob. 16PCh. 7 - Write the SQL code that will produce the same...Ch. 7 - Write the SQL code to find the average bonus...Ch. 7 - Prob. 19PCh. 7 - Prob. 20PCh. 7 - Write the SQL code to calculate the ASSIGN_CHARGE...Ch. 7 - Prob. 22PCh. 7 - Prob. 23PCh. 7 - Prob. 24PCh. 7 - Prob. 25PCh. 7 - Prob. 26PCh. 7 - Prob. 27PCh. 7 - Generate a listing of all purchases made by the...Ch. 7 - Using the output shown in Figure P7.29 as your...Ch. 7 - Prob. 30PCh. 7 - Prob. 31PCh. 7 - Use a query to compute the average purchase amount...Ch. 7 - Prob. 33PCh. 7 - Prob. 34PCh. 7 - Prob. 35PCh. 7 - Prob. 36PCh. 7 - Prob. 37PCh. 7 - Using the results of the query created in Problem...Ch. 7 - Create a query to find the balance characteristics...Ch. 7 - Prob. 40PCh. 7 - Prob. 41PCh. 7 - Prob. 42PCh. 7 - Prob. 43PCh. 7 - Prob. 44PCh. 7 - Prob. 45PCh. 7 - Prob. 46PCh. 7 - Prob. 47PCh. 7 - Prob. 48PCh. 7 - Prob. 49PCh. 7 - Prob. 50PCh. 7 - Prob. 51PCh. 7 - Prob. 52PCh. 7 - Prob. 53PCh. 7 - Prob. 54PCh. 7 - Prob. 55PCh. 7 - Prob. 56PCh. 7 - Prob. 57PCh. 7 - Prob. 58PCh. 7 - Prob. 59PCh. 7 - Prob. 60PCh. 7 - Prob. 61PCh. 7 - Prob. 62PCh. 7 - Prob. 63PCh. 7 - Write the SQL code to create the table structures...Ch. 7 - The following tables provide a very small portion...Ch. 7 - Prob. 67CCh. 7 - Prob. 68CCh. 7 - Prob. 69CCh. 7 - Prob. 70CCh. 7 - Prob. 71CCh. 7 - Prob. 72CCh. 7 - Prob. 73CCh. 7 - Prob. 74CCh. 7 - Prob. 75CCh. 7 - Prob. 76CCh. 7 - Prob. 77CCh. 7 - Prob. 78CCh. 7 - Prob. 79CCh. 7 - Prob. 80CCh. 7 - Prob. 81CCh. 7 - Prob. 82CCh. 7 - Prob. 83CCh. 7 - Prob. 84CCh. 7 - Prob. 85CCh. 7 - Prob. 86CCh. 7 - Prob. 87CCh. 7 - Prob. 88CCh. 7 - Prob. 89CCh. 7 - Prob. 90CCh. 7 - Prob. 91CCh. 7 - Prob. 92CCh. 7 - Prob. 93CCh. 7 - Prob. 94CCh. 7 - Prob. 95CCh. 7 - Prob. 96CCh. 7 - Prob. 97CCh. 7 - Write a query to display the movie number, movie...
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- we have table called "posts" Section C: PLISQL (5 marks) 1. Write PL/SQL code to create a function called best_ranked_post to list out all post which gets more than 50 likes.arrow_forwardPL/SQL Display the first name, last name and salary of all employees hired after “01-JAN-2006‟. Handle exceptions like Invalid cursor, cursor already open and no data found. Multi Line Text.arrow_forwardCreate a function that converts temperature from Fahrenheit to Celsius. You need to use themost suitable data types for this operation. Use sql commands.arrow_forward
- SQL: THIS IS FIRST TABLE : create table emp ( eid number(7), fname char(20), lname char(20), salary number, primary key (eid) ); insert into emp values (1111111, 'ali', 'ahmed', 3500); insert into emp values(2222222, 'asma', 'dani', 2000); insert into emp values(3333333, 'hassan', 'ali', 4500); insert into emp values(4444444, 'khaled', 'shaalan',6000); insert into emp values(5555555, 'farhad', 'kokol', 7500); insert into emp values(6666666, 'amir', 'sheikh', 10000); insert into emp values(7777777, 'rahul', 'kolap', 11000); insert into emp values(8888888, 'halim', 'ziaey', 21000); insert into emp values(9999999, 'henna', 'bubaker', 30000); THIS IS SECOND TABLE : create table students ( sid number, fname char(20), lname char(20), avg number, age number, primary key (sid) ); insert into students values (1111111, 'ali', 'ahmed', 76, 21); insert into students values(2222222, 'asma', 'dani', 89, 20); insert into students values(3333333, 'hassan', 'ali', 67, 23); insert into…arrow_forwardPL/SQL Display the first name and last name of all employees who work for department 50 or have a salary greater than 3500. Handle the exceptions like No Data Found and Invalid Cursorarrow_forwardPL/SQL Create a simple loop that prints instructor names, where instructor IDs are in the range from 101 to 105 only.arrow_forward
- Write a T-SQL query to display the emp code, emp lname, employee job code, from the employee table joining the job table where the employee job code equals the job table job code. Order the output by employee job code. Copy and paste the query and the output into your assignment document. (hint: use table aliases) /* Created with SQL Script Builder v.1.5 */ /* Type of SQL : SQL Server */ CREATE TABLE EMPLOYEE ( EMP_CODE int, EMP_TITLE varchar(4), EMP_LNAME varchar(15), EMP_FNAME varchar(15), EMP_INITIAL varchar(1), EMP_DOB datetime, JOB_CODE varchar(5), STORE_CODE int ); INSERT INTO EMPLOYEE VALUES('1','Mr.','Williamson','John','W','5/21/1964','SEC','3'); INSERT INTO EMPLOYEE VALUES('2','Ms.','Ratula','Nancy','','2/9/1969','MGR','2'); INSERT INTO EMPLOYEE VALUES('3','Ms.','Greenboro','Lottie','R','10/2/1961','GEN','4'); INSERT INTO EMPLOYEE VALUES('4','Mrs.','Rumpersfro','Jennie','S','6/1/1971','GEN','5'); INSERT INTO EMPLOYEE…arrow_forwardThe COUNT(*) function in the SELECT clause is used to return:a. the number of records in the specified tablesb. the number of orders placed by each customerc. the number of NULL values in the specified tablesd. the number of customers who have placed an orderarrow_forwardIn the SQL Oracle Application Write one query to return the employee_id, job_id, hire_date, and department_id of all employees and a second query listing employee_id, job_id, start_date, and department_id from the job_history table and combine the results as one single output. Make sure you suppress duplicates in the output.arrow_forward
- Write a SELECT statement that returns all rows with salary, last name, street address and ZIP code (SALARY, LAST_NAME, STREET, ZIP_CODE) from the EMPLOYEE and ADDRESS tables, sorted by SALARY from largest to smallest. STREET and ZIP_CODE are in the ADDRESS table, while the other fields are in the EMPLOYEE table. The common key is EMPLOYEE_ID.arrow_forwardin sql The EMPLOYEE table contains these columns: EMP_ID NOT NULL, Primary Key SSNUM NOT NULL, Unique LAST_NAME VARCHAR2(25) FIRST_NAME VARCHAR2(25) DEPT_ID NUMBER Foreign Key to DEPT_ID column of the DEPARTMENT table SALARY NUMBER(8,2). You execute this statement:CREATE INDEX emp_name_idx ON employee(last_name, first_name); Which statement is true? Select one: a. The statement creates a composite non-unique index b. The statement creates a composite unique index. c. The statement creates a function-based index. d. The statement fails because of a syntax error.arrow_forwardDatabase Q1: Which one of the following INSERT statements will successfully insert a single row? The following table has been created: CREATE TABLE student_table ( stud_id NUMBER (6), last_name VARCHAR2 (20), first_name VARCHAR2 (20), lunch_num NUMBER (4) ; a) INSERT VALUES INTO student_table (143354, ‘Roberts’, ‘Cameron’, 6543); b) INSERT INTO student_table COLMUNS (stud_id, last_name, lunch_num) VALUES (143352, ‘Roberts’, 5543, ‘Cameron’); c) INSERT TO student_table (stud_id, lunch_num, first_name, last_name) VALUES (143352, 6543, ‘Cameron’, ‘Roberts’); d) INSERT INTO student_table VALUES (143354, ‘Roberts’, ‘Cameron’, 6543); Q2: What does the following SQL statement display: SELECT EMP_ID, LAST_NAME, SALARY FROM EMPLOYEES WHERE SALARY > (SELECT MIN (E. SALARY) FROM EMPLOYEES E) ORDER BY SALARY DESC; a) Employees information who earn less money than the maximum salary b) Employees information who earn more money than the highest employee salary c) Employees information who earn…arrow_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 Learning
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
dml in sql with examples; Author: Education 4u;https://www.youtube.com/watch?v=WvOseanUdk4;License: Standard YouTube License, CC-BY