DBMS Unit - 5
DBMS Unit - 5
DBMS Unit - 5
Answer: A
Answer: B
Answer: B
Answer: C
Answer: B
b, 1 - B, 2 - E, 3 - A, 4 – D 5-C
c, 1 - B, 2 - C, 3 - D, 4 – A 5 - E
d, 1 - D, 2 - C, 3 - B, 2 – A 5-E
2.
S.No. Column A Column B
1 Dense Index a)Index entries for every search key
a, 1 - C, 2 - D, 3 - A, 4 – B 5-E
b, 1 - A, 2 - B, 3 - C, 4 – D 5-E
c, 1 - B, 2 - C, 3 - D, 4 – A 5 - E
d, 1 - D, 2 - C, 3 - B, 2 – A 5-E
3.
S.No. Column A Column B
1 Hash Function b) Two keys hash to the same index
a, 1 - B, 2 - C, 3 - D, 4 – A 5 - E
b, 1 - C, 2 - D, 3 - A, 4 – B 5-E
c, 1 - B, 2 - C, 3 - D, 4 – A 5 - E
d, 1 - A, 2 - B, 3 -C, 4 – D 5-E
4.
S.No. Column A Column B
1 B-Tree a) The node at the lowest level containing
actual data
2 B+Tree b) The node that contains pointers to other
nodes
3 Leaf Node c) The maximum number of children for a
node
4 Internal Node d) Internal nodes and leaf nodes both store
keys and data
5 Order of the Tree e) Leaf nodes contain data pointers, internal
nodes store keys only
a, 1 - C, 2 - D, 3 - A, 4 – B 5-E
b, 1 -D, 2 - E, 3 - A, 4 – B 5-C
c, 1 - B, 2 - C, 3 - D, 4 – A 5 - E
d, 1 - D, 2 - C, 3 - B, 2 – A 5-E
5.
S.No. Column A Column B
1 RAID 0 a) Striped without parity, no fault tolerance
V. Short Answers:
Answer: C
Answer: D
Answer: B
Answer: C
Answer: A
II.Fill in the Blanks:
1. is the process of distributing data across multiple machines in MongoDB.
Answer: Sharding
2.In a B-tree, each node can have at most children if the order is 4.
Answer: 4
Answer: Graph
Answer: drop()
Answer: column
III.True or False:
1. A primary index can be created on non-primary attributes.
Answer: False
2. The default port for MongoDB is 27017.
Answer: True
3. NoSQL databases can handle unstructured data.
Answer: True
4. In a hash file organization, records are stored in a sequential manner.
Answer: False
5. B-trees are always balanced.
Answer: True
1.
S.No. Column A Column B
1 Sequential File a) Records are placed in any available
Organization space; no ordering
2 Heap File Organization b) An index is created to speed up the
retrieval of records
3 Indexed File c) A hash function computes the address
Organization for each record
4 Clustered File d) Records with similar key values are
Organization stored together
5 Hash File Organization e) Records are stored and accessed in a
sequence based on a key field
a, 1 - E, 2 - A, 3 - B, 4 – D 5-C
b, 1 -D, 2 - E, 3 - A, 4 – B 5-C
c, 1 - B, 2 - C, 3 - D, 4 – A 5 - E
d, 1 - D, 2 - C, 3 - B, 2 – A 5-E
2.
S.No. Column A Column B
1 Document a) Collection of documents
a, 1 - E, 2 - A, 3 - B, 4 – D 5-C
b, 1 -D, 2 - E, 3 - A, 4 – B 5-C
c, 1 - B, 2 - A, 3 - C, 4 – D 5 - E
d, 1 - D, 2 - C, 3 - B, 2 – A 5-E
3.
S.No. Column A Column B
1 Create a) Retrieve data from the database
b, 1 -D, 2 - E, 3 - A, 4 – B 5-C
c, 1 - A 2 - D, 3 - C, 4 – E 5 - B
d, 1 - D, 2 - C, 3 - B, 4 – A 5-E
4.
S.No. Column A Column B
1 Leaf Nodes a) Efficient due to sequential linked leaf nodes
3 Order of B+tree
c) Contains pointers to data records or actual
data
4 Range Queries d) Maximum number of children per node
a, 1 - B, 2 - A, 3 - C, 4 – D 5-E
b, 1 -D, 2 - E, 3 - A, 4 – B 5-C
c, 1 - A 2 - D, 3 - C, 4 – E 5 - B
d, 1 - C, 2 - E, 3 - D, 4– A 5-B
5.
S.No. Column A Column B
1 Bitmap Index a) Indexing technique where every unique
value has a bitmap
2 Full-Text Index
b) Data records are physically stored in the
same order as the index
3 Unique Index
c) Index based on multiple columns
4 Composite Index d) Ensures all values in the indexed column are
unique
5 Clustered Index
e) Optimized for search and retrieval of text
within a column
a, 1 - B, 2 - A, 3 - C, 4 – D 5-E
b, 1 -A, 2 - E, 3 - D, 4 – C 5-B
c, 1 - A 2 - D, 3 - C, 4 – E 5 - B
d, 1 - C, 2 - E, 3 - D, 4– A 5-B
V.Short Answers:
Answer: D
Answer: C
Answer: A
5. What is the main advantage of using a NoSQL database over a traditional RDBMS?
a) Better consistency
b) Better scalability
c) More features
d) Easier management
Answer: B
II. Fill in the Blanks:
1.
S.No. Column A Column B
1 Indexing a) Ensures high availability of data
2 Sharding b) Stores data as BSON format
3 BSON c) MongoDB method for data retrieval
4 Replica Set d) Horizontal scaling technique in MongoDB
a, 1 - B, 2 - A, 3 - C, 4 – D 5-E
a, 1 -A, 2 - B, 3 - C, 4 – D 5-E
c, 1 - A 2 - D, 3 - C, 4 – E 5 - B
d, 1 - B, 2 - C, 3 - D, 4– E 5-A
3.
S.No. Column A Column B
1 RAID 0 a) Combines striping and mirroring for redundancy and
performance
2 RAID 1 b) Provides data redundancy using parity
a, 1 -C, 2 - D, 3 - B, 4 –E 5-A
c, 1 - A 2 - D, 3 - C, 4 – E 5 - B
d, 1 - B, 2 - C, 3 - D, 4– E 5-A
4.
a, 1 -C, 2 - D, 3 - B, 4 –E 5-A
d, 1 - B, 2 - C, 3 - D, 4– E 5-A
5.
S.No. Column A Column B
1 Schema-less a) Used for distributed data storage
2 Sharding b) No fixed schema, flexible data models
c, 1 - A 2 - D, 3 - C, 4 – E 5 - B
d, 1 - B, 2 - D, 3 - C, 4– A 5-E
V. Short Answers:
1. What is the need for RAID?
An array of multiple disks accessed in parallel will give greater throughput than a single disk.
2. What are ordered indices?
This is type of indexing which is based on sorted ordering values. Various ordered indices are
primary indexing, secondary indexing.
3. What are the two types of ordered indices?
Two types of ordered indices are - Primary indexing and secondary indexing.
4. What are the causes of bucket overflow in a hash file organization?
Bucket overflow can occur for following reasons -Insufficient buckets and Skew:
5. List the mechanisms to avoid collision during hashing.
Collision Resolution techniques are: (1) Separate chaining Open addressing techniques
SET - D
Subject Name: 21CS1401-Database Management Systems Marks : 25
Answer:B
4. In a B-tree, what is the minimum number of children a non-root node must have if the order
of the tree is 5?
a) 1
b) 2
c) 3
d) 4
Answer:B
1.
S.No. Column A Column B
1 Hash Function a) Resolves collisions by finding another open slot
2 Collision b) Maps keys to positions in a hash table
c, 1 - A 2 - D, 3 - C, 4 – E 5 - B
d, 1 - B, 2 - D, 3 - C, 4– A 5-E
2.
b, 1 - B, 2 - E, 3 - A, 4 – D 5-C
c, 1 - B, 2 - C, 3 - D, 4 – A 5 - E
d, 1 - D, 2 - C, 3 - B, 2 – A 5-E
2.
S.No. Column A Column B
1 Dense Index a)Index entries for every search key
a, 1 - C, 2 - D, 3 - A, 4 – B 5-E
b, 1 - A, 2 - B, 3 - C, 4 – D 5-E
c, 1 - B, 2 - C, 3 - D, 4 – A 5 - E
d, 1 - D, 2 - C, 3 - B, 2 – A 5-E
3.
a, 1 - B, 2 - A, 3 - C, 4 – D 5-E
b, 1 -D, 2 - E, 3 - A, 4 – B 5-C
c, 1 - A 2 - D, 3 - C, 4 – E 5 - B
d, 1 - D, 2 - C, 3 - B, 4 – A 5-E
5.
S.No. Column A Column B
1 Bitmap Index a) Indexing technique where every unique
value has a bitmap
2 Full-Text Index
b) Data records are physically stored in the
same order as the index
3 Unique Index
c) Index based on multiple columns
4 Composite Index d) Ensures all values in the indexed column are
unique
5 Clustered Index
e) Optimized for search and retrieval of text
within a column
a, 1 - B, 2 - A, 3 - C, 4 – D 5-E
b, 1 -A, 2 - E, 3 - D, 4 – C 5-B
c, 1 - A 2 - D, 3 - C, 4 – E 5 - B
d, 1 - C, 2 - E, 3 - D, 4– A 5-B
V. Short Answers
1. What is a NoSQL database?
A NoSQL (Not Only SQL) database offers a method for storing and accessing data, diverging from
the tabular structures employed in relational databases.
2. What is sharding work in a database?
Sharding is a technique used in distributed databases to horizontally partition data across multiple
servers or nodes
A primary index is an index on a set of columns that includes the primary key, ensuring unique and
sorted entries.
RAID is a data storage technology that combines multiple physical disk drives into one or more
logical units to ensure data redundancy and improve performance.