5.重新載圖 5、 考慮底下左、右兩段以 C 語言撰寫的程式碼。若分別在兩者的 main 裡面的 swap 的前後,
加上一樣的程式碼印出 a 和 b 的值,則在之後的四個選項當中,何者的敘述最為正確?
(A)左右兩邊印出來的內容會是一樣的,而左右兩邊的 swap 函數都可以交換各自的 main
裡面的 a 和 b 的值,也就是兩者都是成功的
(B) 左右兩邊印出來的內容會是一樣的,而左右兩邊的 swap 函數都無法交換各自的 main
裡面的 a 和 b 的值,也就是兩者都是失敗的
(C) 左右兩邊印出來的內容會不一樣,左邊印出來的內容會看到其 swap 確實交換了 main
裡面的 a 和 b 的值,但右邊印出來的內容看不到這個結果
(D)左右兩邊印出來的內容會不一樣,右邊印出來的內容會看到其 swap 確實交換了 main
裡面的 a 和 b 的值,但左邊印出來的內容看不到這個結果
17.17、 Which of the following belongs to the conceptual data model?
(A)Hierarchical data model (B) Network data model
(C) Relational data model (D) Entity relationship model
PRODUCT 主鍵:P_NUM
P_NUM
(產品代碼)
P_NAME
(產品名稱)
P_PRICE
(產品進貨價格)
V_NUM
(廠商代碼)
19.19、 Which of the following is not correct?
(A)A transactional database is a type of databases that support a company’s day-to-day
operations.
(B) Data warehouse can support high level management to make strategic decisions.
(C) A distributed database consists of data located at different sites.
(D) A transactional databases stores historical data.
20.20、 Which of the following descriptions about secondary key is not correct?
(A)Secondary key is not necessary unique.
(B) Secondary key cannot be a foreign key.
(C) Secondary key is used for data retrieval purpose.
(D)Secondary key can be a single attribute.
40.40、Which of the following descriptions about foreign key are not correct?
(A) Foreign key must refer to the primary key of other relation.
(B) Foreign key is not necessary a primary key in its own relation.
(C) Foreign key must have the same name as the primary key it refers to.
(D) Foreign key cannot have null value.
41.41、Which of the following descriptions about key are not correct?
(A) Primary key must be a composite key and cannot be a simple key.
(B) Superkey, candidate key and primary key can all uniquely identify any given entity (row).
(C) Primary key is not a minimal superkey.
(D) There might be more than one candidate key in a relation.
44.44、關於資料庫交易(transaction)的 ACID 特性,下列哪些敘述是恰當的?
(A) A 是指一個交易具有不可分割性
(B) C 是指如果一個交易執行成功(且不被其他交易干擾),那麼在交易執行之前與完成之
後,資料庫都會是處於合法(valid)、一致(consistent)狀態
(C) I 是指即使多個交易同時執行,每個交易的執行都必須是獨立的
(D) D 是指一個交易提交(commit)後,其結果就必須要存在資料庫裡面