Showing posts with label Database Quizzes. Show all posts
Showing posts with label Database Quizzes. Show all posts

Normal forms and normalization MCQ

Multiple choice questions with answers explained on the concepts Normal forms and normalization, Normalization quiz with answers



Quiz


1. Carefully observe the relational schema given below, and select one of the following that would violate the 2NF property?
Student (Register_No, Name, Phone, Branch, Course_No, Course_Name)
(a) Register_No, Name
(b) Course_No, Course_Name
(c) Register_No, Phone
(d) Phone, Branch
Why? – It is very evident that course_name is dependent on attribute course_no, and register_no, course_no would be the primary key for this relation. Hence, course_name shows partial dependency. But, no partial dependency is permitted for a relation to be in 2NF.

2. The rule that a value of a foreign key must appear as a value of some specific table is
called a ______
(a) Referential integrity
(b) Entity integrity
(c) Unique integrity
(d) Dependent integrity
Why? – For referential integrity to hold in a relational database, any field in a table that is declared a foreign key can contain either a null value, or only values from a parent table’s referenced columns (primary key or candidate keys). In other words, when a foreign key value is used it must reference a valid, existing primary key in the parent table.

3. For a relation R with schema R (A, B, C, D), let us assume that A is the primary key. And, R consists of the set of functional dependencies F = {A B, A → C, AB → C, C D}. Which of the following would violate the 3NF rule?
(a) AB → C
(b) C D
(c) A → BCD
(d) None of the above
Why? – 3NF – “no non-key attribute should depend on another non-key attribute” (i.e, no Transitive dependency). In this question, a non-key attribute D is fully functionally dependent on another non-key attribute C. Hence, it violates 3NF.

4. For a relation R (A, B, C, D), we assume that the key is (A, B), a composite key. With this information, we would say which of the following is TRUE for R.
(a) R may be in 2NF
(b) R may be in 3NF
(c) R may be in BCNF
(d) Not enough information
Why? – The only information given is the primary key of the table. And the primary is a composite key. Hence, we would say that the table can be in 2NF. We need the set of functional dependencies for deciding further.

5. Consider a relation R (A, B, C) with F = {A B, C B}. Assume that we decompose R into R1 (A, B) and R2 (A, C). Which of the following is TRUE for this case?
(a) R1 and R2 are in BCNF
(b) Dependency preserving decomposition
(c) R1 and R2 are in 3NF
(d) All of the above
Why? – If we have a relation with just two attributes we cannot look for partial key dependency, non-key dependency, or multiple candidate keys. Hence, the relation is in 3NF and BCNF.
The decomposition given above is not dependency preserving decomposition. Because, the decomposition results in elimination of C B.










Database management systems quiz questions with answers 1

DBMS quiz with answers / Database Management Systems Basics Quiz / DBMS Multiple choice questions


Quiz


1. The row/tuple of a relational table is called as an entity _________.
(a) Instance
(b) Attribute
(c) Model
(d) Relationship
2. Relational calculus is a ________
(a) Procedural language
(b) Non-Procedural language
(c) Data Definition language
(d) High level language
3. SQL is a _____________
(a) Procedural language
(b) Non-Procedural language
(c) Data Definition language
(d) High level language
4. Cartesian product (X) operation in relational algebra is ________
(a) an unary operator
(b) a binary operator
(c) both (a) and (b)
(d) not an operator
5. A database schema can be written in ________
(a) DML (Data Manipulation Language)
(b) DDL (Data Definition Language)
(c) DCL (Data Control Language)
(d) TCL (Transaction Control Language)
6. Which of the following is the advantage of relational database model?
(a) Structural dependence
(b) Conceptual complexity
(c) Complex database design
(d) Easier database design
7. A relational database management system is a single data repository in which data _______ is maintained.
(a) independence
(b) dependence
(c) complexity
(d) None of the above
8. Relational algebra is a _________
(a) Procedural language
(b) Non-Procedural language
(c) Data Definition language
(d) High level language
9. Which of the following is the external level of database architecture?
(a) Physical level
(b) Logical level
(c) View level
(d) All of the above
10. An entity set that does not have enough _________ to form a _______ is a weak entity set.
(a) attribute, primary key
(b) records, foreign key
(c) records, primary key
(d) attribute, foreign key



Go back to DBMS Quizzes/MCQs page






Fragmentation in Distributed Database - Quiz

Database System Architectures - Quiz


1. What are the advantages of Replication of data in Distributed database?
    Avaliability, Parallelism, Increased data transfer
    Availability, Parallelism, Reduced data transfer
    Availability, Increased parallelism, Cost of updates
    All of the above

2. A fragmentation technique wherein every tuple of a table is assigned to one or more fragments as a result of fragmentation is called ________________ .
    Vertical Fragmentation
    Horizontal Fragmentation
    Hybrid Fragmentation
    None of the above

