
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
Which of the following queries creates a Cartesian join?(refer to the tables in the JustLee Books
a. SELECT title, authorid
FROM books, bookauthor;
b. SELECT title, name
FROM books CROSS JOIN publisher;
c. SELECT title, gift
FROM books NATURAL JOIN promotion;
d. all of the above
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
- The Colombia City office of StayWell indicated that there is a new tenant by the name of Yigit Yilmaz staying at the property with an ID of 13. You need to include this new resident in the RESIDENTS table.arrow_forwardTo which table do you add a FOREIGN KEY constraint if you want to make certain every book ordered exists in the BOOKS table? ( refer to the tables in the JustLee Books database).arrow_forwardRewrite the following query with two subqueries into multicolumn subquery. The subquery should use a filtered cross join between the film and actor tables. SELECT fa.actor id fa.film_id film_actor fa fa.actor_id IN (SELECT actor id FROM actor WHERE last name FROM WHERE 'MONROE') AND fa.film_id IN (SELECT film id FROM film WHERE rating = 'PG'); The foregoing query returns the following result set, and so should the new query: | actor_id| film_id | 120 63 120 144 120 414 120 590 120 715 120 894 178 164 178 194 178 273 178 | 178 | 311 | 983 | 11 rows in set (0.09 sec)arrow_forward
- Write an SQL query that will select OrderID and OrderDate from theOrders table and OrderDetailID from the OrderDetails table. The queryshould join on the Orders table using the OrderID attribute.arrow_forwardGiven the following query:SELECT DISTINCT zip, categoryFROM customers NATURAL JOIN orders NATURAL JOIN orderitemsNATURAL JOIN books;Which of the following queries is equivalent? (refer to the tables in the JustLee Books database.)a. SELECT zip FROM customersUNIONSELECT category FROM books;b. SELECT DISTINCT zip, categoryFROM customers c, orders o, orderitems oi, books bWHERE c.customer# ¼ o.customer# AND o.order# ¼ oi.order#AND oi.isbn ¼ b.isbn;c. SELECT DISTINCT zip, categoryFROM customers c JOIN orders oJOIN orderitems oi JOIN books bON c.customer# ¼ o.customer#AND o.order# ¼ oi.order#AND oi.isbn ¼ b.isbn;d. all of the abovee. none of the abovearrow_forwardWhich type of join is demonasted by the folloing query? Select from make. model where make modelID to mode ID a) Non-Equlion b) Self Join c) Cross Join d) Equijoinarrow_forward
- Write the following as MySQL query: Find the employee ID, first and last name, and salary for each employee whose salary ismore than $20,000 or who works in the shipping department. Use the UNION set operator. List the country ID, country name, city, and state/province. Be sure all country names areincluded in the result, regardless of whether there is no matching city and state/province. You have to use an outer join.arrow_forwardEmp:- Id is Primary keyProject:- EmpId foreign key.Find out the output of the left outer join, right outer join and inner join.Take the below columns in output:-Emp table ID, name.Project table projectID, NAMEarrow_forwardWrite a SQL query to find the customer# of those customers that purchased at least once in July 2020 but NOT in August 2020. In addition to the customer#, show the ISBN and title of the book(s) they purchased in July 2020. You may use only one query. No creating any temporary tables or subqueries. You may use only joins. SUBMIT a second solution in addition to your Level 1.arrow_forward
- What is the difference between a subquery and a JOIN?arrow_forwardWhich type of constraint can be used to make certain the category for a book is included when a new book is added to inventory? ( refer to the tables in the JustLee Books database).arrow_forward2. Create a SELECT statement that returns the ORDER_NUM and PROD_ID for all records in the ORDERITEMS table. Using inner joins include the vendor name, product name and customer name for each item.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
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