Non-Relational Database Types
Non-relational databases, also known as NoSQL databases, are designed to store and manage data that doesn't fit neatly into the traditional table-based relational model. In Microsoft Azure, several non-relational database types are supported, each optimized for specific use cases. 1. **Document Da… Non-relational databases, also known as NoSQL databases, are designed to store and manage data that doesn't fit neatly into the traditional table-based relational model. In Microsoft Azure, several non-relational database types are supported, each optimized for specific use cases. 1. **Document Databases**: These store data as JSON-like documents, where each document can have a different structure. Azure Cosmos DB is a prime example, allowing flexible schemas ideal for content management, catalogs, and user profiles. Each document is self-contained and can include nested data. 2. **Key-Value Stores**: The simplest form of NoSQL databases, where data is stored as key-value pairs. Azure Table Storage and Azure Cosmos DB (Table API) support this model. They are highly performant for lookups and are commonly used for session management, caching, and shopping carts. 3. **Column-Family Databases**: These organize data into rows and columns, but unlike relational databases, columns can vary between rows. Azure Cosmos DB (Cassandra API) supports this model, which is excellent for handling large volumes of data across distributed systems, such as IoT telemetry and time-series data. 4. **Graph Databases**: These use nodes, edges, and properties to represent and store data relationships. Azure Cosmos DB (Gremlin API) supports graph databases, making them ideal for social networks, fraud detection, and recommendation engines where relationships between entities are critical. 5. **Object Storage/Blob Storage**: Azure Blob Storage handles unstructured data like images, videos, backups, and large binary files. It organizes data into containers and supports tiered storage for cost optimization. Non-relational databases offer key advantages including horizontal scalability, flexible schemas, high availability, and optimized performance for specific data patterns. They are particularly useful when dealing with large volumes of rapidly changing data, unstructured or semi-structured data, and scenarios where the rigid schema of relational databases becomes a limitation. Azure provides comprehensive support for all these types through various services.
Non-Relational Database Types – DP-900 Exam Guide
Why Non-Relational Database Types Matter
Non-relational databases (often called NoSQL databases) are a foundational concept for the DP-900: Microsoft Azure Data Fundamentals exam. Understanding these database types is critical because modern applications frequently require flexible schemas, massive scalability, and the ability to handle diverse data formats that traditional relational databases struggle with. In real-world scenarios, organizations use non-relational databases to power web applications, IoT platforms, gaming leaderboards, content management systems, and much more. For the exam, you must be able to identify different non-relational database types, understand their use cases, and know which Azure services correspond to each type.
What Are Non-Relational Databases?
Non-relational databases are data stores that do not use the traditional tabular row-and-column structure of relational databases. Instead, they use flexible data models optimized for specific types of data and access patterns. They are often referred to as NoSQL databases, which can stand for "Not Only SQL" or "Non-SQL."
The four primary types of non-relational databases you need to know for the DP-900 exam are:
1. Key-Value Stores
A key-value store is the simplest type of non-relational database. Each item is stored as a key (a unique identifier) paired with a value (the data itself). The value can be anything — a string, a number, a JSON object, or even a binary blob. The database does not interpret or enforce any structure on the value.
Characteristics:
- Extremely fast lookups by key
- Highly scalable
- No complex queries on the value side (you retrieve data by key only)
- Ideal for caching, session management, and user preference storage
Azure Service: Azure Table Storage and Azure Cosmos DB (Table API) can function as key-value stores. Azure Cache for Redis is also a key-value store used primarily for caching.
2. Document Databases
Document databases store data as documents, typically in JSON, BSON, or XML format. Each document is self-describing, meaning it contains both the data and the structure (schema) within itself. Documents within the same collection can have different fields and structures, providing schema flexibility.
Characteristics:
- Semi-structured data storage
- Each document can have a different structure
- Supports complex queries on fields within documents
- Ideal for content management, catalogs, user profiles, and applications where data structures evolve frequently
Azure Service: Azure Cosmos DB (Core/SQL API) and Azure Cosmos DB (MongoDB API) are document databases.
3. Column-Family Databases
Column-family databases (also called wide-column stores) organize data into rows and columns, but unlike relational databases, columns are grouped into column families. Each row can have a different set of columns, and column families are stored together on disk for efficient reads of related data.
Characteristics:
- Optimized for reading and writing large volumes of data
- Efficient for queries that access specific column families
- Ideal for telemetry data, IoT data, time-series data, and analytics workloads
- Rows can have varying numbers of columns
Azure Service: Azure Cosmos DB (Cassandra API) supports column-family data modeling. Apache HBase on Azure HDInsight is another option.
4. Graph Databases
Graph databases store data as nodes (entities) and edges (relationships between entities). Each node and edge can have properties (key-value pairs that describe attributes). Graph databases excel at traversing and querying complex relationships between data points.
Characteristics:
- Data is modeled as nodes, edges, and properties
- Optimized for relationship-heavy queries (e.g., "find all friends of friends")
- Ideal for social networks, recommendation engines, fraud detection, and knowledge graphs
- Queries focus on traversing paths and patterns in the graph
Azure Service: Azure Cosmos DB (Gremlin API) is Microsoft's graph database offering.
How Non-Relational Databases Work
Non-relational databases work by abandoning the rigid schema enforcement of relational databases in favor of more flexible data models. Here is how they generally operate:
- Schema Flexibility: Unlike relational databases where you must define tables, columns, and data types upfront, non-relational databases allow you to store data without a predefined schema. Documents can have varying fields, key-value pairs can hold any data type, and rows in column-family stores can have different columns.
- Horizontal Scaling (Scale-Out): Non-relational databases are designed to scale horizontally by distributing data across multiple servers or partitions. This is a key advantage over relational databases, which traditionally scale vertically (adding more power to a single server).
- Partition Keys: Many non-relational databases (especially Azure Cosmos DB) use a partition key to distribute data across physical partitions. Choosing the right partition key is critical for performance and scalability.
- Eventual Consistency vs. Strong Consistency: Non-relational databases often offer tunable consistency levels. Some scenarios may allow eventual consistency (data may not be immediately the same across all replicas) for higher performance, while others require strong consistency.
- APIs and Access Patterns: Azure Cosmos DB is particularly noteworthy because it is a multi-model database service that supports multiple APIs: SQL (document), MongoDB (document), Cassandra (column-family), Gremlin (graph), and Table (key-value). This means a single Azure service can serve multiple non-relational database types.
Comparing Non-Relational Database Types at a Glance
Key-Value: Simple key-to-value pairs → Caching, session state, user preferences
Document: JSON/BSON documents with flexible schemas → Content management, product catalogs, user profiles
Column-Family: Rows with grouped columns (column families) → IoT data, telemetry, time-series analytics
Graph: Nodes and edges representing entities and relationships → Social networks, fraud detection, recommendations
Azure Services Summary for the Exam
- Azure Cosmos DB — Multi-model, globally distributed database supporting document (SQL API, MongoDB API), key-value (Table API), column-family (Cassandra API), and graph (Gremlin API)
- Azure Table Storage — Simple, cost-effective key-value store
- Azure Cache for Redis — In-memory key-value store for caching
- Azure HDInsight (HBase) — Column-family database for big data workloads
Exam Tips: Answering Questions on Non-Relational Database Types
1. Match the data model to the use case: The exam will frequently present a scenario and ask which type of non-relational database is most appropriate. Remember: relationships = graph, flexible documents = document database, simple lookups = key-value, large-scale columnar data = column-family.
2. Know Azure Cosmos DB APIs: A very common exam topic is identifying which Cosmos DB API corresponds to which database type. Memorize: SQL API and MongoDB API = document, Table API = key-value, Cassandra API = column-family, Gremlin API = graph.
3. Understand schema flexibility: Non-relational databases do not require a fixed schema. If a question mentions needing to store data with varying or evolving structures, the answer likely points to a non-relational (especially document) database.
4. Remember horizontal scaling: If a question emphasizes the need for massive scale-out and global distribution, Azure Cosmos DB and non-relational databases are likely the correct answer.
5. Don't confuse Azure Table Storage with relational tables: Despite the name "Table," Azure Table Storage is a non-relational key-value store. It does not support joins, foreign keys, or SQL queries like a relational table would.
6. Graph database clue words: Look for words like "relationships," "connections," "networks," "traversal," "nodes," and "edges" — these all point to a graph database (Gremlin API).
7. Document database clue words: Look for "JSON," "semi-structured," "flexible schema," "varying fields," and "self-describing data" — these indicate a document database.
8. Column-family clue words: Look for "time-series," "telemetry," "IoT," "wide columns," and "Cassandra" — these point to column-family databases.
9. Key-value clue words: Look for "caching," "session state," "simple lookup," "fast retrieval by key," and "Redis" — these indicate key-value stores.
10. Process of elimination: If a question describes data that clearly does not fit a relational model (no need for joins, ACID transactions across tables, or rigid schemas), you can safely eliminate relational database options and focus on the non-relational types.
11. Multi-model awareness: Remember that Azure Cosmos DB is a single service that supports multiple data models. If a question asks about a single service supporting different non-relational workloads, Cosmos DB is almost certainly the answer.
By thoroughly understanding these four non-relational database types, their characteristics, use cases, and the corresponding Azure services, you will be well-prepared to answer any DP-900 exam question on this topic confidently.
Unlock Premium Access
Microsoft Azure Data Fundamentals + ALL Certifications
- Access to ALL Certifications: Study for any certification on our platform with one subscription
- 2809 Superior-grade Microsoft Azure Data Fundamentals practice questions
- Unlimited practice tests across all certifications
- Detailed explanations for every question
- DP-900: 5 full exams plus all other certification exams
- 100% Satisfaction Guaranteed: Full refund if unsatisfied
- Risk-Free: 7-day free trial with all premium features!