0% found this document useful (0 votes)
70 views18 pages

DBMS Question Bank

The document is a question bank focused on Database Management Systems (DBMS), covering various topics such as functional dependencies, database definitions, types of databases, SQL queries, normalization, and ACID properties. It includes multiple-choice questions with answers and explanations for each, aimed at assessing knowledge in DBMS concepts. The questions range from basic definitions to more complex scenarios involving database design and query execution.

Uploaded by

kpu21195
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
70 views18 pages

DBMS Question Bank

The document is a question bank focused on Database Management Systems (DBMS), covering various topics such as functional dependencies, database definitions, types of databases, SQL queries, normalization, and ACID properties. It includes multiple-choice questions with answers and explanations for each, aimed at assessing knowledge in DBMS concepts. The questions range from basic definitions to more complex scenarios involving database design and query execution.

Uploaded by

kpu21195
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 18

DBMS QUESTION BANK

1.A relation R(ABC) is having the tuples(1,2,1),(1,2,2),(1,3,1) and (2,3,2). Which of


the following functional dependencies holds well?

(A) A → BC (B) AC → B (C) AB → C (D) BC → A


Ans: D

2. What is a database?
a) Organized collection of information that cannot be accessed, updated, and
managed
b) Collection of data or information without organizing
c) Organized collection of data or information that can be accessed, updated, and
managed
d) Organized collection of data that cannot be updated

Answer: c
Explanation: It is defined as an organized collection of data or information for easy
access,
updating, and management in a computer.

3. What is DBMS?
a) DBMS is a collection of queries
b) DBMS is a high-level language
c) DBMS is a programming language
d) DBMS stores, modifies and retrieves data

Answer: d
Explanation: DBMS is nothing but a storehouse wherein the authorized user can
create a
database to store, modify or retrieve the organized data in the table. It can be
modified or
retrieved by users who have access to DBMS only.

4. Who created the first DBMS?


a) Edgar Frank Codd
b) Charles Bachman
c) Charles Babbage
d) Sharon B. Codd

Comprehensive Course Work Sample Questions


Database Management System(DBMS)
Answer: b
Explanation: Charles Bachman along with his team invented the first DBMS known
as Integrated
Data Store (IDS).

5. Which type of data can be stored in the database?


a) Image oriented data
b) Text, files containing data
c) Data in the form of audio or video
d) All of the above
Answer: d
Explanation: The reason for creating the database management system was to store
large data
and these data can be of any form image, text, audio, or video files, etc. DBMS
allows the users
to store and access the data of any format.
Advertisement

6. In which of the following formats data is stored in the database management


system?
a) Image
b) Text
c) Table
d) Graph

Answer: c
Explanation: The data is stored in a table format intended to manage the storage of
data and
manipulate stored data to generate information.

7. Which of the following is not a type of database?


a) Hierarchical
b) Network
c) Distributed
d) Decentralized

Answer: d
Explanation: Different types are:
1) Centralized
2) Distributed
3) Relational
4) NoSQL

5) Cloud
6) Object-oriented
7) Hierarchical
8) Network

8. Which of the following is not an example of DBMS?


a) MySQL
b) Microsoft Acess
c) IBM DB2
d) Google

Answer: d
Explanation: MySQL, Microsoft Access, IBM DB2 are database management
systems while
Google is a search engine. MySQL is a Linux-based database management system,
Microsoft
Access is a tool that is a part of Microsoft Office used to store data, IBM DB2 is a
database
management system developed by IBM. Google’s Bigtable is the database that runs
Google’s
Internet search, Google Maps, YouTube, Gmail, and other products.

9. Which of the following is a feature of DBMS?


a) Minimum Duplication and Redundancy of Data
b) High Level of Security
c) Single-user Access only
d) Support ACID Property
Answer: c
Explanation: The important features of a database management system are:
1) Minimum Duplication and Redundancy of Data
2) High Level of Security
3) Mulitple-user Access
4) Support ACID Property
Advertisement

