Introduction to NoSQL Databases Flashcards
Course 1/3 (46 cards)
What does the acronym “NoSQL” stand for, and what is its core meaning in the context of database types?
NoSQL stands for “Not Only SQL”. It refers to a family of non-relational databases that offer alternative ways of storing and querying data compared to traditional relational database management systems (RDBMS).
List four general characteristics or benefits of using NoSQL databases compared to traditional relational databases.
- Flexible data models (no fixed schemas)
- Horizontal scalability
- High availability and fault tolerance
- Often lower cost compared to traditional RDBMS
Describe the primary architectural concept behind Key-Value NoSQL databases and provide a common use case.
Key-Value databases store data as key-value pairs, where the value is often an opaque blob. They are architecturally simple and excellent for quick CRUD operations where data isn’t highly interconnected, such as storing user session information.
How do Document-based NoSQL databases differ from Key-Value databases in terms of value handling and flexibility? Name two popular implementations.
Document-based databases make the value visible and queryable, typically storing data in formats like JSON or XML. Each document can have a flexible schema, unlike the opaque values in Key-Value stores. Popular implementations include MongoDB and Apache CouchDB.
Explain the fundamental architecture of Column-based NoSQL databases, focusing on column families and rows.
Column-based databases store data in columns and groups of columns called column families. Rows within a column family do not need to share the same columns, allowing for sparse data and efficient querying of specific columns across many rows.
What types of data and use cases are Graph NoSQL databases best suited for, and what is a key difference in their transaction handling compared to most other NoSQL types?
Graph databases are best for highly connected data and relationships, such as social networks, routing applications, and recommendation engines. Unlike most other NoSQL types, Graph databases are often ACID transaction compliant.
Define the ACID acronym and briefly describe what each letter represents in the context of database transactions.
ACID stands for Atomicity (transactions are all or nothing), Consistency (transactions transform the database from one consistent state to another), Isolation (concurrent transactions do not interfere), and Durability (committed changes are permanent).
What does the BASE acronym stand for, and what is the core principle it prioritises over immediate consistency?
BASE stands for Basically Available, Soft State, and Eventually Consistent. Its core principle is to prioritize high availability over immediate consistency, allowing data to be temporarily inconsistent across replicas but eventually reaching a consistent state.
In the context of distributed databases, explain the concepts of fragmentation (or sharding) and replication and why they are used.
Fragmentation (or sharding) is the process of breaking a large dataset into smaller pieces (shards) and distributing them across multiple servers to manage and store data. Replication involves creating and maintaining copies of data fragments on multiple nodes to ensure availability and fault tolerance.Atomicity, Consistency, Isolation, Durability
What does ACID stand for?
Atomicity, Consistency, Isolation, Durability
Properties guaranteeing reliable processing of database transactions in traditional relational databases.
What is the Approximation Pattern in MongoDB?
A design pattern for calculating values where exact precision is not required
Useful for frequent reads and maintaining statistically valid numbers.
Define Atomic in the context of database transactions.
An operation that is indivisible and either completes entirely or is fully rolled back.
What is the Attribute Pattern in MongoDB?
A design pattern to document characteristics and similar fields that are difficult to identify in queries
Useful for sorting and querying small subsets of documents.
What does Availability refer to in the CAP theorem?
The property of a distributed system to remain operational and responsive even with failures or network partitions.
What does BASE stand for?
Basically Available, Soft state, Eventually Consistent
An alternative consistency model to ACID prioritizing availability and scalability over strict consistency.
What is Basically Available in BASE systems?
A characteristic where the system remains operational even in the presence of failures.
What is the Bucket Pattern in MongoDB?
A design pattern for managing time series or streaming data by grouping related data points into fewer, larger documents (buckets).
What does the CAP theorem state?
A distributed system can only guarantee two out of three properties in the event of a network partition: Consistency, Availability, and Partition Tolerance.
Define Column-based Database.
A type of NoSQL database that stores data in columns and groups of columns (column families)
Suitable for sparse data and analytics.
What is Consistency in the context of the CAP theorem?
The guarantee that all nodes in a distributed system have the same data at the same time.
What does Consistent mean in ACID?
The property ensuring a database transaction transforms the database from one consistent state to another.
What is Denormalized in database design?
A technique where redundant data is intentionally introduced to improve query performance and reduce the need for joins.
Define Distributed Database.
A collection of multiple interconnected databases spread physically across various locations.
What is a Document Database?
A type of NoSQL database that stores data in flexible, semi-structured documents, typically in JSON or XML format.