Races - netnutmike/subracetracker GitHub Wiki

Description

This table holds the details of each Team.

Field Descriptions

uid

The unique record ID

RaceID

This is a freeform field where whatever identification is used for each race can be entered.

TeamID

The unique record id of the team.

StartTime

This is the time when the sub crosses the start line.

FinishTime

This is the time when the sub crosses the finish line.

Time1

This is an additional time field that can be used track additional timing related events.

Time2

This is an additional time field that can be used track additional timing related events.

Time3

This is an additional time field that can be used track additional timing related events.

Time4

This is an additional time field that can be used track additional timing related events.

Status

This is the status of the race. This value will come from the lists table. One status would be race complete, maybe race in progress, race not started, etc. Depending on the workflow, races could be pre-entered and the status changed when it is time for the race.

Class

This is for overriding the default class set in the team. The class comes from the lists tables. If this field is null or zero it is assumed that the default set for the team is the class that used.

Notes

This is a freeform field that notes for the race/run can be entered into.

RaceDate

The date that this race was run.

Table Layout

+-------------+-------------+------+-----+---------+----------------+
| Field       | Type        | Null | Key | Default | Extra          |
+-------------+-------------+------+-----+---------+----------------+
| uid         | int(11)     | NO   | PRI | NULL    | auto_increment |
| TeamID      | int(11)     | YES  |     | NULL    |                |
| StartTime   | varchar(15) | YES  |     | NULL    |                |
| FinishTime  | varchar(15) | YES  |     | NULL    |                |
| Time1       | varchar(15) | YES  |     | NULL    |                |
| Time2       | varchar(15) | YES  |     | NULL    |                |
| Time3       | varchar(15) | YES  |     | NULL    |                |
| Time4       | varchar(15) | YES  |     | NULL    |                |
| Status      | int(11)     | YES  |     | NULL    |                |
| Class       | int(11)     | YES  |     | NULL    |                |
| Notes       | text        | YES  |     | NULL    |                |
| RaceDate    | date        | YES  |     | NULL    |                |
| RaceID      | int(11)     | YES  |     | NULL    |                |
| Speed1      | float       | YES  |     | NULL    |                |
| Speed2      | float       | YES  |     | NULL    |                |
| Speed3      | float       | YES  |     | NULL    |                |
| Speed4      | float       | YES  |     | NULL    |                |
| TotalSpeed  | float       | YES  |     | NULL    |                |
| BestSpeed   | float       | YES  |     | NULL    |                |
| LowestSpeed | float       | YES  |     | NULL    |                |
| RaceHour    | int         | YES  |     | NULL    |                |
+-------------+-------------+------+-----+---------+----------------+

Creation Script

create table Races (uid int auto_increment, RaceID int, TeamID int, StartTime varchar(15), FinishTime varchar(15), Time1 varchar(15), Time2 varchar(15), Time3 varchar(15), Time4 varchar(15), Status int, Class int, Notes text, RaceDate date, Speed1 float, Speed2 float, Speed3 float, Speed4 Float, TotalSpeed float, BestSpeed float, LowestSpeed float, RaceHour int, primary key(uid));