Tag: Databases

Describe Types of Databases (DP-900 Exam Prep)

This post is a part of the DP-900: Microsoft Azure Data Fundamentals Exam Prep Hub. 
This topic falls under these sections:
Describe core data concepts (25–30%)
--> Identify options for data storage
--> Describe types of databases


Note that there are 10 practice questions (with answers and explanations) for each section to help you solidify your knowledge of the material. Also, there are 2 practice tests with 60 questions each available on the hub below the exam topics section.

Databases are systems that store and manage data so applications can retrieve, update, and organize it efficiently. For DP-900, you should be familiar with the major types of databases, how they differ, and common use cases — especially in relation to Azure services.


What Is a Database?

A database is an organized collection of data that enables efficient access, management, and update of information. Databases may differ in how they model, structure, and query data depending on the data type, scale, and workload requirements.


Primary Types of Databases

At a high level, databases fall into two broad categories:

  1. Relational Databases
  2. Non-Relational Databases (NoSQL)

1. Relational Databases

Relational databases (RDBMS) store data in tables with rows and columns.

Key Features

  • Structured schema: Tables have defined columns with data types.
  • Relationships: Tables can be linked using keys (e.g., primary and foreign keys).
  • SQL Queries: Use Structured Query Language (SQL) to retrieve and manipulate data.
  • ACID transactions: Support atomicity, consistency, isolation, and durability for reliable data operations.

When to Use

  • Applications requiring strong data integrity
  • Banking, accounting, inventory systems
  • Workloads where relationships among data matter

Examples

  • Azure SQL Database
  • Azure Database for PostgreSQL
  • Azure Database for MySQL

2. Non-Relational Databases (NoSQL)

Non-relational databases, often called NoSQL databases, store data in ways that differ from traditional tables. They are generally schema-less and more flexible, which helps with scalability and handling varied data types.

Key Characteristics

  • No fixed schema
  • Designed for horizontal scaling and large data volumes
  • Support for semi-structured and unstructured data
  • Often optimized for specific access patterns

The most common NoSQL models include:


a. Key-Value Databases

Key-value stores are the simplest type of NoSQL database.

  • Data stored as pairs: key (identifier) and value (data).
  • Efficient for simple lookups when the key is known.

Use cases: Session state, caching, user preferences.


b. Document Databases

Document databases store data as documents, typically in JSON format.

  • Each document is a self-describing object with a unique ID.
  • Supports nested fields and flexible attributes.

Use cases: Content management, user profiles, web apps.


c. Column-Family (Wide-Column) Databases

Column-family databases use tables with column families — groups of related columns that can vary by row.

  • Designed for wide tables where columns are sparse.
  • Good for distributed data and analytical workloads.

Use cases: Time-series data, analytics, event logging.


d. Graph Databases

Graph databases focus on relationships between data elements.

  • Use nodes (entities) and edges (relationships).
  • Optimized for queries involving deep connections (e.g., social networks).

Use cases: Recommendation engines, fraud detection, network analysis.


Relational vs Non-Relational: A Quick Comparison

FeatureRelationalNon-Relational (NoSQL)
SchemaFixedFlexible / Schema-less
Data ModelTablesVaries (documents, keys, graphs)
Query LanguageSQLVaries by database
ScalabilityVertical scalingHorizontal scaling
Typical UseStrong consistency & relationshipsLarge, evolving, semi/unstructured data

How Azure Supports These Databases

Relational Database Services

Azure provides managed relational services:

  • Azure SQL Database: Managed SQL service
  • Azure Database for MySQL and PostgreSQL: Managed open-source options

These are ideal for structured data and transactional workloads.


Non-Relational Database Services

Azure supports NoSQL and other flexible databases:

  • Azure Cosmos DB: A globally distributed, multi-model NoSQL database service that supports document, key-value, column-family, and graph models.

This makes Cosmos DB unique in supporting multiple non-relational data models from a single service.


Why Understanding Types of Databases Matters for DP-900

