Our Data Model

At this point, we have a running xnlogic application that contains only boilerplate code. We will gradually turn this application into a simplified version of Twitter.

Data model

Here is a high-level description of our data model:

  • The only entities/models are Users and Tweets.
    • User has two properties, username and email.
    • Tweet has one property, text.
  • A User can create Tweets.
    That is, there is a one-to-many relation between a user and their tweets.
  • Users can follow other users.
    That is, there is a many-to-many relation between users (i.e. a user can follow many users, and can be followed by many users).

Our Goal

In the next few tutorials, we will gradually build our application - An API server, backed by a graph database. We will use the power of graph databases and the xnlogic framework, to perform interesting queries on our data.