Chapter 6 SQL Databases

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/14

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 5:53 PM on 5/5/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

15 Terms

1
New cards

What is a join in relational databases?

A relational operation where two or more tables with a common domain combine into a single table/view.

2
New cards

What is an equi-join?

A join where the condition is based on equality between values in the common columns, which appear redundantly in the result table.

3
New cards

Provide an example of an equi-join SQL query.

SELECT Customer_T.CustomerID, Order_T.CustomerID, CustomerName, OrderID FROM Customer_T, Order_T WHERE Customer_T.CustomerID = Order_T.CustomerID ORDER BY OrderID.

4
New cards

What is an inner join?

Matches primary and foreign keys and only returns rows from each table that have matching rows in the other.

5
New cards

What is a natural inner-join?

An equi-join where one of the duplicate columns is eliminated in the result table.

6
New cards

What is an outer join?

A join where rows that don’t have common columns are included in the result table regardless.

7
New cards

What is a union join?

Includes all data from each table that was joined.

8
New cards

What is a left outer join?

Causes rows from the first-mentioned table to appear even if there is no corresponding data in the second table.

9
New cards

What is a self join?

Involves tables that implement 1-many unary relationships.

10
New cards

What is a subquery?

Placing an inner query (SELECT statement) inside an outer query, usually placed in the WHERE or HAVING clause of the outer query.

11
New cards

What is a noncorrelated subquery?

A subquery that does not depend on data from the outer query and is executed once for the entire outer query.

12
New cards

What is a correlated subquery?

A subquery that makes use of data from the outer query and is executed once for each row returned by the outer query.

13
New cards

List one way to improve query efficiency related to subqueries.

Limit the number of subqueries; try to make everything done in a single query if possible.

14
New cards

What is one strategy for reducing network traffic in a SQL query?

Instead of SELECT *, identify the specific attributes in the SELECT clause.

15
New cards

What can be done if data needs to be used multiple times in a database?

Make a separate query and store it as a view.