
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
-Given the following relational DB schema and the following SQL query:
Student (sid, name, age, address)
Book(bid, title, author)
Checkout(sid, bid, date)
SELECT S.name
FROM Student S, Book B, Checkout C
WHERE S.sid = C.sid AND B.bid = C.bid AND B.author = ’Olden Fames’ AND S.age > 12
And assuming:
- There are 20, 000 Student records stored on 2000 blocks.
- There are 50, 000 Book records stored on 5, 000 blocks
- There are 300, 000 Checkout records stored on 15, 000 blocks.
- Student ages range from 7 to 24.
Using heuristic rules, show a physical query plan for this query, assuming there are no indexes and data is not sorted on any attribute.
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 with 1 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
- Simplify the following query (WHERE clause), expressed in SQL, on the example database above: SELECT ENAME, PNAME FROM EMP, ASG, PROJ WHERE (DUR > 12 OR RESP = "Analyst") AND EMP.ENO = ASG.ENO AND (TITLE = "Elect. Eng." OR ASG.PNO < "P3") AND (DUR > 12 OR RESP NOT= "Analyst") AND ASG.PNO = PROJ.PNOarrow_forwardConsider the following schema:instructor(ID, name, dept_name, salary)What is the correct SQL statement to perform a query to find the names of all instructors excluding duplicates?(a) select name from instructor;(b) select unique name from instructor;(c) select name from instructor no duplicates;(d) select distinct name from instructor;arrow_forwardWrite a SQL statement to create a table job_history including columns employee_id, start_date, end_date, job_id and department_id and make sure that, the employee_id column does not contain any duplicate value at the time of insertion and the foreign key column job_id contain only those values which are exists in the jobs table. Field EMPLOYEE_ID START_DATE END DATE JOB_ID DEPARTMENT_ID Type Decimal(6,0) Date Date Varchar(10) Decimal(4,0) Null No No No No Yes Key pk fk Default Extra Null Null Null Null Nullarrow_forward
- All parts of this question use the following database schema: Flights(flno, from, to, distance) Aircraft(aid, aname, cruisingrange) Certified(eid, aid) Employees(eid, ename, salary) c) For each cruisingrange held by at least 3 aircraft, give the lowest salary of employees certified to fly one of those aircraft. Express in SQL only:arrow_forwardConsider the following schemas: Employee(staffId, name, salary, depNo) primary key staffId foreign key depNo references Department(depNo) Department(depNo,depname, totalSal) primary key depNo and the following procedural SQL statement: CREATE TRIGGER mystery AFTER INSERT ON Employee FOR EACH ROW IF NOT (NEW.depNo IS NULL) UPDATE Department SET totalSal = totalSal + NEW.salary NEW.depNo WHERE depNo ENDIF / = Explain what this trigger does without referring to its code. Describe the effect on the database that it has.arrow_forwardPlease provide the correct sql query for the questions. Thanksarrow_forward
- We have a relational database that contains the table ‘Staff’. The table ‘Staff’ consist of columns ‘Name’, ‘Department’ and ‘Date of Joining’. What query would you use to extract the Names and Department of all staff in the table? a. SELECT * FROM Staff b. a) SELECT Name, Department FROM Staff c. SELECT Name, Department IN Staff d. SELECT * IN Staffarrow_forwardRelational Algebra Questions:Using the instance of the Airport database, formulate the following queries in the relationalalgebra: 1. List full details of all airports located outside the United States.Note: You should use the not equal sign in this query. 2. List the name and the state of all United States airports. 3. List the name and the fleet size of all carriers employing more than 50000 workers. 4. List the carrier name, the carrierID, the flightNo and the date of all flights. 5. Display the number of airports. 6. Display the number of flights with distances longer than 3000 miles. 7. Display the number of all carriers and the average of their revenues. 8. Display the number of flights leaving from JFK and the total of their distances. 9. Display the minimum, the average, and the maximum distances of the flights that arescheduled on October 17th, 2017?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