+1 vote
in NoSQL by
Top 50+ NoSQL MCQs

1 Answer

0 votes
by

Q1. Which types of indexes are available in Cosmos DB?

 a. range and spatial

 b. secondary and primary key

 c. secondary and spatial

 d. range and primary key

 

 Correct Answer is: - range and spatial

Q2. You want to connect a DynamoDB stream to AWS Lambda function?

a. DynamoDB table

b. DynamoDB trigger

c. DynamoDB item

d. DynamoDB index

Answer: -  DynamoDB trigger

Q3. To index a field that holds an array value in MongoDB, which index type do you create?

a. partial

b. sparse

c. compound

d. multikey

Answer: - multikey

Q4. You want to test HBASE on your laptop using the fewest number of steps. What do you do?

a. Set up Hadoop in pseudo-distributed mode.

b. Set up HBASE in local mode.

c. Set up HBASE in pseudo-distributed mode.

d. Set up Hadoop in local mode.

Answer:-  Set up HBASE in pseudo-distributed mode.

Q5. You need to create a document database that supports database triggers. Which NoSQL database should you use?

a. DynamoDB

b. BigTable

c. Redis

d. MongoDB

Answer:- DynamoDB

 

Q6. What is recommended size for Redis keys?

a. medium

b. short

c. single bit

d. long

Answer:- short

Q7. What does redis use to sort the elements of a sorted set?

a. Scores.

b. Ids.

c. Values.

d. Keys.

Answer:- Keys

Q8. You need to change the shard key of an existing MongoDB collection. What do you do?

a. Dump the collection data, drop the collection, create a new collection and shard key, import the data.

b. Add second shard key and drop the first shard key.

c. Dump the collection data, drop the collection, presplit the data, create a new collection and shard key, import the data.

d. Drop and recreate the shard key.

Answer:-  Dump the collection data, drop the collection, presplit the data, create a new collection and shard key, import the data.

Q9. Polyglot storage means using multiple types of what in the same application?

a. Security systems.

b. Database systems.

c. Storage systems.

d. Query systems.

Answer:-  Query systems.

Q10. You need to implement the simplest possible scalable, in-memory cache for your AWS application. Which service do you select?

a. Elasticache using Memcached.

b. DynamoDB.

c. DynamoDB Accelerator (DAX).

d. Elasticache using Redis.

Answer:-  Elasticache using Redis.

 

Q11. You are doing data modelling for Google BigTable. Which statement expresses if and when you should split entities across multiple rows?

a. Keep all information for an entity in a single row. Store related entities in adjacent rows.

b. Keep all information for an entity in a single row.

c. Split entities across multiple rows if the entity data is over thousands of MBs, or if it does not need atomic updates and reads.

d. Split entities across multiple rows if the entity data is over hundreds of MBs, or if it does not need atomic updates and reads.

Answer:-  Split entities across multiple rows if the entity data is over hundreds of MBs, or if it does not need atomic updates and reads.

Q12. Which two characteristics define Amazon Quantum Ledger Database?

a. Key-value data model; transactionally consistent with ACID semantics.

b. Document data model; transactionally consistent with ACID semantics.

c. Key-value data model; transactions with tunable consistency.

d. Document data model; transactions with tunable consistency.

Answer:-  Document data model; transactionally consistent with ACID semantics.

Q13. You need to design the primary key for DynamoDB based on three attributes. What do you do?

a. Designate all three fields as the primary key.

b. Concatenate all three fields into one new field, then designate that new field as the primary key.

c. Designate two fields of the three fields as the primary key.

d. Concatenate two fields into one new field, then designate that new field and the remaining field as the primary key.

Answer:-  Concatenate all three fields into one new field, then designate that new field as the primary key.

Q14. Which of these data types should you avoid in designing a Google Bigtable row key?

a. multi-valued identifiers

b. string identifiers

c. timesstamps

d. frequently updated identifiers

Answer:-  frequently updated identifiers

Q15. Your startup is building a prototype that has an evolving schema. Your data will be eventually consistent. Your application is hosted in AWS. Which databse do you choose?

a. Neptune

b. DocumentDB

