This is one of those write it down so you don’t forget posts. Because I already didn’t write it down once and I am having to flail/dig around to my head wrapped around it.
Nearly every database project I have currrently has a number of supplementary scripts (99% of the time these are custom Octopus Deploy steps). Up until now we’ve made do with keeping them in the project repo but copy/pasting them into Octopus when needed.
Over the last few years I have had a few friends ask about making a transition into working with data. I’ve spent some time asking them about what they are currently doing and then what they think they’d like to be doing more of so I can give them specific advice or direct them to follow specific SQL family1. But consistently one question is “How do I get better at SQL?
Last week we normalized the most import bits of my reading data. This week I plan to ramble a bit about how we might add some more data and the various complications that come from that.
The primary purpose (tracking books read) is served by the final data model from last week but maybe we want to some extra metadata around our books (or readers). Some of that will likely end up directly in our relational model but as we add meta-data we need to start making decisions about how our database will be modeled and it will affect the performance whether that’s adding stored data or putting data in places that work better for some use cases than others.
In my last post mentioned that shape of my reading data is generally a solved problem and then I joined a Bookwrym1 instance and it really does do all the things I’d generally hope for with tracking my reading (although I still don’t understand why page count is part of a MARC record but word count is not but today I will not start fights with librarians/cataloguers). I do think the data set is useful for the thought experiment of normalizing data and I may even extrapolate what I think Bookwyrm might be doing to store data.
We’ve all been really short on spoon the last couple of years and I’m not convinced it’s going to get a lot better so I am working on motivating myself to write. The local UG is sadly no more and I need to find some thing to write (and eventually speak) about to fill the void left in my heart. I’ve bounced a few ideas around and decided that instead of trying to find something I’d start with a problem I had at hand.
I don’t hate generating SQL dynamically like some may (apparently this is a relatively polarizing topic?) but I don’t love having to do it via SQL itself. Thankfully if I am needing to generate queries dynamically it’s some sort of one-off and not something that I need long term so my go-to for generating SQL is PowerShell. Please enjoy this short play in three acts about my recent need to generate a stupid amount of dynamic SQL.