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 many rows are returned in a Cartesian join between one table having 5 records and a second table having 10 records?
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
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
- Delete an employee having ID = 203 (e.g.) Commit changes if that employee’s manager id = 105 Otherwise rollback all the changes. Use Employees table.arrow_forwardUsing the Henry Books database, increase the price of book “The Fall” by 10%. You will insert 2 snips for this question.arrow_forwardWrite sql code for Use derived tables and joins to create a list of players who have scored more than 200 runs, taken more than 10 wickets, and taken more than two catches. runs is form batting wicketstaken from bowling catches is from fielding table (which is same as other tables0arrow_forward
- Question 5 Choose all the correct options about Natural JOINS? |a. The natural join does return all rows from the first table and just the rows with matching values from the second table. | b. Natural joins return only matched columns in the result set. OC. The result of the join is all rows from both tables that have equal values for all matched columns. O d. In the natural join, two tables are joined based on columns that have the same name in both tables.arrow_forwardHow many rows would be returned from a cross join of tables A and B, if A contains 8 rows and B contains 18? 8 18 26 144arrow_forwardJOIN TABLES One row in the PAT_ENC table represents one patient encounter. One row in the ORDER MED table represents one medication order. One patient encounter can have many medication orders but one medication order can only have one patient encounter. In other words, the cardinality of this PAT_ENC to ORDER_MED relationship is one-to- many. You start a query with PAT_ENC. You then add ORDER_MED using an inner join. What is true about the granularity of the result set before and after adding the ORDER_MED table? SELECT ONE OF THE FOLLOWING A. The granularity stays at one row per patient encounter. B. The granularity stays at one row per medication order. C. The granularity changes from one row per patient encounter to one row per medication order on an encounter. D. The granularity changes from one row per medication order to one row per patient encounter.arrow_forward
- Why is a CROSS JOIN not so useful? a. It nullifies all primary keys b. It is no longer supported by SQL c. It combines every row in one table with every row in another table. d. It combines all foreign keys into one table called foreign keys.arrow_forwardIn a complex join, how is the number of tables you wish to join related to the number of WHERE conditions?arrow_forwardWhen we retrieve data from 2 tables, why do we need to specify a join condition to join the tables in the Where clause?arrow_forward
- A Cartesian join between a table with 5 records and a table with 10 records returns how many rows?arrow_forwardMy SQL WORKBENCH **Please note that you may actually use as many tables as you need. You are not limited to use only twotables.Example:SELECT *FROM DEPARTMENTS;SELECT *FROM EMPLOYEES;Now join departments and employees tables.SELECT FIRST_NAME, DEPARTMENT_NAMEFROM EMPLOYEES, DEPARTMENTSWHERE EMPLOYEES.DEPARTMENT_ID = DEPARTMENTS.DEPARTMENT_ID;NOTE: If you omit the join condition, the result will be the Cartesian Product of the two tables. A CartesianProduct joins all rows of the first table with all rows of the second table.That is if the first table has n rows and the second table has m rows, the output will have n*m rows.The following query will produce a Cartesian Product:SELECT FIRST_NAME, DEPARTMENT_NAMEFROM EMPLOYEES, DEPARTMENTS;**When table names are long, qualifying column names might be very time consuming. Usually peopleprefer to use table aliases for this purpose.Example: List the name of all employees who work for 'Purchasing' departmentSELECT E.FIRST_NAME "EMPLOYEE…arrow_forwardUsing the STUDENT and PROFESSOR tables, illustrate the difference between a natural join, and equijon, and an outer join.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