c. DynamoDB

d. Amazon Aurora

Answer:- DynamoDB

 

Q16. You need to create a scalable database that allows you to share documents across authorized mobile clients in real time. What Google NoSQL database should you use?

a. Memorystore

b. Datastore

c. Firebase

d. Bigtable

Answer:- Firebase

Q17. You want to test HBase on your laptop using the fewest number of steps. What do you do?

a. Set up HBase in local mode.

b. Set up Hadoop in pseudo-distributed mode.

c. Set up HBase in pseudo-distributed mode.

d. Set up Hadoop in local mode.

Answer:-  Set up Hadoop in local mode.

Q18. You need to design security for DynamoDB to allow users read-only access to certain items and attributes in a table. What do you do?

a. Use IAM roles.

b. Use IAM policy conditions.

c. Use a VPC endpoint.

d. Use IAM policies.

Answer:-  Use IAM policy conditions.

Q19. What does Redis use to sort the elements of a sorted set?

a. keys

b. values

c. scores

d. ids

Answer:- scores

Q20. Which statement is preferred Cypher code for Neo4j?

a. MATCH (:Person)-->(:Card)-->(:Company) RETURN count(vehicle)

b. Match (:Person)-->(:Car):(vehicle:Car)-->(:Company) RETURN count(vehicle)

c. MATCH (:Person)-->(vehicle:Car)-->(:Company) RETURN count(vehicle)

d. MATCH (:Person)-->(:Card), (vehicle:Car)-->(:Company) RETURN count(vehicle)

Answer:-  MATCH (:Person)-->(vehicle:Car)-->(:Company) RETURN count(vehicle)

 

Q21. You need multi-item ACID transactions with snapshot isolation within a partition for your cloud-based application. Which NoSQL databse do you choose?

a. Bigtable

b. GraphDB

c. DynamoDB

d. Cosmos DB

Answer:-  Cosmos DB

Q22. You need to control your application's batch updates destination for your Bigtable multimode cluster. Which action do you take?

a. Create a custom app profile to route batch updates.

b. Create a custom app profile to route the batch update from that client.

c. Update the default app profile to route the natch update from that client.

d. Use the default app profile to route batch updates.

Answer:-  Update the default app profile to route the natch update from that client.

Q23. Polyglot storage mean using multiple types of what in the same application?

a. security systems

b. database systems

c. query systems

d. storage systems

Answer:-  storage systems

Q24. Your query to verify that your Redis key is configured to support expiring user information on a defined interval returns -2, What does this value indicate?

a. The queried key value expired in the last two seconds.

b. The queried key value exists, but has no associated expire value.

c. The queried key value does not exist.

d. There are two expired keys with this value.

Answer:  The queried key value does not exist.

Q25. You are designing a MongoDB schema to support queries that will include lookups. What should you do?

a. Create an index on the key value used as the primary key.

b. Create an index on the key value used as the foreign key.

c. Create a multicolumn index on the key value used as the foreign key and the most unique column in the document.

d. Create a multicolumn index on the key value used as the primary and also the forign key.

Answer:-  Create a multicolumn index on the key value used as the foreign key and the most unique column in the document.

 

Q26. What is the aggregation operator for a join concept in MongoDB?

a. $group

b. $match

c. $lookup

d. $project

Answer:-  $lookup

Q27. For your mobile application, you need to select a Google cloud databse that can support compound, filtered document queries. Which do you choose?

a. Cloud SQL

b. Cloud Spanner

c. Cloud Firestore

d. Cloud Firebase

Answer:-  Cloud Firestore

Q28. To bulk load data into Amazon Neputn, what do you do?

a. Upload data to S3 VPC endpoint, Use the Neptun loader to load from s3 into your Neptune instance

b. Ad data to a Kinesis stream, and use the Neptune loade to load from S# into your Neptun instance.

c. Add data to a Kisnesis stream, and create a Kinesis stream VPC endpoint. Use the Nepune loader to load from S3into your Neptune instance.

d. Upload data to S Use the neptune loader to load from S3 into your Neptune instance.

Answer:-  Upload data to S3 VPC endpoint, Use the Neptun loader to load from s3 into your Neptune instance

