Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

TableColumnDatatypeNull / Not NullComments
DriverThis table is responsible for a driver's data. This can be expanded further with a date of birth, length, age or something else.
DriverIDintNot nullThis is a unique identifier for a driver, with which a driver can be tied to races and rounds.
DriverNamevarchar(255)Not nullThe name of the driver in the format lastname, firstname.
DriverRaces

This table links the driver to the driven rounds within a race.
RaceIDintNot nullThis is the unique identifier of the race.
DriverIDintNot nullThis is the unique identifier of the driver.
RoundIDintNot nullThis is the unique identifier of the round.
GraphsThis table contains all data that is required to show a graph. It contains the sensor it is displaying the data for, and the type of graph it is.
GraphIDintNot nullThis is the unique identifier of the graph.
Typevarchar(255)Not null

The type of graph, can be anything from the following:

  • linechart
  • barchart
  • piechart
  • scatterchart
  • columnchart
  • areachart
  • donutchart
  • table
  • gaugechart
SensorIDintNot nullThe unique identifier of the sensor that the graph is displaying the data of.
RaceThis table contains all information relevant to a race.
RaceIDintNot null

The unique identifier of the race.

NumberOfRoundsintNot nullThe number of rounds that the race possesses.
RaceNamevarchar(255)Not nullThe name of the race.
DateDATETIMENot nullThe date of the start of the race.
RoundsThis table contains all information that is needed to define a round.
RoundnumberintNot nullThe number of the round.
RaceIDintNot nullThe unique identifier of the race that the round belongs to.
TimestampBeginDATETIMETIMENot nullThe starting time of the round.
TimestampEndDATETIMETIMENot nullThe ending time of the round.
SensorsThis table functions as collection of all sensors.
SensorIDintNot nullThe unique identifier of the sensor.
SensorNamevarchar(255)Not nullThe name of the sensor.
TabGraphsThis table couples all graphs to a specific tab.
TabIDintNot nullThe unique identifier of the tab.
GraphIDintNot nullThe unique identifier of the graph.

Tabs

This table contains all information that is relevant to a Tab.
TabIDintNot nullThe unique identifier of the tab.
TabNamevarchar(255)Not nullThe name of the tab. The name is set when creating a new tab in the frontend web-application.
RaceIDintNot nullThe unique identifier of the race that the tab belongs to.
UserThis table handles all user data and other data relevant to have users that can interact with the application.
UserIDintNot nullThe unique identifier of the user.
Usernamevarchar(255)Not nullThe unique name of a user that will be on display in the frontend web-application.
Passwordvarchar(255)Not nullThe hashed password of the user that is needed when logging in into the web-application.
UserTabsThis table is responsible for tying all tabs that have been created by a user.
UserIDintNot nullThe unique identifier of the user.
TabIDintNot nullThe unique identifier of the tab.
WheelspeedSensorThis table can be used for any future sensor that is added to the car. This table will need to be copied and its unique third row should be edited to accomodate the right datatype and name for this new sensor.
WheelspeedSensorIDintNot nullThe unique identifier of the specific sensor.
TimestampDATETIMENullThe timestamp when the specific piece of data was received from the sensor.
RPM (data)floatNull

This field contains the specific data that a sensor sends to this database. For this specific sensor, that data is received as RPM. When a new sensor is added to the API, a new table, just like this one should be created where only the data field should be edited.

...

Decision 1

Description

Problem/Issue

Throwing all of the different sensors and their data into one big table will quickly create a very clumped and hard-to-read table.
DecisionCreate a different table for every sensor and add a new table that contains all sensor IDs.
Alternatives-
ArgumentsBy dividing data over multiple tables, query time can be shortened significantly and keeps all of our tables in line with the Single Responsibility normalization principle.
Decision 2Description
Problem/issueA driver is only driving a couple of rounds in a race, which will create quite a confusing table if thrown into a single race tables.
Decision

Divide the different datatypes into multiple tables: a rounds table, a race table and a driver table.

Create a linking table that links all of these three tables together.

Alternatives-
ArgumentsBy dividing the table into a multitude of different tables, there's three distinct tables that are in line with the Single Responsibility normalization principle.