Cambridge International AS Level · Computer Science (9618)

Databases:練習問題

その場で採点される選択問題 5 問と、解説つきの記述問題 5 問。すべて「Databases」からの出題です。

10 問28 無料・登録不要
問 1
1

Which of the following is a primary limitation of using a file-based approach compared to a relational database for data storage and retrieval?

問 2
1

A developer is using Data Definition Language (DDL) to create a new table. Which SQL statement correctly defines a table named Staff with an integer ID and a variable character name?

問 3
1

In a database with referential integrity enforced, what happens if a user attempts to delete a record from a parent table that is still referenced by a foreign key in a child table?

問 4
1

Which of the following data types is most appropriate for a field that stores whether a student has paid their tuition fees or not?

問 5
1

In a relational database, what is the effect of applying an index to a field like CustomerLastName?

問 6
2

When using Data Definition Language (DDL), which SQL keyword is used to permanently remove an entire table structure and all its data from the database?

まず自分で答えを書いてから、解説と照らし合わせましょう。

問 7
3

In a relational database, what is the role of a secondary key?

まず自分で答えを書いてから、解説と照らし合わせましょう。

問 8
6

Write a single SQL DDL statement to modify an existing table named Student by adding a new foreign key ClassID that references the Class table.

まず自分で答えを書いてから、解説と照らし合わせましょう。

問 9
7

A company uses a database to track its sales and inventory. Two of the tables in the database are PRODUCT and CATEGORY. Every product belongs to exactly one category, while a category can contain many products.

a) Define the term foreign key and identify which table should contain it in this scenario. (2 points)
b) Explain the importance of referential integrity when a user attempts to delete a record from the CATEGORY table. (2 points)
c) Write an SQL query to display the ProductName and the CategoryName for all products where the Price is greater than 100. Assume the primary keys are ProductID and CategoryID respectively. (3 points)

まず自分で答えを書いてから、解説と照らし合わせましょう。

問 10
5

A retail company stores sales data in a table that is currently in First Normal Form (1NF). The table structure is:
SALES(StoreID, ProductID, StoreLocation, ProductName, UnitPrice, QuantitySold)

a) Explain why this table is not in Second Normal Form (2NF), referring specifically to partial functional dependencies. (3 points)
b) Redesign the data into a set of tables that are in 2NF. (2 points)

まず自分で答えを書いてから、解説と照らし合わせましょう。

※ thinkaのコンテンツはAIにより生成されているため、内容が正確でない場合があります。補助教材としてご使用いただき、公式の教材と合わせてご確認ください。

模範解答は見ました。次はあなたの答案を採点します。

このページは良い答案の形を示せますが、あなたの答案に何が足りないかは教えられません。thinka は実際の採点基準に沿って記述答案を約 15 秒で採点します。

同じような問題をもっと解きたい?このトピックの新しい問題を、解きながら採点。

練習を始める