Q29. You need to create a pub/sub server. Which databse do you use?

a. Neo4j

b. Cassandra

c. Redis

d. MyS#### QL

Answer:- Redis

Q30. You want to connect a DynamoDB stream to an AWS lambda function. Which one of these object do you create.

a. DynamoDB table

b. DynamoDB trigger

c. DynamoDB item

d. DynamoDB index

Answer:-  DynamoDB trigger

 

Q31. Which two types of indexes are available in Cosmos DB?

a. secondary and primary key

b. secondary and spatial

c. range and spatial

d. range and primary key

Answer:-  secondary and primary key

Q32. SQL databases and NoSQL are which types of scalable?

a. horizontally, infinitely

b. vertically, horizontally

c. vertically, infinitely

d. horizontally, vertically

Answer:-  vertically, horizontally

Q33. You need to create a scalable database that allows you to query data nodes and edges efficiently. What do you use?

a. a relational database

b. a columnstore database

c. a document database

d. a graph database

Answer:-  a graph database

Q34. You are developing a model for a graph database. Your data will be moved from a relational database into Neo4j. Which of these transformations apply?

a. Rows become labels: bales become nodes.

b. Tables become labels: rows become nodes.

c. Tables become collections: rows become items.

d. Rows become collections: tables become items.

Answer:-  Tables become labels: rows become nodes.

Q35. You need to execute a command for MongoDB that does NOT load values from the .mongorc.js file. What do you do ?

a. Delete the .monorc.js file and restart mongo shell.

b. Use the mongo shell to create a command with --norc option

c. Rem all lines in the .mongorc.js file ad restart mongo shell.

d. Use the mongo shell to create a command with --nodedefault option.

Answer:-  Use the mongo shell to create a command with --nodedefault option.

 

Q36. What is the recommended size for Redis keys?

a. long

b. short

c. medium

d. a single bit

Answer: -  a single bit

Q37. You need to store an unordered collection of name-value pairs with differing data types in DynamoDB. Which data type should you choose?

a. map

b. set

c. list

d. stack

Answer: - map

Q38. Which statement retrieves an item from the MusicCollection table in DynamoDB?

a. aws dynamodb query --table-name MusicCollection --key file://key.json

b. aws dynamodb get-item --table-name MusicCollection --key file://key.json

c. aws dynamodb select --table-name MusicCollection --key file://key.json

d. aws dynamodb put-item --table-name MusicCollection --key file://key.json

Answer: - aws dynamodb get-item --table-name MusicCollection --key file://key.json

Q39. Database availability is measured by which metric?

a. the amount of service calls

b. the number of minutes

c. the amount of service costs

d. the number of nines

Answer:-  the number of nines

Q40. You need to encrypt data at rest in DynamoDB. Which action do you take?

a. You assign a default AWS encryption key to your table to encrypt data.

b. You create an AWS encryption key and assign it to your table to encrypt data.

c. None. Data is encrypted by default.

d. You create an AWS encryption key and assign it to your database to encrypt data.

Answer: -  None. Data is encrypted by default.

 

Q41. You need to generate a unique, sequential identifier for each value stored in a Redis cluster. What do you do?

A. Implement a SortedSet object to generate a value.

B. Use the GUID keyword to generate a value.

C. Implement a List object to generate a value.

D. Use the INCR keyword to generate a value

Answer: -  Use the INCR keyword to generate a value

Q42. You want to return a list of all elements in two Redis sets. Which keyword do you use?

a. smembers

b. returnall

c. sunion

d. sismember

Answer: - smembers

Q43. Which method shows you whether MongoDB uses any indexes when running a query, and how the indexes are used?

a. detailQueryExecution()

b. showPlan()

c. explain()

d. describe()

Answer:-  explain()

Q44. Which statement accurately describes global secondary indexes in DynamoDB?

a. The global secondary indexes in DynamoDB are consistent, and are not guaranteed to return correct results.

b. The global secondary indexes in DynamoDB are transactionally consistent, and are guaranteed to return correct results.

c. The global secondary indexes in DynamoDB are partially consistent, and are not guaranteed to return correct results.

