fat controller
Slightly round the bend..
- Local time
- Today, 23:08
- Joined
- Apr 14, 2011
- Messages
- 758
I am starting a fresh database, and in comparison to the last time I commenced a project like this, I am a little bit less 'green' - so, rather than work around a structure that is OK but not ideal, I would like to try and get the structure right from the start, and to do so I could do with some guidance please.
As it stands, for this first stage, I think I need either three or four tables, as follows:
tblRouteRecords
ID - Autonumber
Route - Text
DestUp - Text
DestDown - Text
StreetsUp - Text
StreetsDown - Text
IssueReason - Text
Status - Text
DateFinalised - Short Date
DateValidFrom - ShortDate
TemporaryIssue - Yes/No
AuthVehicles - Text
Warnings - Text
tblDeadRuns
ID - Autonumber
Route - Text
Description - Text
Detail - Memo
tblStands
ID - Autonumber
Route - Text
StandName
Directions
Availability
OpRestrictions
MealRelief
FerryVeh
Display
Now, I am wondering if I should have one more table for best normalisation, which would be:
tblRoutes
ID - Autonumber
Route - Text
DestUp - Text*
DestDown - Text*
StreetsUp - Text*
StreetsDown - Text*
*These fields would then not appear in tblRouteRecords
At the output end, I am needing to produce a report using the data from all tables. The data from tblRouteRecords will be one record, the data from tblDeadRuns will be numerous records, the data from tblStands will be numerous records, and the data from tblRoutes will be one record.
In short, a report that shows all available stands and all available dead runs for each route. If possible with the report, I would like the report to automatically re-size depending on the number of stands and dead runs that are included (as in, not showing a load of blank space if there is only three of each on a particular route).
Am I on the right track, and what sort of relationships would I need to create between those tables?
EDIT - also, the report that is produced and finalised, I would need to stay the same as it was at the time it was issued (and be able to be reprinted from the database), and not change if there are changes made to fields such as StreetsUp, StreetsDown etc, so I am assuming that I will need to have a valid from and to date in each of the tables with the exception of tblRouteRecords?
As it stands, for this first stage, I think I need either three or four tables, as follows:
tblRouteRecords
ID - Autonumber
Route - Text
DestUp - Text
DestDown - Text
StreetsUp - Text
StreetsDown - Text
IssueReason - Text
Status - Text
DateFinalised - Short Date
DateValidFrom - ShortDate
TemporaryIssue - Yes/No
AuthVehicles - Text
Warnings - Text
tblDeadRuns
ID - Autonumber
Route - Text
Description - Text
Detail - Memo
tblStands
ID - Autonumber
Route - Text
StandName
Directions
Availability
OpRestrictions
MealRelief
FerryVeh
Display
Now, I am wondering if I should have one more table for best normalisation, which would be:
tblRoutes
ID - Autonumber
Route - Text
DestUp - Text*
DestDown - Text*
StreetsUp - Text*
StreetsDown - Text*
*These fields would then not appear in tblRouteRecords
At the output end, I am needing to produce a report using the data from all tables. The data from tblRouteRecords will be one record, the data from tblDeadRuns will be numerous records, the data from tblStands will be numerous records, and the data from tblRoutes will be one record.
In short, a report that shows all available stands and all available dead runs for each route. If possible with the report, I would like the report to automatically re-size depending on the number of stands and dead runs that are included (as in, not showing a load of blank space if there is only three of each on a particular route).
Am I on the right track, and what sort of relationships would I need to create between those tables?
EDIT - also, the report that is produced and finalised, I would need to stay the same as it was at the time it was issued (and be able to be reprinted from the database), and not change if there are changes made to fields such as StreetsUp, StreetsDown etc, so I am assuming that I will need to have a valid from and to date in each of the tables with the exception of tblRouteRecords?
Last edited: