Microsoft Azure Data FundamentalsDescribe core data conceptsHard

A global logistics company needs to store tracking information for millions of packages. Each tracking record includes a unique tracking ID, current location (latitude/longitude), status updates, and timestamps. The primary access pattern is retrieving a package's full history by its tracking ID, and queries for all packages within a certain geographical area are also common. Which data model offers the best balance of fast direct lookups and efficient spatial querying?

  1. AKey-Value Data Model
  2. BColumn-Family Data Model
  3. CDocument Data Model
  4. DRelational Data Model
Show answer & explanation

Correct answer: C. Document Data Model

A document data model, particularly with support for geospatial indexing, can effectively store the varying details of a package's history within a single document (fast direct lookup by ID) and efficiently query across documents for spatial data (packages in an area).

Why the other options are wrong

  • A. Key-value models are too simplistic for complex data structures and efficient spatial queries.
  • B. Column-family models are optimized for wide rows and specific column access, not typically for complex document structures or spatial queries.
  • D. Relational models can handle this, but storing variable status updates might lead to many join tables or complex schemas, and spatial queries might require specialized extensions.

Document Data Model

A NoSQL data model that stores data as semi-structured documents, typically JSON or XML, allowing for flexible schemas.

  • Flexible, semi-structured data
  • Documents often self-contained
  • Good for varying data types and rapid changes

Memory trick: Documents are like 'flexible folders' for varied info, and can be 'mapped' spatially.

More Describe core data concepts questions