10. Which of the following is a feature of the database?


a) No-backup for the data stored
b) User interface provided
c) Lack of Authentication
d) Store data in multiple locations
View Answer
Answer: b
Explanation: The important features are:
11) Provides backup for the data stored by the user and the user can retrieve the
data whenever
required.
2) Provides User-interface to access the data.
3) Only authorized users can access the stored data.
4) Data is stored in one central location but multiple authorized users can access the
data.

12. Let E1, E2 and E3 be three 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, R2 is many-to-many. R3 is another relationship between E2 and E3 which is
many-to-many. R1, R2 andR3 do not have any attributes of their own. What is the
minimum number of tables requiredto represent this situation in the relational model?
(A) 3
(B) 4
(C) 5
(D) 6
Answer C
Solution :total number of tables required is 3 (for entities) + 2 (for relationships) =5.

13. It is given that: “Every student need to register one course and each course
registered bymany students”, what is the cardinality of the relation say “Register”
from the “Student”entity to the “Course” entity in the ER diagram to implement the
given requirement.
(A) M:1 relationship
(B) M:N relationship
(C) 1:1 relationship
(D) option (B) or(C)
Answer A
Solution: the cardinality of the relationship from the "Student" entity to the "Course"
entity is such that each student can be associated with multiple courses (M),
but each course is associated with only one student (1). This results in an M:1
relationship.

14. Consider the relation branch( branch_name, assets, branch_city)

SELECT DISTINCT T.branch_name FROM branch T, branch S WHERE T.assets >


L.assets AND S.branch_city = "TVM" .

The given query finds the names of


(A) All branches that have greater assets than all branches located in TVM.
(B) All branches that have greater assets than some branch located in TVM.
(C) The branch that has the greatest asset in TVM.
(D) Any branch that has greater asset than any branch located in TVM.
Answer B
Solution: The query compares each branch's assets with at least one branch
located in TVM. If a branch's assets are greater than those of any branch in TVM, it
will be selected.

15. Consider the following relation instance, where “A1” is primary Key.

A1 A2 A3 A4
1 1 1 Null
5 2 5 1
9 5 13 5
13 13 9 15
Which one of the following can be a foreign key that refers to the same relation?
(A) A2
(B) A3
(C) A4
(D) ALL
Answer B
Solution:From the instance, attribute A3w seems to uniquely identify each row in the
relation. No two rows have the same combination of values in A3.

16.User can specify general constraints in queries with the help of


a)Normalization
b)assertion
c)insertion
d)sub-queries
Answer:B
Solution:Assertions are SQL constructs used to define conditions that must hold
true for data to be entered or updated in a database. They are used to enforce
business rules or integrity constraints beyond what can be achieved through simple
column constraints or foreign key constraints.

17.A table product conatins 10 record.It ha a column price which is defined as


UNIQUE.The SQL statement

SELECT COUNT(*) FROM PRODUCT WHERE PRICE > ANY(SELECT PRICE


FROM PRODUCT)

a)0

b)1

c)10
d)9

answer:A

Solution:the condition PRICE > ANY(SELECT PRICE FROM PRODUCT)


compares each price in the PRODUCT table with any price in the same table.If any
price in the table is greater than at least one other price in the table, the row will be
selected.Since the PRICE column is defined as UNIQUE, there can't be any price
that is greater than any other price in the same column.Therefore, the count of rows
satisfying this condition will always be 0.

Hence, the correct answer is (a) 0.

18.4NF is meant to handle

a)Atomic attributes

b)Multivalued dependency

c)Multiple keys

d)Transitive dependency

Answer :B

Solution:4NF aims to eliminate redundancy caused by multivalued dependencies. It


does this by decomposing relations with multivalued dependencies into smaller,
more meaningful relations.

19.Foreign key is the one in which the________ of one relation is referenced in


another relation.

a)Primary key

b)Super key

c)Degree

d)domain

Answer:A

20. Once the user has been notified that the transaction has completed,the
updatesto the database by the transaction must persist even if there are software or
hardware failures

