educative.io

Educative

No mention of the UserPhoto table

We need to store relationships between users and photos to know who owns which photo. We also need to store the list of people a user follows. For both of these tables, we can use a wide-column datastore like Cassandra. For the ‘UserPhoto’ table, the ‘key’ would be ‘UserID’ and the ‘value’ would be the list of ‘PhotoIDs’ the user owns, stored in different columns. We will have a similar scheme for the ‘UserFollow’ table.

What UserPhoto table? It isn’t shown in the diagrams and isn’t used in any of the size calculations.

2 Likes