DBMS Questions and Answers updated daily – Computer Knowledge



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

DBMS Questions

1. Select name, course_id
from instructor, teaches
where instructor_ID= teaches_ID;
This Query can be replaced by which one of the following ?



SHOW ANSWER
Correct Ans:Select name, course_id from instructor natural join teaches;
Explanation:


2. What will be the number of columns and rows respectively obtained for the operation, AB, if A B are Base union compatible and all the rows of a are common to B? Assume A has 4 columns and 10 rows; and B has 4 columns and 15 rows



SHOW ANSWER
Correct Ans:4,0
Explanation:


3. The relation book (title, price) contains the titles and prices of different books. Assuming that no two books have the same price, what does the following SQL query list?

select title
from book as B
where (select count(*)
from book as T
where T.price > B.price) < 5



SHOW ANSWER
Correct Ans:Titles of the five most expensive books
Explanation:


4. Consider the following relational schemes for a library database:

Book (Title, Author, Catalog_no, Publisher, Year, Price)
Collection (Title, Author, Catalog_no)
with in the following functional dependencies:

I. Title Author --> Catalog_no
II. Catalog_no --> Title Author Publisher Year
III. Publisher Title Year --> Price
Assume {Author, Title} is the key for both schemes.

Which of the following statements is true?



SHOW ANSWER
Correct Ans:Book is in 2NF and Collection is in 3NF
Explanation:


5. Consider two transactions T1 and T2, and four schedules S1, S2, S3, S4 of T1 and T2 as given below:
T1 = R1[X] W1[X] W1[Y]
T2 = R2[X] R2[Y] W2[Y]
S1 = R1[X] R2[X] R2[Y] W1[X] W1[Y] W2[Y]
S2 = R1[X] R2[X] R2[Y] W1[X] W2[Y] W1[Y]
S3 = R1[X] W1[X] R2[X] W1[Y] R2[Y] W2[Y]
S1 = R1[X] R2[Y]R2[X]W1[X] W1[Y] W2[Y]
Which of the above schedules are conflict-serializable?



SHOW ANSWER
Correct Ans:S2 and S3
Explanation:


6. Database table by name Loan_Records is given below.

Borrower Bank_Manager Loan_Amount
Ramesh Sunderajan 10000.00
Suresh Ramgopal 5000.00
Mahesh Sunderajan 7000.00

What is the output of the following SQL query?

SELECT Count(*)
FROM ( (SELECT Borrower, Bank_Manager
FROM Loan_Records) AS S
NATURAL JOIN (SELECT Bank_Manager,
Loan_Amount
FROM Loan_Records) AS T );



SHOW ANSWER
Correct Ans:5
Explanation:


7. Consider the following transactions with data items P and Q initialized to zero:
T1: read (P) ;
read (Q) ;
if P = 0 then Q : = Q + 1 ;
write (Q) ;
T2: read (Q) ;
read (P) ;
if Q = 0 then P : = P + 1 ;
write (P) ;
Any non-serial interleaving of T1 and T2 for concurrent execution leads to



SHOW ANSWER
Correct Ans:A schedule that is not conflict serializable
Explanation:


8. Which of the following statements are TRUE about an SQL query?

P: An SQL query can contain a HAVING clause even if it does not a GROUP BY clause
Q: An SQL query can contain a HAVING clause only if it has a GROUP BY clause
R: All attributes used in the GROUP BY clause must appear in the SELECT clause
S: Not all attributes used in the GROUP BY clause need to appear in the SELECT clause



SHOW ANSWER
Correct Ans:P and S
Explanation:


9. In SQL, relations can contain null values, and comparisons with null values are treated as unknown. Suppose all comparisons with a null value are treated as false. Which of the
following pairs is not equivalent?



SHOW ANSWER
Correct Ans:x < 5, not(x = 5)
Explanation:


10. Given relations 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 has no duplicates and s is non-empty
Explanation:


11. Given the following relation instance.
x y z
1 4 2
1 5 3
1 6 3
3 2 2
Which of the following functional dependencies are satisfied by the instance?



SHOW ANSWER
Correct Ans:YZ -> X and Y -> Z
Explanation:


12. 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. RI 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:


13. Let R is a relation schema, R(A, B, C, D) and F = {A —> B, B --> C, C —> A) is the set of functional dependency. Determine the key of relation ?



SHOW ANSWER
Correct Ans:D
Explanation:
Rule to find out the key in relation :-

Key ---> Rest of Attributes

1) As Key determines rest of the attributes

2) Key must include all attributes but can not be on RHS of any functional dependency i.e Only fields on RHS are determined.

3) An undetermined field must be in the key.

4) REST must include all attributes but NOT on LHS They don't determine anything so they can not be part of key.

5) If field is not in ANY FD, it must be part of the key

Now considering these 5 points we get D as Key.


14. The following functional dependencies hold for relation R(A, B, C) and S(B, D, E) B —> A, A —> C , the relation R contains 200 tuples and relation S contains 100 tuples. What is maximum number of tuples possibles in natural join R and S ?



SHOW ANSWER
Correct Ans:100
Explanation:


15. A file manipulation command that extracts some of the records from a file is called



SHOW ANSWER
Correct Ans:SELECT
Explanation:


16. THE RELATIONAL SCHEMA STUDENT PERFORMANCE(NAME, COURSENO, ROLLNO, GRADE) HAS THE FOLLOWING FUNCTIONAL INDEPENDENCE
NAME, COURSENO -> GRADE
ROLLNO,COURSENO -> GRADE
NAME-> ROLLNO
ROLLNO->NAME
THE HIGHEST NORMAL FORM OF THIS RELATION SCHEME IS



SHOW ANSWER
Correct Ans:3NF
Explanation:
1 NF says that the attributes should not be repeated. Here we can see that the attributes are not repeated. Condition is satisfied hence the relation schema is in 1 NF, 2nf says there should not be any partial dependency. Here it can be seen that there is no partial dependency. Condition is satisfied and hence the relation is in 2NF. Last two lines of code show transitive dependency hence it is in 3nf


17. Which of the following statements is false ?



SHOW ANSWER
Correct Ans:A prime attribute can be transitively dependent on a key in a BCNF relation
Explanation:
a prime attribute can be transitively dependent on a key in a BCNF relation is false as this is a feature of 3nf and not BCNF


18. R(ABCD) is a relation. Which of the following does not have a lossless join, dependency preserving BCNF decomposition ?



SHOW ANSWER
Correct Ans:AB->C, C->AD
Explanation:


19. In SQL relations can contain null values, and comparisons with null values are treated as unknown. Suppose all comparisons with a null value are treated as false. Which of the following pairs is not equivalent ?



SHOW ANSWER
Correct Ans:x=!5 not (x=5)
Explanation:


20. The order of an internal node in a B+ tree index is the maximum number of children it can have . Suppose that a child pointer takes 6 bytes, the search field value takes 14 bytes, and the block size is 512 bytes. What is the order of the internal node ?



SHOW ANSWER
Correct Ans:26
Explanation:
(x-1)14+6x<=512 x=26





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.


FreshersLive - No.1 Job site in India. Here you can find latest 2018 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.