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 秒完成。

想多做幾條同類題目?立即開始練習呢個課題,即做即批改。

立即練習