expected questions for dbms

8
Branch: MECH1 Sub: DBMS Semester: 3rd PREPARED BY: ASST.PRFO.SANTOSH KUMAR RATH Short type Question: (With chapter) 1. What is the difference between a primary key and a candidate key? [Introduction to database system] 2. Mention the various categories of Data Model. [ Data Model] 3. Define: Entity Type, Entity Set and Value Set. [ER model] 4. What is the difference between multi valued and derived attributes? [ ER model] 5. Differentiate between procedural and non procedural language with example. [Query language] 6. What is generalization? How it differs from specialization? [ER model] 7. Draw the ER diagram for the following entity sets. Movies (Title, year, length, film type) And Stars(name, address) [ER model] 8. What is isolation and concurrent access in DBMS? 9. What do you mean by schema and instances? 10. What is the difference between physical data independence and logical data independence? 11. Differentiate between foreign Key and references. [ER model] 12. Find the tuple calculus representation for the following SQL query : Select R1.A, R2.B from R1, R2 whereR1.b=R2.a;[Query languages] 13. What is the need of DBMS? [Introduction to database system] 14. What do you mean by data integrity? [Introduction to database system] 15. What is ER model? [ER model] 16. What do you mean by weak entity set? [ ER model] 17. What are the different aggregate functions in SQL? [Query languages] 18. Define query language. [Query Languages] 19. What is the job of DBA? [Database languages] 20. What are the different levels of data abstraction? How those are linked with data dependence? [Introduction to database system] 21. Define integrity rules and constraints.[ ER model] 22. Give an example of a weak entity set and explain why it is weak. [ER model] 23. What are the differences between Relational algebra and relational calculus? [ Database languages] 24. Write down two DML statements for database recovery and explain it.[Database languages] 25. Let R=(A,B,C,D) and functional dependencies (1) A->C, (2) AB->D. What is the closure of {A,B} ? [ Database design] 26. What do you mean by multi-valued dependency? [ Database design] 27. Define and differentiate between Natural Join and Inner Join. [ Database design] 28. Consider a multilevel index with fan-out=4 used to index 25 records, draw the structure. (1) A->C, (2) AB->D. What is the closure of {A, B}? [ Database design] 29. For a relation R(A,B,C,D) with the dependency among numeric field values: 6= 2A + B and 9 = 2E. Draw the E-R diagram. [ Database design] 30. What is a query tree? Draw the query tree for the following SQL query: Select R1 .A, R2.B from R1, R2 where R1. b=R2.a; [ Query processing] 31. For, the following set of dependencies :

Upload: santosh-rath

Post on 24-May-2015

141 views

Category:

Engineering


5 download

TRANSCRIPT

Page 1: Expected questions for dbms

Branch: MECH1 Sub: DBMS Semester: 3rd PREPARED BY: ASST.PRFO.SANTOSH KUMAR RATH

Short type Question: (With chapter)

1. What is the difference between a primary key and a candidate key? [Introduction to database system]

2. Mention the various categories of Data Model. [ Data Model] 3. Define: Entity Type, Entity Set and Value Set. [ER model] 4. What is the difference between multi valued and derived attributes? [ ER model] 5. Differentiate between procedural and non procedural language with example. [Query language] 6. What is generalization? How it differs from specialization? [ER model] 7. Draw the ER diagram for the following entity sets.

Movies (Title, year, length, film type)

And Stars(name, address) [ER model] 8. What is isolation and concurrent access in DBMS? 9. What do you mean by schema and instances? 10. What is the difference between physical data independence and logical data independence? 11. Differentiate between foreign Key and references. [ER model] 12. Find the tuple calculus representation for the following SQL query :

Select R1.A, R2.B from R1, R2 whereR1.b=R2.a;[Query languages] 13. What is the need of DBMS? [Introduction to database system] 14. What do you mean by data integrity? [Introduction to database system] 15. What is ER model? [ER model] 16. What do you mean by weak entity set? [ ER model] 17. What are the different aggregate functions in SQL? [Query languages] 18. Define query language. [Query Languages] 19. What is the job of DBA? [Database languages] 20. What are the different levels of data abstraction? How those are linked with data dependence?

[Introduction to database system] 21. Define integrity rules and constraints.[ ER model] 22. Give an example of a weak entity set and explain why it is weak. [ER model] 23. What are the differences between Relational algebra and relational calculus? [ Database languages] 24. Write down two DML statements for database recovery and explain it.[Database languages] 25. Let R=(A,B,C,D) and functional dependencies

(1) A->C, (2) AB->D. What is the closure of {A,B} ? [ Database design] 26. What do you mean by multi-valued dependency? [ Database design] 27. Define and differentiate between Natural Join and Inner Join. [ Database design] 28. Consider a multilevel index with fan-out=4 used to index 25 records, draw the structure. (1) A->C,

