IPA FE Subject A sample Question 21

Topic: Databases

A question IPA Japan published in 基本情報技術者試験 科目A サンプル問題 問21, translated into English. ITPEC is based on the same exams.

Which of the following is an appropriate description concerning views in an RDBMS?

Explanation

A view is a named derived table — a view stores no rows of its own; it is a query over other tables, given a name so it can be used like a table.

A base table holds the stored data. A derived table is the result of a query (selection, projection, join and so on) over base tables or other derived tables. CREATE VIEW names such a query; whenever the view is used, the DBMS runs the query against the current contents of the tables beneath it, so the view always shows the latest data without storing a copy.

Answer (a)

Why not others:

  • •(b) — a view's query may read other views as well as base tables, so views can be defined on views
  • •(c) — the query a view names must refer to tables that already exist, so the base tables come first and the view after them
  • •(d) — any number of views can be defined on one base table, each showing different columns or rows of it to different users

Key rule: A view is a virtual table: a stored, named query over base tables (or other views) whose rows are worked out each time it is used.

Databases · AI-written, may contain errors

This question comes from the past questions IPA Japan publishes, translated into English by ITPEC Practice. ITPEC Practice is an independent study tool and is not affiliated with IPA or ITPEC. See the original paper (PDF) or Report an issue.