Recall & Review
beginner
What is a social graph in system design?
A social graph is a representation of users as nodes and their relationships (like friendships or follows) as edges connecting these nodes.
Click to reveal answer
intermediate
Why is graph database often preferred for social graph storage?
Graph databases efficiently store and query relationships between entities, making it easier to traverse connections like friends-of-friends quickly.
Click to reveal answer
intermediate
What is the main challenge in scaling social graph storage?
Handling a large number of users and their connections while maintaining fast query response times and data consistency.
Click to reveal answer
advanced
Explain the difference between adjacency list and adjacency matrix in social graph storage.
Adjacency list stores neighbors for each node, saving space for sparse graphs. Adjacency matrix uses a 2D array to represent connections, which is space-heavy but allows quick edge checks.
Click to reveal answer
intermediate
What is sharding in the context of social graph storage?
Sharding means splitting the graph data across multiple servers or databases to distribute load and improve scalability.
Click to reveal answer
Which database type is best suited for storing social graphs?
✗ Incorrect
Graph databases are designed to efficiently handle relationships and traversals common in social graphs.
What does an edge represent in a social graph?
✗ Incorrect
Edges connect nodes (users) and represent their relationships.
Which data structure is more space-efficient for sparse social graphs?
✗ Incorrect
Adjacency lists store only existing connections, saving space when many nodes have few edges.
What is a common method to scale social graph storage?
✗ Incorrect
Sharding splits data across servers to handle large scale and load.
Which query is typical in social graph systems?
✗ Incorrect
Social graph queries often involve traversing relationships like friends or followers.
Describe how you would design a scalable social graph storage system.
Think about how to store users and their connections efficiently and how to keep the system fast as it grows.
You got /5 concepts.
Explain the advantages and disadvantages of adjacency list vs adjacency matrix for social graph storage.
Compare space usage and query speed for both data structures.
You got /4 concepts.
