...
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.
...
Table | Column | Datatype | Null / Not Null | Comments |
---|---|---|---|---|
Driver | This table is responsible for a driver's data. This can be expanded further with a date of birth, length, age or something else. | |||
DriverID | int | Not null | This is a unique identifier for a driver, with which a driver can be tied to races and rounds. | |
DriverName | varchar(255) | Not null | The name of the driver in the format lastname, firstname. | |
DriverRaces | This table links the driver to the driven rounds within a race. | |||
RaceID | int | Not null | This is the unique identifier of the race. | |
DriverID | int | Not null | This is the unique identifier of the driver. | |
RoundID | int | Not null | This is the unique identifier of the round. | |
Graphs | This 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. | |||
GraphID | int | Not null | This is the unique identifier of the graph. | |
Type | varchar(255) | Not null | The type of graph, can be anything from the following:
| |
SensorID | int | Not null | The unique identifier of the sensor that the graph is displaying the data of. | |
Race | This table contains all information relevant to a race. | |||
RaceID | int | Not null | The unique identifier of the race. | |
NumberOfRounds | int | Not null | The number of rounds that the race encompassespossesses. | |
RaceName | varchar(255) | Not null | The name of the race. | |
Rounds | This table contains all information that is needed to define a round. | |||
RoundsID | int | Not null | The unique identifier of the racethe rounds. | |
RaceID | int | Not null | The unique identifier of the race that the round belongs to. | |
TimestampBegin | DATETIME | Not null | The starting time of the round. | |
TimestampEnd | DATETIME | Not null | The ending time of the round. | |
Sensors | This table functions as collection of all sensors. | |||
SensorID | int | Not null | The unique identifier of the sensor. | |
SensorName | varchar(255) | Not null | The name of the sensor. | |
TabGraphs | This table couples all graphs to a specific tab. | |||
TabID | int | Not null | The unique identifier of the tab. | |
GraphID | int | Not null | The unique identifier of the graph. | |
Tabs | This table contains all information that is relevant to a Tab. | |||
TabID | int | Not null | The unique identifier of the tab. | |
TabName | varchar(255) | Not null | The name of the tab. The name is set when creating a new tab in the frontend web-application. | |
RaceID | int | Not null | The unique identifier of the race that the tab belongs to. | |
User | This table handles all user data and other data relevant to have users that can interact with the application. | |||
UserID | int | Not null | The unique identifier of the user. | |
Username | varchar(255) | Not null | The unique name of a user that will be on display in the frontend web-application. | |
Password | varchar(255) | Not null | The hashed password of the user that is needed when logging in into the web-application. | |
UserTabs | This table is responsible for tying all tabs that have been created by a user. | |||
UserID | int | Not null | The unique identifier of the user. | |
TabID | int | Not null | The unique identifier of the tab. | |
WheelspeedSensor | This 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. | |||
WheelspeedSensorID | int | Not null | The unique identifier of the specific sensor. | |
Timestamp | DATETIME | Null | The timestamp when the specific piece of data was received from the sensor. | |
RPM (data) | float | Null | 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. |
...