07 — Practice solutions

← Questions

These are independently written explanations, not an official marking scheme.

07A

Answer: a single fixed table needs columns for the union of product attributes, leaving irrelevant fields and requiring schema changes as new attribute types appear. Document records can store the fields relevant to each category, accommodating new attribute sets without requiring the same columns in every record. The application must still validate required fields/types and handle missing optional fields consistently.

Why: flexible schema addresses variation; it does not guarantee valid data. “NoSQL has no schema so anything works” misses the responsibility the question explicitly requests.

07B

Answer: a relational database fits enrolment: primary/foreign keys enforce valid links and joins support reports combining the related entities. A suitable distributed NoSQL design can fit the sensor service: partitioning records by an appropriate sensor/time scheme can spread a large workload while supporting the stated retrieval pattern.

Qualification: actual choices depend on scale, query patterns and the product. Relational systems can distribute data, and NoSQL systems can support validation and transactions. The recommendations identify a natural fit rather than an exclusive capability.