View on GitHub

Coin Expanse

Trading Automation. Made Simple.

Database Architecture

Motivation

The motivation behind our database schema was that we needed an efficient way to store and process large amounts of data about our two main focuses of our application: the users, and the coins. To do this, we created two main models which would be joined together within our application and stored respective information about each in the form of connected database tables.

Schema Overview

Our database is divided up into seven tables each containing data associated with the models in use in our application. The models that our application currently uses are the following:

These models can be separated into three main categories that represent the database relationships between the models.

The utility of structuring the database in this way is that all of the models that convey information about a User are connected to the User model via a many to one relationship, and likewise models that convey information about a Coin are connected to a Coin via a many to one relationship.

Since the News Article model served solely to populate our home page with news articles requested via an API, there was no need to connect it via database relationships to any other model, and therefore we left it as a standalone table.

Database visualization

Below is a visualization of the database schema that includes the table entries for each model:

Schema Visualization