\begin{frame} \frametitle{Boyce-Codd Normal Form: Quiz} \begin{quiz}{\textwidth}{BCNF Quiz} {\small \begin{enumerate} \item Consider the relation \begin{tcenter} \vspace{-.25ex} \sql{Results(sid, exercise, points, maxPoints)} \vspace{-.25ex} \end{tcenter} with the following FDs \begin{tcenter} $ \begin{array}{rcl} \sql{sid, exercise} & \to & \sql{points} \\ \sql{exercise} & \to & \sql{maxPoints} \end{array} $ \end{tcenter} Is this relation in BCNF? \pause \item Consider the relation \vspace{-.5ex} \begin{talign} \sql{Invoice(} & \sql{invoiceNr, date, amount,} \\[-.5ex] & \sql{customerNr, customerName)} \end{talign} \vspace{-.5ex} with the following FDs \begin{tcenter} $ \begin{array}{rcl} \sql{invoiceNr} & \to & \sql{date}, \sql{amount}, \sql{customerNr} \\ \sql{invoiceNr}, \sql{date} & \to & \sql{customerName} \\ \sql{customerNr} & \to & \sql{customerName} \\ \sql{date}, \sql{amount} & \to & \sql{date} \end{array} $ \end{tcenter} Is this relation in in BCNF? \end{enumerate} } \end{quiz} %% (1) %% -- STUD_ID, EX_NO is key of RESULTS %% => first FD implied by key (lhs is key) %% => second FD not implied by key (lhs does not contain key) %% => not in BCNF (embedded function EX_NO -> MAX_POINTS) %% %% (2) %% -- INV_NO is key of INVOICE (first FD + third FD and transitivity) %% => first FD implied by key (lhs is key) %% => second FD implied by key (lhs contains key) %% => third FD not implied by key %% => fourth FD trivial (to be ignored) %% => not in BCNF (embedded function CUST_NO -> CUST_NAME) \end{frame}