In: Computer Science
A law firm proposed the following table to keep track the information about cases and the lawyers who handle the cases: CASE (caseNumber, caseDescription, lawyerInCharge, caseAssistant, beginningdate, endingDate, lawyerRate, accumulatedHours, clientsName., clientPhone, clientAdress, clientType, laywerPhone, caseResultDescription, clientCurrentPayment, paymentMethod, salary, bonus) Among above attributes, caseNumber, is the ID of the case lawyerInCharge is the name of the lawyer (a single person) who in charge of the case. NOTE : There may be also several staffs in the firm serve as the caseAssistant working for one LawyerInCharge in a case beginningDate, ending, Date indicate the period of the case lawyerRate, is the hourly payrate a client has to pay the firm’s service for this case. This rate depends on the case. accumulatedHours is the total hours of the client service for a case, clientType can be either individual or cooporate, laywerPhone is the phone number of the lawyerInCharge, caseResultDescription gives the description about the case result. clientCurrentPayment shows the total payment from a client currently paymentMethod can be credit card, cash or check, payment method cannot be changed once a case is on file. salary and bonus are paid to the lawyerInCharge. Bonus depends on the case, salary is not. Answer the following questions carefully a) List Function Dependencies based on above information. Also list the multivalued-depdendecy given by above narrative. b) What is the KEY for table Case? (hint: the caseID cannot be the key for above table because knowing the caseID only cannot identify the values of some other attributes in this table uniquely.) c) What normal form the table CASE is in? Why? Give a clear explanation. d) Normalize this table. Show your result.
Solution :
a) Functional dependencies are :
caseNumber, is the ID of the case.
lawyerInCharge is the name of the lawyer (a single person) who in charge of the case.
There may be also several other people in the firm serve in the same case as the caseAssistant working for one lawyerInCharge.
beginningDate, ending,Date indicate the period of the case.
lawyerRate, is the hourly payrate of the client have to pay for the firm’s service in this case. This rate depends on the case.
accumulatedHours is the total hours of the client service,
clientType can be either individual or corporate,
laywerPhone is the phone number of the lawyerInCharge,
caseResultDescription gives the description about the case result.
clientCurrentPayment shows the total payment from client.
paymentMethod can be credit card, cash or check.
salary and bonus belongs to the lawyerInCharge.
b) The key is superkey where lawyer have different cases information stored in a table.
C) it is in BCNF form
d) normalization
Step1: Check the table if it is in 1NF :
A table (relation) is in 1NF if
1. There are no duplicated rows in the table.
2. Each cell is single-valued (i.e., there are no repeating groups or arrays).
3. Entries in a column (attribute, field) are of the same kind.
Step 2 : Check table for 2NF :
A table is in 2NF if it is in 1NF and if all non-key attributes are dependent on all of the key.
Step 3 : Check table for 3NF :
A table is in 3NF if it is in 2NF and if it has no transitive dependencies.
Step 4 : Check table for BCNF
A table is in BCNF if it is in 3NF and if every determinant is a candidate key