DBMS Questions and Answers updated daily – Computer Knowledge

DBMS Questions: Solved 554 DBMS Questions and answers section with explanation for various online exam preparation, various interviews, Computer Knowledge Category online test. Category Questions section with detailed description, explanation will help you to master the topic.

DBMS Questions

21. The employee information in a company is stored in the relation

Employee(name,sex,salary,deptname)

Consider the following sql query

Select deptname from employee where sex='m' group by deptName having avg(salary)>(select avg(salary) from employee)
It returns the name of the department in which




SHOW ANSWER
Correct Ans:the average salary of male employers is more than the average salary in the company
Explanation:
Workspace



22. Consider a relational schema R= (A, B,C,D,E,F,G,H) on which of the following functional dependencies hold: { A->B, BC->D, E->C, D->A} . What are the candidates keys for R




SHOW ANSWER
Correct Ans:AEH.BEH,DEH
Explanation:
Workspace



23. Relation R is decomposed using a set of functional dependencies F, and relation S is decomposed using another set of functional dependencies G. Once decomposition is definitely BCNF , other is definitely 3 NF, but it is not known which is to make a guaranteed identification, which one of the following tests should be used on the decompositions ?( assume that the closure of F and G are available )




SHOW ANSWER
Correct Ans:Lossless join
Explanation:
We cannot use BCNF definition or the 3NF definition since if a relation is in BCNF then it is also in 3NF.. The lossless join can be individually used to identify that which decomposition is in BCNF or which is in 3 NF
Workspace



24. In the index allocation scheme of blocks to a file, the maximum possible size of the file depends on ?




SHOW ANSWER
Correct Ans:the number of blocks used for the index and the size of the blocks
Explanation:
Workspace



25. A B+ tree index is to be built on the name attribute of the relation Student. Assume that all students name are of length 8 bytes, disk blocks are of size 512 byte and index pointer are of size 4 bytes. Give this scenario, what would be the best choice of the degree




SHOW ANSWER
Correct Ans:16
Explanation:
degree= size of block/ length*size of pointer
Workspace



26. The following functional dependencies are given below

AB-> CD, AF->D, DE->F, C->G, F->E, and G->A

Which of the following option is false?




SHOW ANSWER
Correct Ans:{AF}+ = {ABCDEFG}
Explanation:
Workspace



27. The following key values are inserted into a B+ tree in which order of the internal nodes is 3, and that of the leaf nodes is 2, in the sequence below. The ordre of internal nodes is the maximum number of trees pointers in each node, and the order of leaf nodes is the maximum number of data items that can be stored in it. The B+ trees is initially empty. 10, 3, 6, 8, 4, 2, 1 The maximum number of times leaf nodes would get split up as a result of these insertions is




SHOW ANSWER
Correct Ans:2
Explanation:
Workspace



28. Given relation r(w,x) and s(y,z), the result of select distinct w,x from r,s is guaranteed to be same as r, provided




SHOW ANSWER
Correct Ans:r and s have the same number of tuples
Explanation:
distinct keyword tells that it will give duplicate entries only once and if r has duplicate entries then it will not show them more than once which tells us that if answer is to be same as r then r should not have any duplicate entries option c and d are completely wrong but in the option b its also not necessary that s must also have duplicate entries thus the answer is option a
Workspace



29. The order of a leaf node in a B+ tree is the maximum number of (value, data, record pointer) pairs it can hold. Given that the block size is 1 kb, data record pointer is byte long, the value field is 9 byte long and a block pointer is 6 byte long, what is the order of the leaf node ?




SHOW ANSWER
Correct Ans:64
Explanation:
Let the order of the leaf node is n As per given block size = 1 kb = 1024 bits 6+7n+(n-1)9 = 1024 n=64
Workspace



30. From the following instance of a relational schema R(A,B,C) We can conclude that
A B C
1 1 1
1 1 0
2 3 2
2 3 2




SHOW ANSWER
Correct Ans:A functionally determine B and B does not functionally determines C
Explanation:
Consider A and B first. Value of relation A is equal to the value of relation B as A and B follow the same pattern. The value of A does not change where the value of B does not change . Now consider B and C , value of relation B is not equal to the value of the relation B as B and C do not follow the same pattern. The value of C changes where the value of B does not change.
Workspace



31. Let E1 and E2 be two entities in an E/R diagram with simple single valued attributes. R1 and R2 are two relationships between E1 and E2, where R1 is one to many and R2 is many to many. R1 and R2 do not have any attributes of their own. What is the minimum number of tables required to represent this situation in the relational model ?




SHOW ANSWER
Correct Ans:3
Explanation:
The one to many relationships are represented with entity set from one side. This normally happens as each entity in the entity set can be associated with at most one entity of the other. Therefore the table is not formed for R1. The tables are hence, formed for R2, E1 and E2. So, there are total of 3 tables.
Workspace



32. Consider a file of 16384 records. Each record is 32 bytes long and its key field is of size bytes. The file is ordered on a non key field, and the file organization is unspanned. The file is stored in a file system with block size 1024 bytes, and the size of a block pointer is 10 bytes. If the secondary index is store the secondary index, the number of first level and second level blocks in the multi level index are respectively




SHOW ANSWER
Correct Ans:256 and 4
Explanation:
No. of records = 16384 size of records= 32 bytes Block size= 1024 We need to find the option that satisfies the condition 1024 option C satisfies the block size
Workspace