this requirement is known as

a)Atomicity

b)Durability
c)Isolation

d)Consistency

Answer:B

Solution:Durability: Once a transaction has been committed, its effects are


permanent and will persist in the database, even in the event of system crashes or
failures.

21.A term saying no two transaction to be executed concurrently is referred as

a)Durability

b)Isolation

c)Atomicity

d)Inconsistency

Answer: Isolation

22. What does the query do

UPDATE STUDENT

SET marks=marks*1.10

a)It increases the marks of all students by 10%

b) It increases the marks of all students by 110%

c) It decreases the marks of all students by 90%

d)It is syntatically wrong.

Answer:A

23.If every non prime attribute is fully functionally dependent on primary key, then the
relation will be in

a)BCNF

b)1NF

c)2NF

d)3NF

Answer:2NF

Solution: NF ensures that all attributes in a relation that are not part of the primary
key are dependent on the entire primary key, rather than only part of it.
24.Consider the join of the relation R and S .if R has M tuples and S has N
tuples ,what is the maximum and minimum size of join

a)m+n and 0

b)mn and 0

c)min and |m-n|

d)mn and m+n

Answer :B

25. The traditional storage of data organized by the customer, stored in separate
folders in filing
cabinets is an example of ______________ type of ‘database’ management system.
a) Object-oriented database management system
b) Relational database management system
c) Network database management system
d) Hierarchical database management system
Answer: d
Explanation: In an object-oriented database management system, the data is stored
in the form
of objects. In a relational DBMS, the data is stored in the form of tables. Hierarchy is
obtained by
Parent-Child Relationship. Parent-Child Relationship Type is basically a 1:N
relationship.

26.Evaluate the statements issued by the DBA in the given sequence if OE and
SCOTT are the
users and the ORDERS table is owned by OE.
CREATE ROLE r1;
GRANT SELECT, INSERT ON oe. orders TO r1;
GRANT r1 TO scott;
GRANT SELECT ON oe. orders TO scott;
REVOKE SELECT ON oe.orders FROM scott;
What would be the outcome after executing the statements?
a) The REVOKE statement would give an error because the SELECT privilege has
been granted to
the role R1
b) The REVOKE statement would remove the SELECT privilege from SCOTT as
well as from the
role R1
c) SCOTT would be able to query the OE.ORDERS table
d) SCOTT would not be able to query the OE.ORDERS table
Answer: c
Explanation: To perform operations on objects, the REVOKE statement is used to
revoke rights
from a single user or role, or from all users.

27. Which of the following represents a query in the tuple relational calculus?
a) { }{P(t) | t }
b) {t | P(t)}
c) t | P() | t
d) All of the mentioned
Answer: b
Explanation: A nonprocedural query language is the tuple relational calculus. It
specifies the needed information but does not provide a detailed strategy for
obtaining it.

28. Which of the following establishes a top-to-bottom relationship among the items?
a) Relational schema
b) Network schema
c) Hierarchical schema
d) All of the mentioned
Answer: c
Explanation: A data model in which the data is structured into a tree-like structure is
known as a hierarchical model. The structure allows information to be represented
using parent-child
Relationships.

29. Amongst the ACID properties of a transaction, the Durability' property requires,
that the changes made to the database by a successful transaction persist

a) Except in case of an operating system crash

(b) Except in case of a disk crash

c) Except in case of a power failure

(d) Always, even if there is a failure of any kind

ans) d) Always, even if there is a failure of any kind.


emphasizes that durability is not conditional on the type of failure. Whether it's an
operating system crash, a disk crash, a power failure, or any other unexpected event,
the database system must ensure that the committed changes are durable and are
not lost.

30.What does the following query do?

UPDATE student
SET marks marks* 1.10;
a) It increases the marks of all the students by 10%

(b) It decreases the marks of all the students by 90%

c) It increases the marks of all the students by 110%

(d) It is syntactically wrong

The correct option is:

(c) It increases the marks of all the students by 110%

