passdrill
AWS SAA-C03 · RDS, DynamoDB & Databases · Card 024/024 hard

A social platform needs to model and query millions of user connections, likes, and follows to power a friend-of-friend recommendation feature, running queries like 'find people two connections away who share three or more mutual friends' with millisecond latency. Which AWS database service and query approach fits this best, and why?

  1. Amazon DynamoDB with a single global secondary index on the connection type, since key-value lookups are the fastest way to traverse multi-hop relationships
  2. Amazon Redshift, using SQL joins across a normalized schema of users and connections, since columnar storage and massively parallel processing make deep multi-hop joins fast at any depth
  3. Amazon Neptune, a purpose-built graph database supporting the Gremlin and openCypher property-graph query languages, optimized for traversing highly connected data with millisecond latency
  4. Amazon Aurora PostgreSQL, using recursive common table expressions (CTEs) over a foreign-key-linked users/connections schema to walk each hop of the friendship graph
Next card → Shuffle