二、假設現有如下戶外場地管理資訊的關連式資料庫,當場地有人使用時, 會安排工作人員負責使用場地的維護,請使用 SQL 回答相關的子問題。
Worker(wID, name, deptID)
FKs: deptID ref.
Department(dID) Department(dID, name, managerID, numberOfPG_inCharge)
FKs: managerID ref.
Worker(wID) CKs: name Playground(pID, name, type, chargePerHour, location, manageDept)
FKs: manageDept ref. Department(dID)
UseStatus(playgroundID, workerID, date, startHour, numHours)
FKs: playgroundID ref. Playground(pID), workerID ref. Worker(wID) 假設場地的最早開放時間為早上八點,最晚可以開始使用的時間為下午 四點,每次使用的時數最多為四個小時;所有資料欄位不允許空白。