The query is updating the 'marks' column in the 'student' table by multiplying each

existing value by 1.10, which is equivalent to increasing the marks by 10%.

30.. Suppose that we have an ordered file with r30,000 records stored on a disk with block

size B = 1024 bytes. File records are of fixed size and are unspanned, with record length R =

100 bytes. The blocking factor and the number of blocks needed for the file are

a) 10 and 3000

(b) 3000 and 10

c) 10 and 300

(d) 8 and 3000

ans) 3000 and 10


The blocking factor (bfr) is the number of records that can fit in one block. It is
calculated using the formula:

\text{Blocking Factor (bfr)} = \frac{\text{Block Size}}{\text{Record Size}}

Blocking Factor (bfr)=Record Size/Block Size


In this case:

\text{Blocking Factor (bfr)} = \frac{1024 \text{ bytes}}{100 \text{ bytes}} =


10

Blocking Factor (bfr)=1024 bytes/100 bytes =10

Now, the number of blocks (b) needed for the file is calculated using the formula:

\text{Number of Blocks (b)} = \frac{\text{Number of Records}}{\


text{Blocking Factor}}

Number of Blocks (b)=Number of Records/Blocking Factor

Given that there are 30,000 records and the blocking factor is 10:

\text{Number of Blocks (b)} = \frac{30,000}{10} = 3,000

Number of Blocks (b)=30,000/10 =3,000

So, the blocking factor is 10, and the number of blocks needed for the file is 3,000.

31.If every non-prime attribute is fully functionally dependent on the primary key, then
therelation will be in

a) BCNF

(b) 2NF

c) INF

(d) 3NF

The correct answer is:

(b) 2NF

In the context of normalization, 2NF (Second Normal Form) requires that the relation
be in 1NF and that no non-prime attribute is partially dependent on any candidate
key. If every non-prime attribute is fully functionally dependent on the primary key, it
implies that the relation satisfies the requirements of 2NF.
32.Consider the relation scheme R = (E, F, G, H, I, J, K, L, M, N) and the set of
functional dependencies {{E,F} → {G}, {F} → {I,J}, {E,H} → {K,L}, {K} → {M),
{L} → {N}} on R.What is the key for R?c)d) {E}

a) {E,F)

b) {E,F,H}

c) {E,F,H,K,L}

d) {E}

ans)et's find the key for the relation


R = (E, F, G, H, I, J, K, L, M, N)

R=(E,F,G,H,I,J,K,L,M,N) using the closure of attribute sets with respect to the


given set of functional dependencies:

(E, F, H, K, L}

E^+ = \{E\}

● E
● +
● ={E}
● F^+ = \{F\}
● F
● +
● ={F}
● H^+ = \{H\}
● H
● +
● ={H}
● K^+ = \{K\}
● K
● +
● ={K}
● L^+ = \{L\}
● L
● +
● ={L}
● EF^+ = \{E, F, G, I, J\}
● EF
● +
● ={E,F,G,I,J} (using {E, F} → {G} and {F} → {I, J})
● EFH^+ = \{E, F, G, H, I, J, K, L\}
● EFH
● +
● ={E,F,G,H,I,J,K,L} (using {E, H} → {K, L})
● EFHKL^+ = \{E, F, G, H, I, J, K, L, M, N\}
● EFHKL
● +
● ={E,F,G,H,I,J,K,L,M,N} (using {K} → {M} and {L} → {N})
● The closure contains all attributes.

The smallest superkey is {E, F, H, K, L}, so it is the key for the relation. Therefore, the
correct option is:

(c) {E, F, H, K, L}

33..Consider the join of a relation R with a relation S. If R has m tuples and S has n tuples then
the

maximum and minimum sizes of the join respectively are

a) m +n and 0

b) mn and 0

c) m+n and|m-n

d) mn and m + n

The correct option is:

d) mn and m + n
34. In the relational model, cardinality is termed as:

A. A number of tuples.

35.Relational calculus is a:

A. Non-Procedural language.

