
代號:
頁次:
-
二、給予一關聯綱要(Relation Schema)GROUND(property-id, county-name,
lot-id, area, price, tax-rate),此關聯綱要記錄土地資料,包括財產編號
(property-id)、鄉鎮名稱(county-name)、地號(lot-id)、土地面積(area)、
價格(price)與稅率(tax-rate),主鍵為財產編號(property-id),並給予
一組功能依附性(Functional Dependencies){{property-id}→{county-
name, lot-id, area, price, tax-rate},{county-name, lot-id}→{property-id, area,
price, tax-rate},{county-name}→{tax-rate},{area}→{price}},關聯綱要
GROUND 是否為 2NF?如不是,會有何問題?請將 GROUND 正規化至
2NF,然後至 3NF。(25 分)
三、給予如下兩個關聯綱要(Relation Schemas),EMPLOYEE 關聯綱要記錄
員工編號(ssn)、年齡(age)及所在部門(dno),主鍵為 ssn,DEPARTMENT
關聯綱要記錄部門編號(dnum)及名稱(dname),主鍵為 dnum,其中
EMPLOYEE 的外來鍵(Foreign Key)“dno”參考到 DEPARTMENT 的主
鍵(Primary Key)“dnum”,請用 SQL GROUP BY 寫出查詢「至少兩個
人的部門,取出部門名稱及年齡大於 25 歲的人數(For each department
that has more than two employees, retrieve the department name and the
number of its employees who each is more than twenty-five years old)」。
(25 分)
四、一資料庫管理系統(DBMS)基本上包括一資料庫安全與授權子系統
(Database Security and Authorization Subsystem),負責確保對沒有授權
資料庫內容存取的安全,請論述一資料庫安全與授權子系統兩類型的資
料庫安全機制(Two Types of Database Security Mechanisms),其中對資
料庫內容的存取,在 SQL 語言中可使用何指令來設定權限,並寫出一獲
得授權存取表格的例子。(25 分)