Showing posts with label normalization questions. Show all posts
Showing posts with label normalization questions. Show all posts

Wednesday, June 19, 2024

Normalization MCQ

Normalization MCQ / Verify whether the given functional dependencies are valid or not / what is not a functional dependency / relationship between LHS and RHS attributes in a FD.


Question:



Given the instance of a relation X above, which of the following functional dependencies are TRUE with respect to X?

a) startpage à endpage

b) TR-ID à ID

c) ID à startpage endpage journal issue

d) journal issue à year


Answer: (c) ID à startpage endpage journal issue and (d) journal issue à year

 

Functional dependency: In simpler terms, a functional dependency is a constraint (condition) where the Left Hand Side (LHS) attribute(s) uniquely determine the value of Right Hand Side (RHS) attribute(s). In other words, for a given LHS attribute (or combination of attributes) value, there should be only one RHS value.

 

Let us check each of these options;

a)     Startpage à endpage. This is not a valid functional dependency (FD) because the constraint does not hold for the given instance of data (refer table). For example, in the given table, the startpage values for 5th and 6th records are same, ie., 1. As per the definition of FD, the RHS attribute cannot have more than one value. Contrast to this, we have two different values, namely 3 and 5 as endpage values. If the constraint is violated for at least one record, we cannot accept that as a valid FD.

Refer to 2nd and 3rd records where startpage is 69 and endpage is 85. That is, wherever the LHS repeats, the RHS must repeat as well. If this is TRUE for all records, then we can say that the FD holds, otherwise not.

b)     TR-ID à ID. This is not a valid FD. For an TR-ID value 98, we have two ID values 77 and 78. Hence violated.

c)      ID à startpage endpage journal issue. This is a valid functional dependency. For a given ID value, the combinations of RHS attributes values are unique.

d)     Journal issue à year. This is a valid FD. Here, for every given combination of values of attributes journal and issue, there is only one year value.

 


************************
Related posts:


Quiz questions with answers on DBMS normalization concepts

Valid functional dependencies

Find the keys of relation in DBMS

Check whether the Functional dependency is valid or not

Find the valid FDs of given relation


Saturday, July 16, 2022

RDBMS MCQ - Closure of a set of attributes is a set of attributes

 

Multiple choices questions in DBMS, Interview questions in RDBMS, Closure of a set of attributes is a set of attributes, normalization mcq, the closure of a set of attributes is neither a key nor a candidate key

RDBMS solved MCQ - The closure of a set of attributes is a set of attributes

< Previous                      

Next >

 

1. Complete the following sentence with most appropriate of the given options: “The closure of a set of attributes is a set of ________”.

a) keys

b) attributes

c) functional dependencies

d) candidate keys

Answer: (b) attributes

The closure of a set of attributes is a set of attributes only.

The closure of a set of attributes A, denoted as A+, is the set of those attributes that can be functionally determined from A. The closure is found to verify whether the set of attributes A can be a candidate key or not.

Let us discuss this statement with an example; consider a relation R(A, B, C, D) with a set of functional dependencies F = {A à B, C à D}. Now, let us find the closure of attribute A. [Refer “how to find closure” for step-by-step explanation] 

Steps for finding A+

Result = A     [from trivial FD, A à A]

            = AB   [from FD, Aà B]

Result cannot be changed further because neither A nor B nor AB determines any other attributes of R uniquely. So, the result is AB. That is, the closure of A is AB which is a set of attributes from R. Hence, the statement in the question is proved.

 



< Previous                      

Next >


************************
Related posts:


What is closure of attribute?

Closure of a set of attributes is a set of attributes

How to find the closure of a set of attributes?

Closure finding algorithm

DBMS solved MCQ; database management system MCQ solved questions

Featured Content

Multiple choice questions in Natural Language Processing Home

MCQ in Natural Language Processing, Quiz questions with answers in NLP, Top interview questions in NLP with answers Multiple Choice Que...

All time most popular contents

data recovery