Assume a relation EMP as given below:
                EMP(EmpNo, EName, Job, Sal, Department)
Furthermore, assume that there are two applications which are accessing the above mentioned table. One application typically retrieves information about employees who earn more than Rs5.000, the other application typically manages information about 'clerks' (job). Also, assume that there are employees with other designations and different salaries stored in EMP. With this information, answer the questions 3 to 6.

3. Which of the following are the simple predicates which can be directly extracted from the given applications?
    {Job = clerk, Salary>5000}
    {Job = clerk, Salary<5000 br=""> {Job = Manager, Salary>5000}
    {Job = Manager, Salary<5000 ul="">
    4. How many valid minterm predicates we can derive for the above said problem?
      4
      5
      3
      2

    5. Assume that the departments are 'Finance', 'Production', and 'Design'. If there is one more application which accesses the informatoin frequently based on the 'Finance' department, what would be the number of valid minterm fragments?
      5
      6
      7
      8

    6. If by mistake, I miss one of the valid minterm fragments. What would be the effect of that in fragmentation?
      Causes skew
      Reconstruction of EMP will be unsuccessful
      Slows down the database access
      None

    7. Which of the following failures are unique to distributed database systems?
      Failure of a site
      Loss of messages
      Network Partition
      All the above

    8. For the given set of simple predicates Pr, how many min-term predicates we can derive (including invalid ones). Pr = {Branch = “Vellore”, Branch = “Chennai”, Salary <=20000, Salary > 20000} Assumptions: Consider there are five different branches.
      4
      8
      16
      32

    9. In a distributed database application, if we have very many number of read only queries than update queries then ______________ allocation technique is advantageous.
      Hybrid Fragmentation
      Horizontal Fragmentation
      Replication
      Vertical Fragmentation

    10. Which of the following would be the advantage of Database Fragmentation?
      Most of the operations are local to any sites
      Reduced Network Traffic
      Parallel processing
      All the above

    Score =

    Correct answers:

Database Management Systems - Relational Algebra quiz

Database management system quiz - DBMS quiz with answers - DBMS multiple choice questions - DBMS basics quiz - DBMS interview questions - Relational Algebra quiz in DBMS - Relational Algebra operations in Database interview questions



Let us use the following relations R and S to answer the questions 1 – 10s;
A
B
3
3
6
4
2
3
3
5
3
6
B
C
D
5
1
6
3
3
5
4
3
1
1. Compute R S. Which of the following records will be in the result? Assume each record has the schema (A, B, C, D).
(a) (3, 3, 1, 6)
(b) (6, 4, 4, 1)
(c) (2, 3, 3, 5)
(d) (3, 5, 3, 1)
2. Compute R R.A<S.C S. [this is theta join]. Which of the following records will be in the result? Assume each record has the schema (A, B, C, D).
(a) (2, 3, 3, 5)
(b) (6, 4, 4, 1)
(c) (6, 4, 3, 1)
(d) (3, 5, 1, 6)
3. Compute R R.B < S.D AND R.A<S.C S. [this is theta join]. Which of the following records will be in the result? Assume each record has the schema (A, B, C, D).
(a) (3, 3, 3, 5)
(b) (6, 4, 3, 1)
(c) (2, 3, 3, 5)
(d) (3, 5, 1, 6)
4. Compute π C, D (S). Which of the following records will be in the result?
(a) (5, 1)
(b) (4, 3)
(c) (3, 3)
(d) (3, 5)
5. Compute π B, C (R S). Which of the following records will be in the result?
(a) (6, 4)
(b) (4, 3)
(c) (5, 1)
(d) (5, 3)
6. Compute π B (R) - π B (S). Which of the following records will be in the result?
(a) (6)
(b) (4)
(c) (1)
(d) (5)
7. Compute π B (R) ∩ π B (S). Which of the following records will be in the result?
(a) (6)
(b) (1)
(c) (2)
(d) (5)
8. Compute R S. Which of the following records will be in the result? Assume each record has the schema (A, B, C, D).
(a) (3, 3, 1, 6)
(b) (6, 4, 4, 1)
(c) (3, 5, 1, 6)
(d) (3, 5, 3, 1)
9. Compute π B (R) U π B (S). Which of the following records will be in the result?
(a) (6)
(b) (1)
(c) (2)
(d) (5)
10. Assume a relation R(A, B) with n unique records, and a relation S(B, C) with m unique records. When you compute the natural join between R and S you shall get r records as the result. Which of the following assumptions are correct in terms of (n, m, r)?
(a) (5, 4, 25)
(b) (2, 3, 8)
(c) (3, 3, 10)
(d) (2, 3, 6)





Go to QUIZZ in Database / DBMS / Advanced DBMS page









Popular Posts