(2) AB->D. What is the closure of {A, B}? [ Database design] 29. For a relation R(A,B,C,D) with the dependency among numeric field values: 6= 2A + B and 9 = 2E.

Draw the E-R diagram. [ Database design] 30. What is a query tree? Draw the query tree for the following SQL query: Select R1 .A, R2.B from R1,

R2 where R1. b=R2.a; [ Query processing] 31. For, the following set of dependencies :

Page 2: Expected questions for dbms

Branch: MECH1 Sub: DBMS Semester: 3rd PREPARED BY: ASST.PRFO.SANTOSH KUMAR RATH

{A -> BC, B-> D,C -> DE, BC ->F} Find primary key of the relation. [ Database design]

32. What do you mean by RAID? [ Database design] 33. What is fully functional dependency? Give an example. [ Database design] 34. What is multivalued dependency? [ Database design] 35. What are the two techniques to prevent deadlock? [Concurrency control] 36. What is meant by Concurrency? [Concurrency control] 37. What do you mean by atomicity? Explain with example. [Transaction processing] 38. What is meant by two phase commit protocol? [Concurrency control] 39. Explain one of the pessimistic concurrency control scheme with example. [Concurrency control] 40. What is the difference between REDO and UNDO operation? [Database recovery] 41. What is mean by concurrency? [Concurrency control] 42. What do you mean by serializability in transaction processing? [Concurrency control] 43. What do you mean by ACID properties of a transaction? [Transaction processing] 44. For the following operations:

T1 : read (x) ;

x=x+10;

write(x);

T2: read(x);

read(x);

For simultaneous execution Which problem can happen? [Transaction processing]

45. What is a timestamp? If TS (Ti)>TS (Tj)then which transaction is younger? Justify. Consider TS (Ti) is the timestamp of transaction Ti. [Transaction processing]

46. What is serial schedule? [Transaction processing] 47. What is transaction atomicity? [Transaction processing] 48. What is two phase locking? [Concurrency control] 49. What is canonical cover? Explain with example.

Page 3: Expected questions for dbms

Branch: MECH1 Sub: DBMS Semester: 3rd PREPARED BY: ASST.PRFO.SANTOSH KUMAR RATH

1. Define entity, attribute and relationships as used in relational databases. Describe purpose of E-R Model. Illustrate your answer with an example. [ER model]

Long Questions:

2. What are the major components of the relational model? What is simple relational database ?What are

two models in which you can use SQL ? [Data model]

3. What is an object-oriented database? What are its advantages compared ‘to relational database?

Explain some applications where an object-oriented database may be useful. [Introduction to database system]

4. Consider the following tables :

A B C 3 7 9 8 6 5

Show the semantics and the output of the following query : SELECT * FROM S, R WHERE S.A = R.A AND S.B = R.G ; [Database languages]

5. List out the fundamental operators and additional operators in relational algebra. [Relational algebra]

6. Explain the two conditions needed for the set difference operation (union operation) to be valid. [Relational algebra]

7. List at least four advantages of using a database management system over a traditional file management system. Are there any disadvantages of DBMS?[Introduction to database system]

8. What is abstraction? Is it necessary for database system? Explain how database architecture satisfies abstraction at various levels .[Introduction to database system]

9. Draw the ER diagram for the following relations. Courses (Number, Room). Is it a weak entity set. Depts (Name, BOD) Lab-courses(computer alocation)

Theory-courses (name, faculty_ name) [ER model]

A F G 5 8 1 8 2 6

Page 4: Expected questions for dbms

Branch: MECH1 Sub: DBMS Semester: 3rd PREPARED BY: ASST.PRFO.SANTOSH KUMAR RATH

10. Consider the set of relations :

Student(name, roll,mark) Score(roll,grade) Details(name,address)

For the following query:

"Find name & address of students scoring grade 'A'," Represent it in relational algebra, tuple calculus, domain calculus, QBE and SQL. [Query languages] eps to

11. What is a constraint? Describe its types with examples. [ER model] 12. A person can have many cars. A particular brand of car can have many owners. Draw the ER diagram

and convert it to Relational model. [ER model]

13. Draw a network model for the above problem in question 2(a) and explain.[Datamodel]

14. Describe the database architecture and explain the role of different users with respect to that architecture. [Introduction to database system]

15. Consider the following relations: EMPLOYEE(empno, name, office, age) BOOKS(isbn, title, author, publisher) LOAN(empno, isbn, date) Write the following quries in relational algebra:

i. Find the name of the employees who have borrowed more than 5 books published by pearson.

ii. Find the name of employees who have borrowed all books published by pearson [Database languages]

16. What is database? Explain DBMS system architecture. [Introduction to database system]

17. Draw an ER diagram for banking system. [ER model]

18. Let the following relation schemas be given:

R=(A, B, C)

S=(D, E, F)

Let relations r(R) and s(S) be given. Give an expression in SQL that is equivalent to each of the following queries:

