DBMS Question Bank
DBMS Question Bank
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.
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.
Answer: d
Explanation: Different types are:
1) Centralized
2) Distributed
3) Relational
4) NoSQL
5) Cloud
6) Object-oriented
7) Hierarchical
8) Network
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.
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.
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.
a)0
b)1
c)10
d)9
answer:A
a)Atomic attributes
b)Multivalued dependency
c)Multiple keys
d)Transitive dependency
Answer :B
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
a)Atomicity
b)Durability
c)Isolation
d)Consistency
Answer:B
a)Durability
b)Isolation
c)Atomicity
d)Inconsistency
Answer: Isolation
UPDATE STUDENT
SET marks=marks*1.10
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
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
UPDATE student
SET marks marks* 1.10;
a) It increases the marks of all the students by 10%
The query is updating the 'marks' column in the 'student' table by multiplying each
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
c) 10 and 300
Now, the number of blocks (b) needed for the file is calculated using the formula:
Given that there are 30,000 records and the blocking factor is 10:
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
(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}
(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
a) m +n and 0
b) mn and 0
c) m+n and|m-n
d) mn and m + n
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.
A.Conceptual view
A.Rename operation.
A.three levels.
A.Tables
A.view level.
A.Tree
46.Which of the following relations cannot be decomposed into BCNF with a lossless
join and dependency-preserving decomposition?
b)R (A BC D) {AB → B, C → D}
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
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
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
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)
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
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
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
68
The collection of tuples stored in a database at a particular moment is called
(A)Schema
(B) View
(C) Instance
(D)Relation