NoSQL Databases: Common Misconceptions

Misconceptions about NoSQL Databases

Question

Which of the following is WRONG for NoSQL databases? (Select TWO.)

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D. E.

Answers: B, C.

Option A is incorrect since NoSQL databases are not relational.

They support data that are semi-structured or unstructured as compared to the structured nature of relational databases like Oracle, MySQL.

Option B is CORRECT.NoSQL databases do not support a predefined schema like a relational database does (e.g.

A record of type Book will have a fixed set of attributes defining a schema like ID, Name, Description, Author)

Not defining a rigid schema allows NoSQL databases the flexibility to support semi-structured & unstructured data.

Option C is CORRECT.

DynamoDB transactions provide developers atomicity, consistency, isolation, and durability (ACID) across one or more tables within a single AWS account and region.

The details can be found in https://aws.amazon.com/cn/blogs/aws/new-amazon-dynamodb-transactions/.

Option D is incorrect.

NoSQL databases are usually run in compute node clusters with data being partitioned across these nodes.

Partitioning happens automatically with an increase in database size resulting in horizontal scaling.

Option E is incorrect.

A Patient's medical record during hospital visits may be updated by multiple people e.g.

Billing information, Medicines, BP, Height, Weight etc...Defining a person's medical history in a structured format will be impractical & inefficient.

Another way to look at a patient's medical record is as a set of documents with a new document being added during every visit with additional information.

Diagram:

References:

Intro to AWS Database services.

https://youtu.be/eKyS9rvbj40

2

AWS database services documentation.

https://aws.amazon.com/products/databases/
NoSQL

The two options that are incorrect for NoSQL databases are:

B. They need to have a well-defined schema. C. DynamoDB Transactions is NOT atomicity, consistency, isolation, and durability (ACID) compliant.

Here is a detailed explanation of why these options are incorrect:

A. They are not relational. NoSQL databases are non-relational databases, which means they don't use the traditional SQL-based relational database management system (RDBMS) model. Instead, NoSQL databases use a flexible schema model, which allows them to handle unstructured, semi-structured, and structured data. NoSQL databases can handle large volumes of structured and unstructured data and can scale horizontally, making them an ideal choice for handling big data and real-time applications.

B. They need to have a well-defined schema. NoSQL databases are designed to handle unstructured and semi-structured data, and they don't need a well-defined schema. Unlike RDBMS, NoSQL databases don't enforce a specific data model, which means they can handle data that is constantly changing or has an unknown schema. NoSQL databases provide greater flexibility and scalability compared to traditional RDBMS databases.

C. DynamoDB Transactions is NOT atomicity, consistency, isolation, and durability (ACID) compliant. DynamoDB is a fully managed NoSQL database service provided by AWS. It is designed to provide high performance, scalability, and availability. DynamoDB supports transactions, which allows users to group multiple write operations into a single, all-or-nothing operation. However, DynamoDB transactions are not ACID-compliant. While DynamoDB provides atomicity and isolation, it doesn't provide strong consistency, which is a critical aspect of ACID compliance.

D. NoSQL databases are horizontally scalable. One of the key benefits of NoSQL databases is that they are horizontally scalable. This means that as the data grows, users can add more machines or nodes to the database cluster to handle the increased load. Unlike RDBMS, which typically scale vertically, NoSQL databases can scale horizontally without sacrificing performance or availability.

E. A patient's record in a hospital system with changing data for every visit is a good candidate to be modeled using a NoSQL database. NoSQL databases are an ideal choice for handling unstructured and semi-structured data, making them a good fit for a patient's record in a hospital system with changing data for every visit. NoSQL databases can store data in a flexible schema, which allows them to handle data that is constantly changing or has an unknown schema. Additionally, NoSQL databases can handle large volumes of data and can scale horizontally, making them an ideal choice for handling big data and real-time applications.