Versions Compared

Key

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

...

Design Sub-System B (and so on)


Database Design

<. If your system uses relational databases, make sure you provide a physical datamodel here.>

...


Image Added

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



All green boxes will be made by Smalltalk in order to provide a sound foundation to build an API on. The two red boxes could be future expansions that are out of our current scope. These have been placed here as an example to provide future developers with a stepping stone. These expansions would allow for the creation of 'Raceteams', which could give the API the functionality to be used by other raceteams, each with their own crew and cars. The sensors have been tied to the racecar, as all sensors should be in a racecar.


 Database Glossary

Tablenames and formats are written in italic.

TableRowDatatypeNull / 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 encompasses.
RaceNamevarchar(255)Not nullThe name of the race.
RoundsRoundsIDintNot nullThe unique identifier of the race.
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.
SensorsSensorIDintNot nullThe unique identifier of the sensor.
SensorNamevarchar(255)NullThe name of the sensor.
TabGraphsTabIDintNot null
GraphIDintNot null

Tabs

TabIDintNot null
TabNamevarchar(255)Null
RaceIDintNot null
UserUserIDintNot null
Usernamevarchar(255)Not null
Passwordvarchar(255)Not null
UserTabsUserIDintNot null
TabIDintNot null
WheelspeedSensorWheelspeedSensorIDintNot null
TimestampDATETIMENull
RPMfloatNull

Design decisions related to the database

...