33. Suppose the adjacency relation of vertices in a graph is represented in a table Adj(X,Y) Which of the following queries cannon t be expressed by a relational algebra expression of constant length ?




SHOW ANSWER
Correct Ans:List of all vertices which belong to cycles of less than three vertices
Explanation:
Adjacency matrix is used as a mean to represent the vertices of a graph that are adjacent to which other vertices. Another matrix representation for a graph is the incidence matrix.
Workspace



34. Consider a Schema R(ABCD) and functional dependencies A->B and C->D. Then the decomposition of R into R1(AB) and R2(CD) is




SHOW ANSWER
Correct Ans:dependency preserving but not lossless join
Explanation:
Workspace



35. With regard to expressive power of the formal relational query languages, which of the following statements is true ?




SHOW ANSWER
Correct Ans:relational algebra has same power as safe relational calculus
Explanation:
Workspace



36. Relation R with an associated set of functional dependencies F, is decomposed into BCNF. The redundancy ( arising our of functional dependencies) in the resulting set of relation is




SHOW ANSWER
Correct Ans:Zero
Explanation:
since R is associated with functional dependencies, so this clearly indicates that relation R is in 3nf, The property of 3nf says that there are few or no error are left and therefore, redundancy is the resulting set of relation is negligible or 0
Workspace



37. Which of the following scenarios may lead to an irrecoverable error in a database system ?




SHOW ANSWER
Correct Ans:A transaction reads a data item after it is written by an uncommitted transaction
Explanation:
A transaction reads a data item after it is written by an uncommitted transaction.
Workspace



38. Consider the following relational schema pertaining to a student's database:

Students (rollno, name, address )
Enroll( rollno, courseno, coursename)

Where primary keys are shown in italics. The number of tuples in the student and Enroll tables are 120 and 8 respectively. What are the maximum and minimum number of tuples that can be present in (Student *Enroll) , where * denotes natural join ?




SHOW ANSWER
Correct Ans:8,8
Explanation:
* denotes the natural join So, maximum and minimum numbers of tuples that can be present in (student * Enroll) would be represented by the minimum of these min (120,8) = 8
Workspace



39. Which of the following is a key factor for preferring B+ tree to binary search trees for indexing database relations ?




SHOW ANSWER
Correct Ans:data transfer from disk is in blocks
Explanation:
Indexing is better if data blocks is large, Now, B+ trees are preferred over the binary search trees as in B+ trees, transfer of data from disk to primary memory is in form of data blocks. These transferring , information on a single block is more efficient
Workspace



40. Which of the following concurrency control protocols ensure both conflict serializability and freedom from deadlock ?
1. 2 phase locking
2. time stamp ordering




SHOW ANSWER
Correct Ans:2 only
Explanation:
Time stamp ordering ensures both conflict serializability and freedom from deadlock as time-stamp based concurrency control is a non lock concurrency control method. The method is employed in relation databases to safely handle transaction. It uses timestamp for the same.
Workspace



Are you seeking for good platform for practicing DBMS questions in online. This is the right place. The time you spent in Fresherslive will be the most beneficial one for you.

Online Test on DBMS @ Fresherslive

This page provides important questions on DBMS along with correct answers and clear explanation, which will be very useful for various Interviews, Competitive examinations and Entrance tests. Here, Most of the DBMS questions are framed with Latest concepts, so that you may get updated through these DBMS Online tests. DBMS Online Test questions are granted from basic level to complex level.

Why To Practice DBMS Test questions Online @ Fresherslive?

DBMS questions are delivered with accurate answer. For solving each and every question, very lucid explanations are provided with diagrams wherever necessary.
Practice in advance of similar questions on DBMS may improve your performance in the real Exams and Interview.
Time Management for answering the DBMS questions quickly is foremost important for success in Competitive Exams and Placement Interviews.
Through Fresherslive DBMS questions and answers, you can acquire all the essential idea to solve any difficult questions on DBMS in short time and also in short cut method.
Winners are those who can use the simplest method for solving a question. So that they have enough time for solving all the questions in examination, correctly without any tense. Fresherslive provides most simplest methods to answer any tough questions. Practise through Fresherslive test series to ensure success in all competitive exams, entrance exams and placement tests.

Why Fresherslive For DBMS Online Test Preparation?

Most of the job seekers finding it hard to clear DBMS test or get stuck on any particular question, our DBMS test sections will help you to success in Exams as well as Interviews. To acquire clear understanding of DBMS, exercise these advanced DBMS questions with answers.
You're Welcome to use the Fresherslive Online Test at any time you want. Start your beginning, of anything you want by using our sample DBMS Online Test and create yourself a successful one. Fresherslive provides you a new opportunity to improve yourself. Take it and make use of it to the fullest. GOODLUCK for Your Bright Future.


Online Test for Data Interpretation
Online Test for C Language
FreshersLive - No.1 Job site in India. Here you can find latest 2023 government as well as private job recruitment notifications for different posts vacancies in India. Get top company jobs for both fresher and experienced. Job Seekers can get useful interview tips, resume services & interview Question and answer. Practice online test free which is helpful for interview preparation. Register with us to get latest employment news/rojgar samachar notifications. Also get latest free govt and other sarkari naukri job alerts daily through E-mail...
DMCA.com Protection Status