Below is a script I recently published to another list, mostly of math teachers, designed to start with SQL table creation and end with something HTML, as this models record-keeping and visualization at the industrial scale.
I'm using Python in the middle, but sure, the controller could be a different language performing the same task. I use collections.namedtuple, one of my favorites, and exercise the DB API to a minimum, leaving plenty of room for others to expand.
Kirby