武漢理工大學資料庫原理複習題中文答案整理
-
Name three sources for databases.
(1) 現存資料 (2) 新資訊系統的發展 (3) 現存資料庫的重新設計
-
Describe the characteristics of a table that make it a relation. Define the term domain and explain the significance of the domain integrity constraint to a relation.
域:描述資料表中某一屬性的取值型別和範圍 (1)域完整性是針對某一具體關係資料庫的約束條件,它保證表中某些列不能輸入無效的值 (2)域完整性指列的值域的完整性。如資料型別、格式、值域範圍、是否允許空值等 (3)域完整性限制了某些屬性中出現的值,把屬性限制在一個有限的集合中
-
Give an example of two tables that are not relations.
The table in Figure 3-7 is not a relation, because the entries for employees Caruthers and Caldera require a particular row arrangement. If the rows in this table were rearranged, we would not know which employee has the indicated Fax and Home numbers.
-
Suppose that two columns in two different tables have the same column name. What convention is used to give each a unique name?
假設兩張不同的表為T1和T2,相同的列為number,我們可以分別命名為T1.number和T2.number.
-
Must all the values in the same column of a relation have the same length?
即使一個關係的每一個單元格必須有一個單一的值,這並不意味著所有的值必須有相同的長度
-
Explain the three different sets of terms used to describe tables, columns, and rows.
由Codd的定義,大多數從業者表指的是關係,關係中的列稱為屬性,和關係中的行稱為元組
-
Explain the difference between functional dependencies that arise from equations and those that do not.
從公式中產生的函式依賴可以讓我們計算出確定的值,而不是從公式中產生的函式依賴可以讓我們知道不同關係的特徵
-
Explain the intuitive meaning of the functional dependency.
PartNumber→PartWeightPartNumber決定PartWeight
-
Explain the following statement: “The only reason for having relations is to store instances of functional dependencies.”
假設我們有一個表ObjectColor → (Weight, Shape),我們可以通過ObjectColor公式計算Weight和Shape,那麼我們就不需要這個表
-
Explain the meaning of the expression:
(FirstName, LastName) → PhoneFirstName和LastName共同決定Phone
-
What is a composite determinant?
兩列或兩列以上的決定因素
-
If (A, B) →C , then can we also say that A→C?
```
不可以
```
-
If A→ (B, C), then can we also say that A→ B?
可以
-
If it is true that
PartNumber →PartWeight
does that mean that PartNumber will be unique in a relation?不是,可能還有別的因素決定PartWeight
-
Under what conditions will a determinant be unique in a relation?
這個決定因素可以決定其他所有列
-
What is the best test for determining whether a determinant is unique?
最好的策略是考慮產生資料的業務活動的性質,並詢問使用者
-
What is a composite key?
擁有兩列或兩列以上的碼
-
What is a candidate key?
在一個關係中可以決定其他所有列的碼
-
What is a primary key? Explain the significance of the entity integrity constraint to a primary key.
在設計資料庫時,選擇一個候選碼作為主碼;實體完整性約束規定主碼不能為空值
```
20. Explain the difference between a candidate key and a primary key.
```
一張表可以有多組候選碼但是隻能有一組主碼
```
21. What is a surrogate key?
```
代理碼是人工新增到表中用作主鍵的列
```
22. Where does the value of a surrogate key come from?
```
在建立行時,DBMS為代理碼指定一個唯一且不變的值
```
23. When would you use a surrogate key?
```
當主碼冗餘且複雜時
```
24. What is a foreign key? Explain the significance of the *referential integrity constraint* to a
foreign primary key.
```
外碼是在本表中不作為碼而在另外一組關係表中作為主碼的碼;
參照完整性約束規定外碼必須存在於其作為主碼的表中或為空值。
-
What is a normal form?
正規化是符合某一種級別的關係模式的集合
-
Explain why duplicated data lead to data integrity problems.
任何具有重複資料的表都容易發生更新異常
-
What relations are in 1NF?
資料庫的每一列都是不可分割的資料項
-
Which normal forms are concerned with functional dependencies?
BCNF, 3NF and 2NF
-
What conditions are required for a relation to be in 2NF?
滿足第一正規化,且每一個非主屬性完全函式依賴任何一個候選碼
-
What conditions are required for a relation to be in 3NF?
滿足第二正規化,且資料庫表中不包含已在其它表中已包含的非主關鍵字資訊
-
What conditions are required for a relation to be in BCNF?
所有非主屬性對每一個碼都是完全函式依賴; 所有主屬性對每一個不含它的碼也是完全函式依賴; 沒有任何屬性完全函式依賴於非碼的任何一組屬性。
-
If a relation is in BCNF, what can we say about it with regard to 2NF and 3NF?
能,它既是第二正規化也是第三正規化
-
What normal form is concerned with multivalued dependencies?
4NF
-
Summarize the three categories of normalization theory.
第一個涉及函式依賴引發的異常; 第二個涉及多值依賴引發的異常; 第三個涉及資料約束和特殊條件引發的異常。
-
In general, how can you transform a relation not in BCNF into ones that are in BCNF?
```
重新設計表使所有決定因素都是候選碼
```
-
What is a referential integrity constraint? Define the term, and give an example of its use. Are null values allowed in foreign key columns with a referential integrity constrain? How does the referential integrity constrain contribute to database integrity?
參照完整性約束是對關係資料庫中建立關聯關係的資料表間資料參照引用的約束,也就是對外碼的約束; 具有參照完整性約束的外碼列中可以使用空值; 參照完整性約束可以維護表間資料的有效性。
-
Explain the role of referential integrity constraints in normalization.
以確保資料庫中儲存的資料正確、有效、相容。
-
If a determinant is part of a candidate key, is that good enough for BCNF?
不符合BC正規化
-
How does a multivalued dependency differ from a functional dependency?
在關係資料庫理論中,函式依賴是關係中來自資料庫的兩組屬性之間的約束;多值依賴是關係中兩組屬性之間的完全約束。
-
Consider the relation:
PERSON (Name, Sibling, ShoeSize)Assume that the following functional dependencies exist:
Name→→ Sibling
Name → ShoeSize
Describe deletion, modification, and insertion anomalies for this relation.具體列進行刪除修改和插入後分析
-
Place the PERSON relation in Review Question 40 into 4NF.
(Name, Sibling),(Name, ShoeSize)
-
Consider the relation:
PERSON_2 (Name, Sibling, ShoeSize, Hobby)
Assume that the following functional dependencies exist:
Name →→ Sibling
Name → ShoeSize
Name →→ Hobby
Describe deletion, modification, and insertion anomalies for this relation.具體列進行刪除修改和插入後分析
-
Place the PERSON_2 relation in Review Question 42 into 4NF.
(Name, Sibling),(Name, ShoeSize),(Name, Hobby)