i. πA(r) ii. r * s [Query Languages]

Page 5: Expected questions for dbms

Branch: MECH1 Sub: DBMS Semester: 3rd PREPARED BY: ASST.PRFO.SANTOSH KUMAR RATH

19. Differentiate between the following terms: i. Relational and object oriented data models

iii. Data definitions and Data manipulation languages [ Introduction to database system]

20. Write short notes on the following: A. Network Model B. RAID C. 5NF D. Data warehousing E. Data mining F. OLAP G. OLTP H. Dependency preservation

21. What is normalization of relation? What is a key attribute in a relation? What is the difference between 1st Normal Form, 2nd normal form and 3rd normal form? [Database design]

22. State Armstrong’s axioms. Show that Armstrong’s axioms are complete. [Query processing]

23. Explain the difference between inner join and outer join. What are the restrictions on using outer join? Give examples to support your answer. [Query processing]

24. What does the term redundancy mean? Discuss the implications of redundancy in a relational database. [Database design]

25. Define (i) Primary key, and (ii) Foreign key, Suppose relation R(A,B,C,D,E) has functional dependencies:

{AB ->C , D ->A, AE ->B, CD -> E, BE ->D}

Find all the candidate keys of R. [Database design]

26. Suppose we have the following relation with given data as:

Roll_no Student_name Subject_code Subject_name Marks

Page 6: Expected questions for dbms

Branch: MECH1 Sub: DBMS Semester: 3rd PREPARED BY: ASST.PRFO.SANTOSH KUMAR RATH

101 Aasish S01 English 80

101 Aasish S02 Physics 56

101 Aasish S03 Chemistry 63

102 Sushmita S01 English 90

102 Sushmita S02 Physics 85

102 Sushmita S03 Chemistry 91

To avoid redundancy in the first proposal we have decomposed the relation in to the following relations.

Subject (Roll_no, student_name)

And subject(subject_code, subject_name, marks))

In the second proposal it is decomposed in to the following relations.

Student(Roll_no, Student_name)

Result(Roll_no,subject_code, marks)

Subject(Subject_code, Subject_name)

State whether the decompsition are lossless or lossy. [Database design]

27. What is normalization? Is it necessary for DBMS? Expalin 4NF and 5NF with example. [Database design]

28. Consider the three relations given below.

Order(order_no, order_date, customer_no )

Order_item(Order_no, item_no, quantity, bill_amount)

Item (item_no, item_name, unit_price) State whether the following relations are in 3NF or not if not then what steps you should follow to bring those in to 3NF? [5][Database design]

What is query optimization? Write the Heuristic optimization algorithm and solve the query given below:

Find the names of employees work on project name “NASA” and born after 1956.

Project (project name, Project number, Dept)

Page 7: Expected questions for dbms

Branch: MECH1 Sub: DBMS Semester: 3rd PREPARED BY: ASST.PRFO.SANTOSH KUMAR RATH

Employee (Emptied, P_number, DOB, name)

Work on (P_no, Emp_id) [Database design]

29. Let us consider a relation with attributes A, B, C, D, E and F. Suppose that this relation has the FD AB->, BC->AD, D->E and CF->B . What Is the closure of {A,B} that is {AB}+ [Database design]

30. Consider the following set of data items :

A B C D A1 1 X1 D1 A2 2 X2 D2 A3 3 X3 D3 A3 3 X3 D3

Represent it in 3NF [Database design]

31. What is the difference between 4NFand BCNF? Describe with examples. [Database design]

32. Write short notes on multivalued dependencies. [Database design]

33. Explain Armstrong’s axioms with examples. [Database design]

40. What is normalization? Why it is required? Explain the Boyce-Codd normal form with an example.

[Database design]

42. Define transaction. Explain different states of a transaction. Differentiate between chained transaction

and nested transaction. Discuss their advantages and disadvantages. [Data mining]

43. What do you mean by concurrent operations? List two disadvantages of it. Discuss the solutions for

the problem occurs due to concurrency. [Concurrency control]

44. Explain the ACID properties associated with database transaction s. What is the lost update problem? [Transaction processing]

45. What is collision? Discuss the various collision resolution techniques. [Database recovery]

46. What do you mean by Locking? Explain the Two phase locking with an example.

[Concurrency control]

Page 8: Expected questions for dbms

Branch: MECH1 Sub: DBMS Semester: 3rd PREPARED BY: ASST.PRFO.SANTOSH KUMAR RATH

47. Give an account of various types of database failure and methods to recover data. Explain with

examples. [Database recovery]

48. Describe various locks under concurrency control.[Concurrency control]

49. Define transaction. Explain ACID properties with example. [Transaction processing]

50. What do you mean by a transaction? How can you implement atomicity in transactions? Explain. [Transaction processing]

51. Describe the concept of serializability with suitable example. [Transaction processing]

52. State the types of database failure and explain the corresponding database recovery technique.

[Database recovery]