ITPEC IP April 2024 Question 28

Topic: Databases

Which of the following is an appropriate combination of relational database manipulations I through III and relational operations?

IExtracting the specified field (column)IIExtracting the specified record (row)IIICombining multiple tables into one (1) table
OptionIIIIII

Explanation

I Projection, II Selection, III Join — the three basic relational operations take columns, take rows, and combine tables.

  • •Projection extracts the specified columns (fields) from every row, such as only ProductName and Price from a Product table: it cuts the table vertically
  • •Selection extracts the rows (records) that satisfy a condition, such as the products with a price of 100 or more: it cuts the table horizontally
  • •Join combines two or more tables into one through the columns they share, such as a foreign key in one table and the primary key of the other

Answer (c)

Why not others:

  • •(a) — Join, Projection, Selection: every operation is on the wrong item; join extracts no column, and selection combines no tables
  • •(b) — Projection, Join, Selection: I is right, but II and III are swapped; join does not extract rows
  • •(d) — Selection, Projection, Join: III is right, but I and II are swapped; selection takes rows, not columns

Key rule: Projection chooses columns, selection chooses rows, join links tables; in SQL they are the column list after SELECT, the WHERE condition, and a JOIN of tables.

Databases · AI-written, may contain errors

This question comes from an official ITPEC past paper. ITPEC Practice is an independent study tool and is not affiliated with ITPEC. See the official IP past-paper collection or Report an issue.