Courseiva
Workload-Specific Database DesignmediumMultiple ChoiceObjective-mapped

Geospatial Queries in DynamoDB for Real-Time Driver Locations

A company is designing a database for a ride-sharing application that needs to store real-time driver locations and trip history. The application requires low-latency updates to driver locations (every few seconds) and the ability to query nearby drivers within a radius. The company expects millions of drivers and trips. Which AWS database service should the database specialist recommend for storing real-time driver locations and supporting proximity queries?

Quick Answer

Amazon DynamoDB with a Geohash-based partition key and a Global Secondary Index is the correct choice because it delivers the single-digit millisecond writes needed for updating driver locations every few seconds, while the geohash encoding groups geographically close drivers into the same partition, enabling efficient radius queries via prefix scans on the GSI. This design directly addresses the core challenge of geospatial queries in DynamoDB: balancing write throughput with proximity search performance at scale. On the AWS Certified Database Specialty DBS-C01 exam, this scenario tests your understanding of how to model location data in a NoSQL context without native geospatial indexing—a common trap is reaching for Amazon Location Service or RDS PostGIS, but DynamoDB’s geohash pattern is the optimized solution for high-frequency writes and low-latency reads. Memory tip: think “GeoHash = Grid + Hash” — the grid groups neighbors, the hash distributes writes.

⚠ Common exam trap

Watch out — candidates often choose Amazon ElastiCache for Redis because of its built-in geospatial commands (GEOADD/GEORADIUS), overlooking the requirement for durable trip history storage and the scalability limits of Redis when handling millions of concurrent updates and queries.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Amazon DynamoDB with a Geohash-based partition key and a Global Secondary Index

Amazon DynamoDB with a Geohash-based partition key and a Global Secondary Index is the correct choice because it provides the low-latency writes (single-digit milliseconds) required for updating driver locations every few seconds, while the Geohash-based key enables efficient proximity queries by grouping nearby drivers into the same partition. The Global Secondary Index allows querying by geohash prefix to find drivers within a radius, scaling to millions of drivers and trips with DynamoDB's auto-scaling and fully managed infrastructure.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Amazon RDS for PostgreSQL with PostGIS extension

    Why it's wrong here

    PostGIS is powerful but may struggle with high-frequency updates and scaling to millions of drivers.

  • Amazon ElastiCache for Redis with geospatial data types

    Why it's wrong here

    Redis is fast but not durable for trip history; it is typically used as a cache.

  • Amazon DynamoDB with a Geohash-based partition key and a Global Secondary Index

    Why this is correct

    DynamoDB can handle high throughput and geospatial queries via Geohash.

  • Amazon Timestream

    Why it's wrong here

    Timestream is for time-series data, not geospatial queries.

Quick reference

AAA Protocol Comparison

ProtocolPort(s)EncryptionTransportPrimary Use
RADIUS1812 / 1813Password onlyUDPNetwork access control
TACACS+49Full packetTCPDevice administration
Diameter3868Full sessionTCP / SCTPCarrier / mobile networks
802.1XEAP-basedLayer 2Port-based access control

TACACS+ encrypts the entire packet; RADIUS only encrypts the password field — a key exam distinction.

About these practice questions

One of 1,663 original DBS-C01 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

1 more way this is tested on DBS-C01

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. A company is designing a database for a ride-sharing application that requires real-time location updates and driver-passenger matching. The database must support geospatial queries to find nearby drivers within a radius. The expected throughput is 10,000 writes per second and 5,000 reads per second. The company wants a fully managed solution with low latency. The application team has experience with PostgreSQL. Which database design should they choose?

medium
  • A.Use Amazon Aurora PostgreSQL with the PostGIS extension and use read replicas for scaling reads.
  • B.Use Amazon DynamoDB with a geospatial library to encode locations into a partition key.
  • C.Use Amazon DynamoDB with a global secondary index on a geohash attribute for proximity queries.
  • D.Use Amazon RDS for MySQL with spatial indexes and Multi-AZ deployment.

Why A: Amazon Aurora PostgreSQL supports PostGIS for geospatial queries, can scale to handle the throughput with write replicas and auto-scaling, and is fully managed. Option B (DynamoDB) is not ideal for geospatial queries; it requires complex partitioning. Option C (DynamoDB with GSI) still not good for radius queries. Option D (RDS MySQL) has geospatial support but may not scale as well as Aurora.

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This DBS-C01 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the DBS-C01 exam.