Database miscellaneous


Database miscellaneous

  1. Consider a join (relation algebra) between relations r (R)and s (S) using the nested loop method. There are 3 buffers each of size equal to disk block size, out of which one buffer is reserved for intermediate results. Assuming size (r (R))< size(s (S)), the join will have fewer number of disk block accesses if









  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    NA


  1. Consider two relations R1 (A,B) with the tuples(1, 5), (3, 7) and R2 (A, C) = (1, 7), (4, 9). Assume that R(A,B,C) is the full natural outer join of R1 and R2 . Consider the following tuples of the form (A, B, C): a = (1, 5, null), b = (1, null, 7), c = (3, null, 9), d = (4, 7, null), e = (1, 5, 7), f = (3, 7, null), g = (4, null, 9). Which one of the following statements is correct?









  1. View Hint View Answer Discuss in Forum

    Correct Option: C



  1. Which of the following is NOT a superkey in a relational schema with attributes V,W, X, Y, Z and primary key V Y?









  1. View Hint View Answer Discuss in Forum

    Super key = Candidate key + other attributes. But option (b) does not include Y which is part of candidate Key.

    Correct Option: B

    Super key = Candidate key + other attributes. But option (b) does not include Y which is part of candidate Key.


  1. Consider a database that has the relation schemas EMP(EmpId, EmpName, DeptId), and DEPT(DeptName, DeptId). Note that the DeptId can be permitted to be NULL in the relation EMP. Consider the following queries on the database expressed in tuple relational calculus.
    (I) {t | ∀ u ∈ EMP(t[EmpName] = u[EmpName] ∧ v ∈ DEPT(t[DeptId] ≠ v[DeptId]))}
    (II) {t | ∀ u ∈ EMP(t[EmpName] = u[EmpName] ∧ ∃ v ∈ DEPT(t[DeptId] ≠ v[DeptId]))}
    (III) {t | ∀ u ∈ EMP(t[EmpName] = u[EmpName] ∧ ∃ v ∈ DEPT(t[DeptId] = v[DeptId]))}
    Which of the above queries are safe?









  1. View Hint View Answer Discuss in Forum

    Consider the each option.
    (i) The results empname who does not belongs to any departments.
    (ii) The results empname who does not belongs to some departments.
    (iii) The results empname who belongs to same departments. All the given queries generate finite number of tuple hence all are safe query.
    Hence, option (d) is correct.

    Correct Option: D

    Consider the each option.
    (i) The results empname who does not belongs to any departments.
    (ii) The results empname who does not belongs to some departments.
    (iii) The results empname who belongs to same departments. All the given queries generate finite number of tuple hence all are safe query.
    Hence, option (d) is correct.



  1. The following functional dependencies hold true for the relational schema R{V,W,Xt Y,Z}
    V → W
    VW → X
    Y → VX
    Y → Z
    Which of the following is irreducible equivalent for this set of functional dependencies?









  1. View Hint View Answer Discuss in Forum

    The given functional dependencies are for the relational schema R (V, W, X, Y, Z)

    Where as, W is extraneous from (VW → X)

    Where, (Y → X) is redundant functional dependence.

    It is the minimal set that cover all the given functional dependencies and it is irreducible equivalent to this given F.D.

    Correct Option: A

    The given functional dependencies are for the relational schema R (V, W, X, Y, Z)

    Where as, W is extraneous from (VW → X)

    Where, (Y → X) is redundant functional dependence.

    It is the minimal set that cover all the given functional dependencies and it is irreducible equivalent to this given F.D.