About This Database
The Welsh Castles Relay Historic Results Database catalogues stage-by-stage results for every running of the Welsh Castles Relay from 1983 onward — every team, every runner, every stage.
For the uninitiated, the Welsh Castles Relay is a 20 stage running relay from Caernarfon Castle to close to Cardiff Castle. It is not now a continuous ''touch'' relay, rather 20 races over the first weekend of every June. It can quite justifiably be called the premier league of road relays.
In case anyone wants to know the technical details (you probably don''t). This website runs on a Raspberry Pi 5 with 8GB RAM and a NVME drive (because I am not a total madman). It runs command line 64 bit Debian as the OS. The application is Python with Flask using Postgres as the database. I am using Cloudflare to look after the tricky bits. My internet connection is 300MBits/sec down and 48 MBits/sec up which is probably my limiting factor. I don''t know at which point my ISP will decide that I have breached the TOS for traffic. Fortunately there is nothing heavyweight being served so we might get away with it. What did this all cost? Mainly my time, the Pi was already controlling my NAS, my network and my VPN and the Domain is $5 per year.
The underlying schema is shown below as a Mermaid entity–relationship diagram. Referential integrity, partial unique indexes and constraints enforce data quality; the application layer handles normalisation of club names, athlete merges and the carry-forward of stage records across distance eras.