Q91
Q91 In PostgreSQL, how do you add a GIN index to an array column named "tags" in a table named "Posts"?
CREATE INDEX gin_tags ON Posts USING GIN(tags)
GIN INDEX CREATE ON Posts(tags)
CREATE GIN INDEX ON Posts(tags)
INDEX GIN CREATE ON Posts USING (tags)
Q92
Q92 How do you enforce uniqueness on a composite index in SQL Server for columns "FirstName" and "LastName" in the "Employees" table?
CREATE UNIQUE INDEX ux_name ON Employees(FirstName, LastName)
UNIQUE INDEX CREATE Employees(FirstName, LastName)
CREATE INDEX UNIQUE Employees ON (FirstName, LastName)
INDEX CREATE UNIQUE ON Employees(FirstName, LastName)
Q93
Q93 A query that used to run quickly is now running slowly, even though no changes were made to the query itself.
What is a likely cause?
The database has been indexed incorrectly
The underlying data has significantly increased in size
A network issue is causing delayed responses
The query optimizer is malfunctioning
Q94
Q94 After adding a new index to a table, certain update operations on the table have become slower.
What is a likely explanation?
The new index requires additional storage space
The update operations do not use the index
Updating the table now requires updating the index as well
The index has caused a lock on the table
Q95
Q95 You observe that a specific query is not using an available index, leading to poor performance.
What could be done to encourage the use of the index?
Rebuild the index
Update the database statistics
Increase the query timeout
Change the query's isolation level
Q96
Q96 What is a primary benefit of using distributed databases over centralized databases?
Increased data redundancy
Simpler data management
Improved data availability and disaster recovery
Reduced data security
Q97
Q97 In a distributed database system, what does the term "data fragmentation" refer to?
The process of breaking down data into smaller, manageable parts for storage
The unintended loss of data due to network issues
The division of data into different types for analysis
Segmenting and storing parts of a database at different locations based on certain criteria
Q98
Q98 What challenge is primarily addressed by the two-phase commit protocol in distributed database systems?
Data consistency across multiple sites
Encrypting data transmitted between sites
Optimizing query performance across networks
Managing distributed database schema changes
Q99
Q99 Which of the following best describes the concept of "horizontal scaling" in distributed databases?
Adding more columns to a database table
Splitting a database across different physical locations
Increasing the storage capacity of a single database server
Adding more servers or nodes to manage increased load
Q100
Q100 In distributed databases, what does "eventual consistency" mean?
That the database will be immediately consistent after any transaction
That the database may temporarily have different data copies, which will become consistent over time
That consistency is not guaranteed in any form
That consistency between database copies is achieved through periodic synchronization
Q101
Q101 In a distributed SQL database, how can you query data from a remote table named "RemoteOrders" that resides on a server named "RemoteServer"?
SELECT * FROM RemoteServer.RemoteOrders
SELECT * FROM RemoteOrders AT RemoteServer
SELECT * FROM LINKED.RemoteServer.RemoteOrders
SELECT * FROM RemoteOrders@RemoteServer
Q102
Q102 How do you enable automatic sharding in a MongoDB distributed database to distribute data across multiple servers?
Use the sh.enableSharding("databaseName") command
Set up a shard cluster and define shard keys for collections
Implement a custom sharding algorithm
Configure replication sets for automatic sharding
Q103
Q103 For ensuring strong consistency across replicas in a Cassandra cluster, which consistency level should be used for both reads and writes?
ONE
QUORUM
ALL
LOCAL_QUORUM
Q104
Q104 A distributed database system is experiencing slow query responses.
What could be a reason for increased latency?
A single overloaded server
Network latency between distributed nodes
Incorrectly configured indexes
All of the above
Q105
Q105 After partitioning a table across multiple distributed database nodes, some transactions fail due to lost updates. What is a likely cause and solution?
The transactions are accessing non-partitioned data, requiring data replication
Transactions are not being distributed correctly, necessitating a review of the partitioning strategy
Locks are not being acquired on the data, suggesting the need for explicit locking mechanisms
Partitioned data is not being synchronized properly, indicating the need for transaction coordination
Q106
Q106 How can data inconsistency issues be resolved in a system using eventual consistency?
By immediately synchronizing all data replicas
By using a conflict resolution mechanism such as last write wins
By reducing the number of database replicas
By avoiding updates to data
Q107
Q107 What distinguishes NoSQL databases from traditional relational databases?
Strict schema enforcement
Support for SQL syntax
Ability to handle unstructured and semi-structured data efficiently
Primarily used for transactional data
Q108
Q108 Which NoSQL database type is optimized for storing and querying connected data, such as social networks or recommendation systems?
Document store
Key-value store
Graph database
Column-family store
Q109
Q109 What is "sharding" in the context of NoSQL databases?
The process of replicating data across multiple servers for fault tolerance
Partitioning data across multiple servers to improve performance
Encrypting data at rest
Compressing data to save storage space
Q110
Q110 In big data processing, what does the term "MapReduce" refer to?
A data storage technique for large datasets
A programming model for processing large data sets with a parallel, distributed algorithm on a cluster
A type of NoSQL database
A data backup and recovery strategy
Q111
Q111 How does data consistency in eventual consistency models compare to that in traditional ACID transaction models?
It guarantees immediate consistency
It never achieves consistency
It achieves consistency over time, after all updates propagate
It prioritizes availability over consistency
Q112
Q112 How do you create a collection named "users" in MongoDB?
db.createCollection("users")
CREATE COLLECTION users
db.users.create()
mongodb.create("users")
Q113
Q113 In Cassandra, how can you define a table with automatic expiration of data (TTL) for a column named "message"?
CREATE TABLE messages (id UUID PRIMARY KEY, message text, TTL int)
CREATE TABLE messages (id UUID PRIMARY KEY, message text) WITH default_time_to_live=3600
ALTER TABLE messages ADD TTL (message, 3600)
None of the above
Q114
Q114 Which command in Redis is used to set a key "user:100" with a value "John Doe" that expires after 10 minutes?
SET user:100 "John Doe" EXPIRE 600
SET user:100 "John Doe" TTL 600
SET user:100 "John Doe" WITH EXPIRY 600
SETEX user:100 600 "John Doe"
Q115
Q115 A developer notices slow query performance on a document store database when querying by a frequently accessed field.
What is a potential solution?
Adding an index on the frequently accessed field
Increasing the memory allocated to the database
Splitting the database into smaller, separate databases
Replicating the database for read-heavy workloads
Q116
Q116 After adding a new node to a NoSQL database cluster, data is not evenly distributed across nodes.
What action can help redistribute the data more evenly?
Manually transferring data between nodes
Rebooting the cluster
Updating the database schema
Triggering a rebalance operation across the cluster
Q117
Q117 How can "hotspotting" issues be mitigated in a Big Data application using a key-value store for time-series data?
By writing all data to a single key
By using sequential keys for data insertion
By sharding data across keys using a hash of the timestamp
By increasing the write throughput limits on the database
Q118
Q118 What is a data warehouse?
A database optimized for transaction processing
A collection of tools for web data mining
A centralized repository for integrating data from various sources
A type of NoSQL database
Q119
Q119 In data mining, what does the term "classification" refer to?
The process of organizing data into categories for efficient storage
Dividing a database into smaller, manageable parts
The task of predicting the class label of given input data
The restructuring of a data warehouse
Q120
Q120 What distinguishes data warehousing from databases in terms of data analysis?
Data warehousing focuses on capturing data from diverse sources, whereas databases focus on storing real-time transactional data
Data warehousing is optimized for read-intensive operations, whereas databases are optimized for write-intensive operations
Data warehouses primarily use SQL for querying, whereas databases use NoSQL
Data warehouses store unstructured data, whereas databases store structured data