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
Show their content after:
1) Update student set sid = 9999 where sid = 5275
2) Update student set sid = 8888 where sid = 3842
Assume that Student (sid: int, name: varchar(20), login: varchar(20), age: int, gpa: float, Primary key (sid))
Enrollment(cid: varchar(7), grade: varchar(2), stuid: int, primary key (stuid, cid), foreign key (stuid) references student on update cascade)
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 3 steps with 2 images
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
- what does aggregate function do? a) It eliminates one or more columns of a table. b) it list combinations of rows in two tables. c) it selects roes that appear in one table but another. d) it compares values over a set of rowsarrow_forwardFind the staff name who has the maximum salary for each city.arrow_forward1) Assume the EMPLOYEE table has the following rowsID DEPT SALARY NAME100 SALES 40000 Smith101 RD 38000 Terry102 HR 60000 David103 SALES 58000 Ellie104 RD 70000 Judya) Provide the complete PL/SQL code to implement a Virtual Private Database suchthat an employee could only view the records for employees in the samedepartment while masking coworkers’ salary with NULL.b) Based on the Virtual Private Database you implemented in step a), would anemployee be able to insert, update or delete a record for another employee whoworks in another department? If yes, what might be the potential security risk andhow would you fix the problem by setting up the VPD appropriately?arrow_forward
- q4- Choose all that applyarrow_forwardRefer to the film and inventory tables of the Sakila database. The tables in this lab have the same columns and data types but fewer rows. Write a query that lists the titles of films with the fewest rows in the inventory table. This query requires a subquery that computes the minimum of counts by film_id: SELECT MIN(count_film_id) FROM ( SELECT COUNT(film_id) AS count_film_id FROM inventory GROUP BY film_id ) AS temp_table; This subquery is provided in the template.arrow_forwardTask B. Import the data shown in pictures into the two tables created.arrow_forward
- In OES4 database, we can verify the values stored in subtotal field by using the following 1: col gross_sales for 99999999 col subtotal for 99999999 select o.order_no,sum(qty*Unit_cost) Gross_Sales, sum(o.subtotal) subtotal from orders o, orderline ol, product p where o.order_no=ol.order_no and ol.product_no=p.product_no group by o.order_no; II: col gross_sales for 99999999 col subtotal for 99999999 select o.order_no,sum(qty*Unit_cost) Gross_Sales, sum(o.subtotal) subtotal from orders o, orderline ol, product p where o.order_no=ol.order_no and ol.product_no=p.product_no group by o.order_no; I & II: are correct I & II: are not correct | || I & II: are not correct I & II: are correctarrow_forward• Write a simple stored function that Takes a gender as an input ● Find the staff whose gender matches the input Return the results Write a simple stored procedure that Takes a gender as an input Find the staff whose gender matches the input • Print the resultsarrow_forwardComposite main keys have prospective keys.arrow_forward
- Task 2: The Car Maintenance team also wants to store the actual maintenance operations in the database. The team wants to start with a table to store CAR_ID (CHAR(5)), MAINTENANCE_TYPE_ID (CHAR(5)) and MAINTENANCE_DUE (DATE) date for the operation. Create a new table named MAINTENANCES. The PRIMARY_KEY should be the combination of the three fields. The CAR_ID and MAINTENACNE_TYPE_ID should be foreign keys to their original tables. Cascade update and cascade delete the foreign keys. Answer in MYSQL pleasearrow_forwardCreate table statements (file name must be: 1_create_table.txt). Make sure you specify primary keys and foreign keys. Specifying “not null” constraint is optional. Specifying “on delete action” and “on update action” are optional.arrow_forwardCreate a view vLab3_xxx in the class database list the staff who have the highest salary in each of the branch city. You will need both Staff and Branch table. The output header should be (city, name, salary) where the name is "fname lname".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