Database Concepts (8th Edition)
Database Concepts (8th Edition)
8th Edition
ISBN: 9780134601533
Author: David M. Kroenke, David J. Auer, Scott L. Vandenberg, Robert C. Yoder
Publisher: PEARSON
bartleby

Concept explainers

bartleby

Videos

Textbook Question
Book Icon
Chapter 5, Problem 5.35RQ

Code an SQL statement that creates a table with all columns from the parent and child tables in your answer to question 5.34. Code an SQL statement using a left outer join that creates a table with all columns from the parent and child tables. Explain the difference between these two SQL statements.

Blurred answer
07:48
Students have asked these similar questions
Write an SQL query that uses a multiple-column subquery in a FROM clause. Explain what the query is intended to do. Write an SQL query that is based on multiple tables and uses a subquery with the GROUP BY statement and HAVING clause. Explain what the query is intended to do. Write an SQL query that is based on multiple tables and uses a multiple-row subquery in a WHERE clause. The subquery will include the GROUP BY statement and another multiple-row subquery in a HAVING clause. Explain what the query is intended to do. Write an SQL query that joins three tables and uses any type of a subquery. Explain what the query is intended to do. Write an SQL query that is based on multiple tables and uses the DECODE function. Explain what the query is intended to do.
(a) What SQL statement would you use to create the table ”staff”, including specifying the primary key? (b) What SQL statement would you use to find out how many lecturers there are in the School of Computing? (c) What SQL statement would you use to list the lecturers of the modules COMP1121 and COMP1211? (d) Write an SQL statement, using the inner join construct, that will, for the lecturer John Smith, list in alphabetical order the students taking any module which he teaches. (e) What information does the output from the following SQL query provide? SELECT Lecturer, COUNT(DISTINCT Student) FROM class INNER JOIN staff ON class.Module = staff.Module WHERE Grade < 40 GROUP BY Lecturer; (f) Write an SQL query which would obtain the following information: for each lecturer, what is the average grade obtained by students across all of the modules which they have taught?
A. Write SQL statements to create a table named STUDENT, with the following columns: StdID: character field of width 10, null is not allowed AdvID: character field of width 10, null is not allowed B. Given that the STUDENT table is created in part (a), write a SQL statement to insert a constraint to STUDENT table created in part (a) to designate StdID as the primary key (Do not recreate another STUDENT since it was already done in part a).
Knowledge Booster
Background pattern image
Computer Science
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
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781305627482
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781285196145
Author:Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos Coronel
Publisher:Cengage Learning
Text book image
Oracle 12c: SQL
Computer Science
ISBN:9781305251038
Author:Joan Casteel
Publisher:Cengage Learning
SQL Basics for Beginners | Learn SQL | SQL Tutorial for Beginners | Edureka; Author: edureka;https://www.youtube.com/watch?v=zbMHLJ0dY4w;License: Standard YouTube License, CC-BY