Surgeons identified by doctor ID (DOCID) operate on patients identified by patient ID (PATID) in operating theaters identified by room numbers (ROOMNO). Each surgeon can operate on a number of patients each day, but an operating theatre can be used only once on any given date. The type of the operation (OPTYPE) performed by a surgeon on a patient and its outcome (OPRESULT) and the date of the operation (OPDATE) is recorded. Each operation is performed by a single surgeon on a single patient.
Given the relation:
OPERATIONS(DOCID, PATID, ROOMNO, OPDATE, OPTYPE, OPRESULT)
i) identify the functional dependencies for the relation OPERATIONS
ii) give relation key(s)
iii) give the highest normal form of relation OPERATIONS
Briefly explain the need for the BCNF Normal form and give an example of a relation that is in 3NF, but not in BCNF. Avoid using the example(s) given in lectures.
For relation R(Q, R, S, T); and functional dependencies F = {Q -> S, S -> Q, R -> T}, find the relation key(s) and give the highest normal form for R.