Unit 4: Database Joins - Subjective Questions

CAP570 — Advanced Database Techniques • Practice Questions with Detailed Answers

20 questions

1

Define a database join. Explain why joins are needed in a relational database.

2

Explain the concept of a join condition. What happens when an appropriate join condition is omitted?

3

Describe the working of an INNER JOIN with syntax and an appropriate example.

4

Explain a LEFT OUTER JOIN. How does it differ from an INNER JOIN?

5

Describe a RIGHT OUTER JOIN with an example. How can it be rewritten as a LEFT JOIN?

6

Compare INNER JOIN, LEFT JOIN, and RIGHT JOIN in terms of matched and unmatched rows.

7

What is a SELF JOIN? Explain its use with an employee-manager relationship.

8

Construct and explain a query using a SELF JOIN to find pairs of employees who work in the same department.

9

Explain how joins are performed across three tables. Develop a query that displays customers, their orders, and the products ordered.

10

Discuss the effect of placing a filter condition in the ON clause versus the WHERE clause of a LEFT JOIN.

11

Define a database view. Explain its major characteristics and uses.

12

Explain how to create, query, replace, and delete a view using SQL commands.

13

Distinguish between a view and a base table.

14

What is an updatable view? Discuss the conditions that commonly determine whether a view can be updated.

15

Define a database transaction and explain the ACID properties.

16

Explain the purposes of COMMIT, ROLLBACK, and SAVEPOINT in transactional control.

17

Develop a transaction for transferring an amount between two bank accounts. Explain how errors should be handled.

18

Explain transaction states from the beginning of a transaction until it is committed or rolled back.

19

Discuss common concurrency problems in transactions and explain how transaction isolation helps control them.

20

Explain how joins, views, and transactions can be combined in a database application. Illustrate with an order-processing scenario.