In the following sections, we will perform an extended analysis of the data models that are required for the operation of the link graph component. We will kick off our analysis by creating an Entity-Relationship (ER) diagram for the entities that compose the data access layer. Then, we will define an interface that fully describes the set of operations that the data access layer must support.
Finally, we will design and build two alternative data access layer implementations (in-memory and CockroachDB-backed) that both satisfy the aforementioned interface. To ensure that both implementations behave in exactly the same manner, we will also create a comprehensive, store-agnostic test suite and arrange for our test code to invoke it for each individual store implementation.
All the code that we will be discussing in the following...