36.The view of total database content is

A.Conceptual view

37.Cartesian product in relational algebra is

A.a Binary operator.

38.DML is provided for

A.Manipulation & processing of the database.

39.‘AS’ clause is used in SQL for

A.Rename operation.

40.ODBC stands for

A.Open Database Connectivity.

41.Architecture of the database can be viewed as

A.three levels.

42.In a relational model, relations are termed as

A.Tables

43.The database schema is written in


A.DDL

44.In the architecture of a database system external level is the

A.view level.

45.In Hierarchical model records are organised as

A.Tree

46.Which of the following relations cannot be decomposed into BCNF with a lossless
join and dependency-preserving decomposition?

a)R (ABCDE) {AB → C, BC → A, AC → B, B → D, D → E}

b)R (A BC D) {AB → B, C → D}

c)R (A B C D) {AB → C, C → AD}

d)R (ABCDE) {AB → C, C → D, D → E, E → A}


Ans c. R (A B C D) {AB → C, C → AD}

47
In the context of a relational database, what is the purpose of normalization?
a. Increase redundancy
b. Enhance data integrity
c. Speed up query execution

d. Minimize storage space

48
Which of the following is not a property of a transaction in a DBMS?
a. Atomicity
b. Consistency
c. Isolation

d. Flexibility

49
What is the primary function of the SQL SELECT statement in a relational database?
a. Insert new records
b. Update existing records
c. Retrieve data from tables

d. Delete records from tables

50
In the context of DBMS, what does the term "ACID" stand for?
a. Atomicity, Consistency, Isolation, Durability
b. Association, Compatibility, Integration, Durability
c. Aggregation, Concurrency, Isolation, Durability

d. Atomicity, Completeness, Isolation, Durability

51
Which normal form ensures that there are no transitive dependencies in a relation?
a. First Normal Form (1NF)
b. Second Normal Form (2NF)
c. Third Normal Form (3NF)

d. Boyce-Codd Normal Form (BCNF)

60
What is the purpose of an index in a database?
a. Ensure referential integrity
b. Speed up data retrieval
c. Store primary keys

d. Implement encryption

61
Which SQL clause is used to filter the results of a SELECT statement based on a
specified condition?
a. GROUP BY
b. HAVING
c. WHERE
d. ORDER BY

62
In the context of a DBMS, what is the role of a transaction log?
a. Store user credentials
b. Record changes made to the database
c. Define database schema

d. Manage user permissions

63
What is the purpose of the FOREIGN KEY constraint in a relational database?
a. Ensure unique values in a column
b. Enforce referential integrity between tables
c. Define a primary key for a table

d. Specify the order of columns in a table

64
In the relational model, what is a tuple?
a. A column of a table
b. A row of a table
c. An attribute of a table

d. A key of a table

65
Durability property of transactions is enforced by
(A) User
(B) Recovery subsystem
(C)Concurrency control subsystem
(D) DB administrator

Ans B
Explanation: The recovery system is responsible for the maintenance of durability. In
addition, it also ensures atomicity.
66
'n transactions can be scheduled in how many ways?
A)N
(B)n!
(O)n-1
(D)n+1

67 Consider the two statements below:


S1:Every view serializable schedule is also conflict serializable
S2 : Every conflict serializable schedule is also view serializable
Pick the correct option
(A) Both S1 and S2 are false
(B) Both S1 and S2 are true
(C) S1 is true but not S2
(D) S2 is true but not SI

68
The collection of tuples stored in a database at a particular moment is called
(A)Schema
(B) View
(C) Instance
(D)Relation

43 Which of the following is free from deadlocks?


(A) Strict 2PL (2 phase locking)
(C) Basic 2PL
(B) Conservative 2PL
(D)None of these
44
Consider a schedule
Ri(A), R2(B), W2(B). R*A). W.(A RI(B). R;(B). R2(A), W2(A)
The schedule is
(A)Conflict serializable
(B)View serializable
(C)Both (A) and (B)
(D)Not serializable

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy