Sunday, November 22, 2020

Normalization MCQ with answers in DBMS 19

Normalization in DBMS, solved exercises in DBMS, lossless join decomposition, dependency preserving decomposition, bcnf decomposition


RDBMS MCQ solved quiz and answers

1. Let us assume that a relation R (A, B, C, D, E) with set of functional dependencies F = {A BC, C D} is decomposed into relations R1 (A, B, C) and R2 (A, D, E). This decomposition is ___________.

a) Lossless join decomposition

b) Dependency preserving decomposition

c) Not a dependency preserving decomposition

d) Lossy decomposition

Answer: (a) and (c)

Common attribute between R1 and R2 is A, and, attribute A determines all attributes of R1. Hence, it is a lossless decomposition.

It is not a dependency preserving decomposition because the FD C D is lost.

Lossless join decomposition

Decomposition of relation R into R1 and R2 is said to be lossless join decomposition if one of the following holds;

  • (R1 ∩ R2) → R1
  • (R1 ∩ R2) → R2

Dependency preserving decomposition

If a relation R with set F of functional dependencies is decomposed into relations R1, R2, R3, …, Ri then the closure of set of functional dependencies for these relations should satisfy the following; 

  • (F1 U F2 U F3 U … U Fi)+ = F+ 
  • That is the closure of union of set of functional dependencies of relations R1, R2, …, Ri should be equal to the closure of set of functional dependencies F of R. In other words, all the functional dependencies in (F1 U F2 U F3 U … U Fi)+ should be in F+ also.

 

2. Let us assume that a relation R (A, B, C, D, E, F, G, H) with set of functional dependencies F = {AB E, C D, D E, FG A} is decomposed into relations R1(ABE), R2(CD), R3(FGA) and R4(BCFGH). The decomposition _____.

a) is resulted in all BCNF relations

b) is dependency preserving decomposition

c) is not a dependency preserving decomposition

d) is lossless decomposition

Answer: (a) and (c)

R1(ABE), R2(CD), R3(FGA) and R4(BCFGH). Keys are underlined. All relations are in BCNF.

The functional dependency D E is lost. Hence, decomposition of R into R1, R2, R3 and R4 is not a dependency preserving decomposition.

 

3. Consider a relation R(A, B, C, D, E) with the set of functional dependencies F = {A B, B E, E A}. Relation R is in ____.

a) Un-normalized form

b) Third Normal Form

c) Boyce-Codd Normal Form

d) Domain Key Normal Form

Answer: (b) 3NF

The candidate keys for R are ACD, BCD, and ECD.

No non-key dependencies found in R.

Hence, relation R is in third normal form.

 

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


Quiz questions with answers on DBMS introduction concepts

How many keys a leaf node can have in a B+ tree in DBMS

Find the keys of relation in DBMS

Check whether the decomposition is dependency preserving or not

Is the decomposition a lossless join decomposition

List down rules for dependency preserving and lossless join decomposition

Saturday, November 21, 2020

Machine Learning Multiple Choice Questions and Answers 22

Top 3 Machine Learning Quiz Questions with Answers explanation, Interview questions on machine learning, quiz questions for data scientist answers explained, machine learning exam questions, question bank in machine learning, classification, decision tree, two class classification, bayes net


Machine learning MCQ - Set 22

 

1. Which of the following classifiers can perfectly classify the following data?

Classification data

a) Decision tree

b) Logistic regression

c) Gaussian Naïve Bayes

d) All of the above

Click here to view answer


 

2. Which is the correct joint distribution for the following Bayesian net?

Bayes Net

a) P(A,B,C,D,E) = P(E)P(C)P(D|E)P(A|C)P(B|D,E)

b) P(A,B,C,D,E) = P(A)P(B)P(C|A)P(D|A,B,C)P(E|D)

c) P(A,B,C,D,E) = P(A)P(B)P(C)P(D)P(E)P(E|A,B,C,D)

d) P(A,B,C,D,E) = P(A)P(B)P(D|A,B,C)P(E|D)

Click here to view answer


 

3. For a two class classification problem, which among the following are true?

a) In case both the covariance matrices are spherical and equal, the within class variance term has an effect on the LDA derived direction.

b) In case both the covariance matrices are spherical and equal, the within class variance term has no effect on the LDA derived direction.

c) In case both the covariance matrices are spherical but unequal, the within class variance term has an effect on the LDA derived direction.

d) In case both the covariance matrices are spherical but unequal, the within class variance term has no effect on the LDA derived direction.

Click here to view answer


 

**********************

Related links:

Which classification algorithm can perfectly classify the given data

Define two class classification

What is the effect of 'within class variance' on LDA derived direction if both the covariance matrices are spherical

How to calculate the joint distribution of a bayes network 

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