[SOLVED] COMP9311- Assignment 2

25.00 $

Programming resource
Digital learning resource
Category:
βœ“ Practical programming resource
βœ“ Suitable for guided study and reference
βœ“ Tutor guidance available when needed

Description

5/5 - (2 votes)

Question 1

Consider a relation 𝑅(𝐴, 𝐡, 𝐢, 𝐷, 𝐸, 𝐺, 𝐻, 𝐼, 𝐽) and its FD set 𝐹 = {𝐴 β†’ 𝐷𝐸, 𝐡 β†’ 𝐺𝐼, 𝐸 β†’ 𝐢𝐷, 𝐢𝐸 β†’ 𝐴𝐷𝐻, 𝐻 β†’ 𝐺, 𝐴𝐻 β†’ 𝐼}.

  • Check if 𝐴 β†’ 𝐼 ∈ F+.
  • Find a candidate key for 𝑅.
  • Determine the highest normal form of 𝑅 with respect to 𝐹. Justify your answer.
  • Find a minimal cover πΉπ‘š for 𝐹.
  • Decompose into a set of 3NF relations if it is not in 3NF step by step. Make sure your decomposition is dependency-preserving and lossless-join.

Question 2

Consider the schedule below. Here, R(*) and W(*) stand for β€˜Read’ and β€˜Write’, respectively.Β  , Β  Β , Β Β Β Β Β Β Β Β  Β Β and Β Β Β  Β represent four transactions and ti represents a time slot.

Time t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12
  R(B)         R(A) W(B)       W(A)  
                R(B)       W(B)
      R(A) W(A)                
    R(A)     W(A)       R(B) W(B)    

Each transaction begins at the time slot of its first Read and commits right after its last Write (same time slot).

Regarding the following questions, give and justify your answers.

  • Is the transaction schedule conflict serialisable? Give the precedence graph to justify your answer. (4 marks)
  • Give a serial schedule of these four transactions. (3 marks)
  • Lock the transactions Β and Β Β Β Β  Β according to the simple locking scheme. You only need to consider the order of the operations, not the timestamps. (3 marks)

 

Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.