Database Set 3 (30 mcqs)

1. Two main measures for the efficiency of an algorithm are
a) Processor and memory
b) Complexity and capacity
c) Time and space
d) Data and space

2. Functional dependencies are a generalization of
a) Key dependencies
b) Relation dependencies
c) Database dependencies
d) None of the mentioned

3. The space factor when determining the efficiency of algorithm is measured by
a) Counting the maximum memory needed by the algorithm
b) Counting the minimum memory needed by the algorithm
c) Counting the average memory needed by the algorithm
d) Counting the maximum disk space needed by the algorithm

4. Which of the following case does not exist in complexity theory
a) Best case
b) Worst case
c) Average case
d) Null case

5. The Worst case occur in linear search algorithm when
a) Item is somewhere in the middle of the array
b) Item is not in the array at all
c) Item is the last element in the array
d) Item is the last element in the array or is not there at all

6. The Average case occur in linear search algorithm
a) When Item is somewhere in the middle of the array
b) When Item is not in the array at all
c) When Item is the last element in the array
d) When Item is the last element in the array or is not there at all

7. The complexity of the average case of an algorithm is
a) Much more complicated to analyze than that of worst case
b) Much more simpler to analyze than that of worst case
c) Sometimes more complicated and some other times simpler than that of worst case
d) None of the mentioned

8. The complexity of linear search algorithm is
a) O(n)
b) O(log n)
c) O(n2)
d) O(n log n)

9. The complexity of Binary search algorithm is
a) O(n)
b) O(log )
c) O(n2)
d) O(n log n)

10. The complexity of Bubble sort algorithm is
a) O(n)
b) O(log n)
c) O(n2)
d) O(n log n)

11. A __________ is a special kind of a store procedure that executes in response to certain action on the table like insertion, deletion or updation of data.
a) Procedures
b) Triggers
c) Functions
d) None of the mentioned

12. Trigger are supported in
a) Delete
b) Update
c) Views
d) All of the mentioned

13. The CREATE TRIGGER statement is used to create the trigger. THE _____ clause specifies the table name on which the trigger is to be attached. The ______ specifies that this is an AFTER INSERT trigger.
a) for insert, on
b) On, for insert
c) For, insert
d) Both a and c

14. What are the after triggers ?
a) Triggers generated after a particular operation
b) These triggers run after an insert, update or delete on a table
c) These triggers run after an insert, views, update or delete on a table
d) Both b and c

15. The variables in the triggers are declared using
a) –
b) @
c) /
d) /@

16. The default extension for an Oracle SQL*Plus file is:
a) .txt
b) .pls
c) .ora
d) .sql

17. Which of the following is NOT an Oracle-supported trigger?
a) BEFORE
b) DURING
c) AFTER
d) INSTEAD OF

18. What are the different in triggers ?
a) Define, Create
b) Drop, Comment
c) Insert, Update, Delete
d) All of the mentioned

19. Triggers ________ enabled or disabled
a) Can be
b) Cannot be
c) Ought to be
d) Always

20. Which prefixes are available to Oracle triggers?
a) : new only
b) : old only
c) Both :new and : old
d) Neither :new nor : old

21. Which normal form is considered adequate for normal relational database design?
a) 2NF
b) 5NF
c) 4NF
d) 3NF

22. Consider a schema R(A, B, C, D) and functional dependencies A -> B and C -> D. Then the decomposition of R into R1 (A, B) and R2(C, D) is
a) dependency preserving and lossless join
b) lossless join but not dependency preserving
c) dependency preserving but not lossless join
d) not dependency preserving and not lossless join

23. Relation R with an associated set of functional dependencies, F, is decomposed into BCNF. The redundancy (arising out of functional dependencies) in the resulting set of relations is
a) Zero
b) More than zero but less than that of an equivalent 3NF decomposition
c) Proportional to the size of F+
d) Indeterminate

24. Which one of the following statements about normal forms is FALSE?
a) BCNF is stricter than 3NF
b) Lossless, dependency-preserving decomposition into 3NF is always possible
c) Lossless, dependency-preserving decomposition into BCNF is always possible
d) Any relation with two attributes is in BCNF

25. A table has fields F1, F2, F3, F4, and F5, with the following functional dependencies:
F1->F3
F2->F4
(F1,F2)->F5
in terms of normalization, this table is in
a) 1NF
b) 2NF
c) 3NF
d) None of the mentioned

26. Which of the following is TRUE?
a) Every relation in 2NF is also in BCNF
b) A relation R is in 3NF if every non-prime attribute of R is fully functionally dependent on every key of R
c) Every relation in BCNF is also in 3NF
d) No relation can be in both BCNF and 3NF

27. Consider the following functional dependencies in a database.
Date_of_Birth->Age Age->Eligibility
Name->Roll_number Roll_number->Name
Course_number->Course_name Course_number->Instructor
(Roll_number, Course_number)->Grade
The relation (Roll_number, Name, Date_of_birth, Age) is
a) In second normal form but not in third normal form
b) In third normal form but not in BCNF
c) In BCNF
d) None of the mentioned

28. The relation schema Student_Performance (name, courseNo, rollNo, grade) has the following FDs:
name,courseNo->grade
rollNo,courseNo->grade
name->rollNo
rollNo->name
The highest normal form of this relation scheme is
a) 2NF
b) 3NF
c) BCNF
d) 4NF

29. The relation EMPDT1 is defined with attributes empcode(unique), name, street, city, state, and pincode. For any pincode,there is only one city and state. Also, for any given street, city and state, there is just one pincode. In normalization terms EMPDT1 is a relation in
a) 1NF only
b) 2NF and hence also in 1NF
c) 3NF and hence also in 2NF and 1NF
d) BCNF and hence also in 3NF, 2NF and 1NF

30. Which one of the following statements if FALSE?
a) Any relation with two attributes is in BCNF
b) A relation in which every key has only one attribute is in 2NF
c) A prime attribute can be transitively dependent on a key in a 3 NF relation.
d) A prime attribute can be transitively dependent on a key in a BCNF relation.

Answers
1-c 2-a 3-a 4-d 5-d
6-a 7-a 8-b 9-c 10-a
11-c 12-b 13-c 14-b 15-b
16-b 17-d 18-b 19-a 20-c
21-d 22-d 23-b 24-c 25-a
26-c 27-d 28-b 29-b 30-d

Sharing is caring!

Leave a Comment

Your email address will not be published. Required fields are marked *

shares