C
Cswenson
Guest
I am a volunteer for a school district to build an Access database for tracking visits by the administration to schools in the system. I would appreciate responses about the RIGHT method to construct the database. I have seen too many stupid database designs and don't want anyone looking at this next year and thinking it is non-standard.
For the explanation I have pared down the tables to the essence:
Table: Schools
Fields: SchoolCode, SchoolName, SchoolPrincipal
Table: Visits
Fields: VisitID, VSchoolCode, VisitDate, VSchoolName, VSchoolPrincipal
Relationship: SchoolCode (one-to-many) VSchoolCode
SelectQuery: AddVisit
All fields except VisitID and SchoolCode
Form on AddVisit:
Fields: VSchoolCode, VisitDate, VSchoolName, VSchoolPrincipal
When the VSchoolCode is entered on the form the SchoolName and schoolPrincipal are automatically filled in by a VB Event:
VSchoolCode field Event (after update)
VB code: VSchoolName=SchoolName
VSchoolPrincipal=SchoolPrincipal
This means that the school and principal at the time of the visit is recorded and stored. When a new principal is assigned in Schools, the old visits will NOT be updated to show a new principal name. The principal at the time of the visit remains in the visit record. (It may seem funny to also store the school name but some schools do occasionally get renamed.)
The Schools table has under 100 records and the Visits table will have under 1000 record. (Space and speed are less important than readability and clarity.) I used VB only because I couldn't figure out how to make this work in an elementary way. Would this design make sense to an Access expert looking at this next year?
For the explanation I have pared down the tables to the essence:
Table: Schools
Fields: SchoolCode, SchoolName, SchoolPrincipal
Table: Visits
Fields: VisitID, VSchoolCode, VisitDate, VSchoolName, VSchoolPrincipal
Relationship: SchoolCode (one-to-many) VSchoolCode
SelectQuery: AddVisit
All fields except VisitID and SchoolCode
Form on AddVisit:
Fields: VSchoolCode, VisitDate, VSchoolName, VSchoolPrincipal
When the VSchoolCode is entered on the form the SchoolName and schoolPrincipal are automatically filled in by a VB Event:
VSchoolCode field Event (after update)
VB code: VSchoolName=SchoolName
VSchoolPrincipal=SchoolPrincipal
This means that the school and principal at the time of the visit is recorded and stored. When a new principal is assigned in Schools, the old visits will NOT be updated to show a new principal name. The principal at the time of the visit remains in the visit record. (It may seem funny to also store the school name but some schools do occasionally get renamed.)
The Schools table has under 100 records and the Visits table will have under 1000 record. (Space and speed are less important than readability and clarity.) I used VB only because I couldn't figure out how to make this work in an elementary way. Would this design make sense to an Access expert looking at this next year?