Explain the difference between SQL and NoSQL databases.

Instruction: Compare relational and non-relational source databases from a data warehouse architect’s perspective. Include how a nested order document could become analytical facts and dimensions, and identify integration and validation concerns.

Context: This question gauges the candidate's understanding of database technologies and their ability to distinguish between relational and non-relational databases.

Updated

Official answer

For warehouse architecture, distinguish the source database's model from the analytical model you need to build. Relational sources expose tables and relationships; non-relational sources may expose documents, key-value records, graphs or wide-column data. SQL is a query language, not a guarantee about scale or transaction behavior.

For example, a document source may embed an order and its lines. An analytical pipeline can transform those documents into a fact table with one row per order line and conformed customer/product dimensions. Resolve changing document shapes, deleted records, duplicate delivery and event ordering explicitly. Relational sources also need these controls when changes are replicated.

Choose source and destination products using actual query patterns, transaction boundaries, integrity rules, latency, growth, recovery and operating costs. Relational systems can handle JSON; non-relational products can offer schema validation and transactions. Check the specific engine and configuration.

Validate the warehouse through source-to-target reconciliation, documented metric definitions and representative workload tests. Neither label makes ingestion reliable or analytics fast by itself.

Sources

PostgreSQL: JSON types; MongoDB: transactions.

Related Questions