⬆ Design Documents Overview

DocNow Database Schema

creator: Ed Summers
created: 2020-01-14


We have determined that it’s feasible to stream an adequate volume of tweets (a trending hashtag at 50 tweets/sec) into a PostgreSQL instance running on a Raspberry Pi 4. This was with a single table (id, json). Now we need to determine what database schema we would need in order to support the current (and anticipated) functionality provided by the DocNow app.


The database schema that could support the types of metrics that are currently being provided by the DocNow application. This schema will be expressed using the [knex] library to easily manage the schema over time. A loading script written in JavaScript will be written for loading data from the Twitter filter stream into the database schema, and another script will time a series of reports from collected data. This reporting script can be used to benchmark how well the database schema can be used in live in the DocNow application.


Create tables to model the following relations:

A few things to note about this schema:

Action Items