Versions Compared

Key

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

...

This is the database setup we will use for the RegterschotRacing API. A ful ldescription full description of every tables usage and datatypes can be found below.

...

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 encompassespossesses.
RaceNamevarchar(255)Not nullThe name of the race.
RoundsThis table contains all information that is needed to define a round.
RoundsIDintNot nullThe unique identifier of the racethe rounds.
RaceIDintNot nullThe unique identifier of the race that the round belongs to.
TimestampBeginDATETIMENot nullThe starting time of the round.
TimestampEndDATETIMENot 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 spcific 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 where only the data field should be edited.

...