On the DP-900 exam, you may be asked to:

  • Classify a database type based on a description of its structure.
  • Choose the best database model for a given business scenario.
  • Identify Azure services that match a database type.

Knowing relational vs non-relational databases, and the sub-types of NoSQL models, will help you answer these questions with confidence.


Summary — Exam-Relevant Takeaways

Relational databases store structured data using tables, enforce schemas, and use SQL.
NoSQL databases store non-relational data and include key-value, document, column-family, and graph types.
Azure SQL Database and open-source relational offerings support structured workloads.
Azure Cosmos DB supports multiple non-relational models for schema-flexible data.


Go to the Practice Exam Questions for this topic.

Go to the DP-900 Exam Prep Hub main page.

Practice Questions: Describe Types of Databases (DP-900 Exam Prep)

Practice Questions


Question 1

You need to store customer orders in tables with fixed columns and enforce relationships between customers and orders.

Which type of database should you use?

A. Graph
B. Document
C. Relational
D. Key-value

Answer: C

Explanation:
Relational databases store structured data in tables with defined schemas and support relationships via keys.


Question 2

Which characteristic best describes a relational database?

A. Schema-less storage
B. Data stored as JSON documents
C. Tables with rows and columns
D. Nodes and edges

Answer: C

Explanation:
Relational databases organize data into tables (rows and columns) and use SQL for querying.


Question 3

An application must store user profiles in flexible JSON documents where each user may have different attributes.

Which database type is most appropriate?

A. Column-family
B. Document
C. Relational
D. Graph

Answer: B

Explanation:
Document databases store data as JSON-like documents and allow flexible schemas — ideal for user profiles.


Question 4

Which Azure service supports multiple NoSQL data models such as Core (SQL) API, Table API, Cassandra API, and Gremlin API?

A. Azure SQL Database
B. Azure Table Storage
C. Azure Cosmos DB
D. Azure Database for PostgreSQL

Answer: C

Explanation:
Azure Cosmos DB is a globally distributed, multi-model NoSQL database service.


Question 5

You are designing a recommendation engine that analyzes relationships between users and products.

Which database type is best suited?

A. Relational
B. Key-value
C. Graph
D. Column-family

Answer: C

Explanation:
Graph databases specialize in relationship-heavy data using nodes and edges.


Question 6

Which statement about NoSQL databases is TRUE?

A. They always require fixed schemas
B. They primarily use SQL
C. They are optimized for horizontal scaling
D. They cannot store structured data

Answer: C

Explanation:
NoSQL databases are designed for horizontal scaling and flexible schemas.


Question 7

You need extremely fast lookups using a unique identifier, and the data structure is simple.

Which NoSQL model should you choose?

A. Document
B. Graph
C. Column-family
D. Key-value

Answer: D

Explanation:
Key-value databases store data as key/value pairs and provide very fast retrieval.


Question 8

Which Azure service is best suited for structured transactional workloads using SQL?

A. Azure Blob Storage
B. Azure Cosmos DB
C. Azure SQL Database
D. Azure Data Lake Storage

Answer: C

Explanation:
Azure SQL Database is a managed relational database service optimized for structured transactional data.


Question 9

Which feature is typically associated with relational databases but not guaranteed in NoSQL systems?

A. Global distribution
B. Flexible schemas
C. ACID transactions
D. Horizontal scaling

Answer: C

Explanation:
Relational databases traditionally provide full ACID transaction support.


Question 10

A company collects massive volumes of time-series telemetry data where columns may vary across rows.

Which database type fits this scenario best?

A. Relational
B. Document
C. Column-family
D. Graph

Answer: C

Explanation:
Column-family (wide-column) databases are well suited for large, sparse datasets such as time-series data.


✅ Key Exam Reminders

For DP-900, make sure you can confidently:

  • Distinguish relational vs non-relational
  • Recognize NoSQL models (key-value, document, column-family, graph)
  • Match Azure services to database types (especially Azure SQL vs Azure Cosmos DB)
  • Choose the right database type for a scenario

Go to the DP-900 Exam Prep Hub main page.