|
The main reason for outputting all this information as SQL statements is
that once it's in that form I can put it into a relational database.
Once it's all in a relational database, I can query it.
This is not the place for extolling the virtues of the relational
database, but suffice it to say that I got some good results out easily
once the information was in there. For instance:
- station count
- lists of stations sorted by line
- spin - an experimental game property for Mornington Nomic
It is this last which was the stimulus for doing all this work in the
first place, since what I needed was a formula for spin values which
could be applied to all stations and produce values in a certain range,
with an even distribution across this range, and with values that
changed a lot over a short distance. This is the kind of formula which
can only be determined by fiddling a lot and seeing how the results
work out, and having the data in an RDBMS was a sensible way of changing
formula and seeing how the results varied.
Since Spin was just too complicated a property to manage, I gave up on
it (Becks had failed, after all, and that was much simpler!) so I never
came up with a particularly good formula. But that's just life
sometimes.
I did have good results using this database to produce reports of station
data, including charge values (another Mornington Nomic property).
It is worth noting that I would have had second thoughts about storing this
information in a relational database if my only goal had been these reports.
Perl is efficient at manipulating and indexing stuff so in-memory data
manipulation would have been good enough for that task. However, it's hard to
query. That really is what SQL is for.
|