d. The global secondary indexes in DynamoDB are eventually consistent, and are not guaranteed to return correct results.

Answer:-  The global secondary indexes in DynamoDB are eventually consistent, and are not guaranteed to return correct results.

Q45. Which command do you use to add a value to a Redis stream named mystream?

a. ADD mystream * sensor-id 1234 temperature 19.8 1518951480106-1

b. UPDATE mystream * sensor-id 1234 temperature 19.8 1518951480106-3

c. XADD mystream * sensor-id 1234 temperature 9.8 1518951480106-0

d. INSERT mystream * sensor-d 1234 temperature 19.8 15181480106-2

Answer:-  XADD mystream * sensor-id 1234 temperature 9.8 1518951480106-0

 

Q46. Which code example completes this statement and creates an index for a MongoDB object named restaurants, sorted ascending by the field name?

var indexCollection = function(db) {return co(function*() {...});};

a. const results = yield db.table('restaurants').createIndex({"name": 1}, null); return results;

b. const results = yield db.collection('restaurants').createIndex({"name": 0}, null); return results;

c. const results = yield db.collection('restaurants').createIndex({"name": 1}, null); return results;

d. const results = yield db.table('restaurants').createIndex({"name": 0}, null); return results;

Answer:-  const results = yield db.collection('restaurants').createIndex({"name": 1}, null); return results;

Q47. Which Cypher code executes the multiquery block?

a. [ ]

MATCH (c:Company {name: 'Neo4j'}) RETURN c, MATCH (p:Person) WHERE p.name = 'Jennifer' RETURN p,

MATCH (t:Technology)-[:LIKES]-(a:Person {name: 'Jennifer'}) RETURN t.type;

b. [ ]

MATCH (c:Company {name: 'Neo4j'}) RETURN c, MATCH (p:Person) WHERE p.name = 'Jennifer' RETURN p,

MATCH (t:Technology)-[:LIKES]-(a:Person {name: 'Jennifer'}) RETURN t.type

c. [ ]

MATCH (c:Company {name: 'Neo4j'}) RETURN c AND MATCH (p:Person) WHERE p.name = 'Jennifer' RETURN p,

AND MATCH (t:Technology)-[:LIKES]-(a:Person {name: 'Jennifer'}) RETURN t.type;

d. [ ]

MATCH (c:Company {name: 'Neo4j'}) RETURN c;MATCH (p:Person) WHERE p.name = 'Jennifer' RETURN p;

MATCH (t:Technology)-[:LIKES]-(a:Person {name: 'Jennifer'}) RETURN t.type;

Answer:- 

Q48. You need to create a scalable database that supports immutable writes. What do you use?

a. A ledger database

b. A graph database

c. A key-value database

d. A columnstore database

Answer: -  A ledger database

Q49. You need to create a data store for the catalog for your new ecommerce application. Your company is a startup, so the catalog schema may evolve. Which do you choose?

a. Neo4j

b. Redis

c. MySQL

d. MongoDB

Answer:- MongoDB

Q50. You need to select a NoSQL database for heavy aggregate query workloads. Which type do you choose?

a. graph

b. key-value

c. document

d. columnstore

Answer:- columnstore

 

Q51. You need to select a columnstore database that enforce built-in data types. You want to add indexes to improve performance for known workloads. Which do you choose?

a. Cassandra

b. Bigtable

c. Redis

d. HBase

Answer:- Redis

Q52. In DynamoDB, the partition key and sort key are also known as which type of attributes?

a. range, hash

b. primary, range

c. hash, range

d. range, secondary

Answer:-  hash, range

Q53. What is a popular, open-source key-value store database?

a. MongoDB

b. Redis

c. MySQL

d. Cassandra

Answer:- Redis

Q54. You need to create a scalable database to store and query JSON data. What do you use?

a. relational DB

b. document DB

c. graph DB

d. ledger DB

Answer:-  document DB

Related questions

+2 votes
asked Aug 14, 2022 in NoSQL by AdilsonLima
0 votes
asked Mar 13 in Cassandra by kamalkhandelwal29
...