Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
How would I create a Update statement in SQL Lite for the following question:
- The student ‘100004’ gave his phone to student ‘100003’. Make the phone ‘14896572315’ become the alternate phone of student ‘100003’.
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 2 steps
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
- Develop a PL/SQL block that would go through all the employees from EMPLOYEES table who work in department id= 90 (there is suppose to be 3 employee who work in Department 90)- IN BEGIN END END SECTION; Execute 3 separate of SELECT statement one after the other. Each SELECT will pull first name. salary of each employee and store them in local variables.+ SELECT LOAD INTO v_firstname1, v_salarxlWHERE emrlexee.id=100 Then second WHERE emploxee.id3101+ SELECT first_name, salary INTO v_firstname2, v_salary2 Then third + SELECTSELECTI tirst.name, salary INTO v_firstname3, v_salary3 iin WHERE emploxee id=102 ..... You must now have 6 local variables. DECLARE all of them accordingly in DECLARE section and use them in BEGIN and END.+ Then add another SELECT statement in BEGIN-END to find company average salary SELECT xa(salary) INTO aKasal FROM EMPLOYEES; !!! Do not forget to create y avgsal local variable in DECLARE section.arrow_forwardPlease answer as many questions as you can!arrow_forwardLet's wa(k through a review of basic SQL syntax, using as an example the database that was mentionedearlier. This database has the following simple structure(* indicates a primary key):Courses: CourseID*, CourseName, TeacherIDTeachers: TeacherID*, TeacherNameStudents; StudentID*, StudentNameStudentCourses: CourseID*, StudentID*Using the above table, implement the following queries.Query 1: Student Enrollment Query 2: Teacher Class Sizearrow_forward
- Is this statement true or false: Oracle SQL allows full expression-based use of both provided (built-in) and user-definable functions.arrow_forwardThis doesn't answer the question I asked. This is for a different section. I got a solution for this question but it answered a different section. Could I please have a My SQL eer diagram that sets up the following queries. All books that are checked out are due back in two weeks, with no exceptions. The late fee is 50 cents per day. The librarian would like to have a query that generates an overdue book list each day so she can telephone the miscreants. The library would like a query to search for a book by its title and see if it is currently checked out. Sometimes members can’t remember the full name of the book so the query needs to be able to search by a part of the title. The library would like a query that can show them the Top 10 most popular books checked out over a particular date range. The library would like to know the most popular day of the week for library members to visit the library and check out books. The library would like to know which book categories are the most…arrow_forwardIn Oracle database, if we have any field such as Job_Title field in any of our table then we can use DECODE function to sort the result based on our own numerical value. This can be done by including the following in ORDER BY clause: 1: ORDER BY DECODE(job-title,'Manager',3,Assistant',2,'Sales Rep', 1) DESC II: ORDER BY DECODE(job-title,'Manager', 3,'Assistant',2, Sales Rep', 1) ASC III I and II are correct IV I and II are incorrect ||| IV || 1arrow_forward
- Create an anonymous block in PL/SQL to list all the countries from Country table where Currency contain keyword ‘Dollar’. Perform following steps: Create user define type with name of the country, currency.Type should contain datatype for name and currency using %type only.Display should include Name of the country, currency code using user defined type. Filter for the data : All the countries from Country table where Currency contain keyword ‘Dollar’.arrow_forwardExpress the following SQL code in Relational Algebra form.SELECT *FROM COURSEWHERE (COURSE.COLLEGE <> ’Business’OR COURSE.COLLEGE <> ’Engineering’)AND COURSE.CREDIT = ’U’;arrow_forwardMy other instruction for SQL says: Create and test a stored procedure called checkin_transaction that processes a “checkin” transaction. When a book is checked in, the corresponding CHECKOUT record is updated to show the date it was checked in, and the Pat_ID attribute in the BOOK table is updated to NULL. The entire transaction (starting with START TRANSACTION; and ending with COMMIT;) should be in between the BEGIN and END statements of the stored procedure. You should be able to call the procedure with a statement like this, passing the values of the Book_Num, Pat_ID, and Check_In_Date to the procedure: CALL checkin_transaction(5243, 1170, ‘2017-04-30’) Do you guys know how?arrow_forward
- This is for SQL Give me a list of all of our vendors (by their name) and, if they have an invoice, give me the total number of invoices we have from them and the invoice date of their first invoice. The invoice date results should be provided in a way that shows the date only in the following format: mm/dd/yyyy (e.g. 10/04/2021)arrow_forwardI NEED HELP WITH THIS QUESTION FOR MY DATABASE MANAGEMENT CLASS FOR SQL DEVELOPER 5. Now compute Average GPA in each class. Display class_code, Class_GPA. Assume all courses are 3 credit courses. A general formula for GPA would be sum(gradepoints x Hrs)/sum(Hrs). Here you can just take an average of gradepoints as the credit hours are same for all courses.arrow_forwardHello! I was given those tables(no data) and I am supossed to write sql code for the following. But I looks like I have a syntax error or there is something I have wrote wrong. (see images) (1) Create a trigger “insert_inventory” on table “Inventory”. The trigger is fired after a row is inserted in table “Inventory”. After a row is inserted in table “inventory”, the “itemid”, the insertion time, and the action is inserted in table “Inventory_history”. The action is set to ‘add an item’. The oldprice is set to null. Test your trigger by inserting a row into Inventory and displaying the contents of Inventory_history. (3) Create a trigger “change_price” on table “Inventory”. The trigger is fired before a change is made to the “Inventory” table. Before the price of an item is changed, the “itemid”, the item’s old price, the action, and the time of change are inserted into the table “Inventory_history”. The action is set to “price change”. Test your trigger by updating a row in Inventory…arrow_forward
arrow_back_ios
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