Saturday, October 25, 2014

Tables and chairs

In my previous post, The Elusive Balance, I had mentioned that my goal was to enter twenty-three CDs into the Media_Title table. I am happy to report that this goal was reached, and the rack they were destined to fill is now completely occupied. After doing the updates to this table, however, I discovered some flaws in my "main" media table, which has caused me to reconsider the design of my database.

I wish I could remember where I had read this, but someone once wrote that the best way to start a database is to design it with pencil and paper. Although I've always agreed in principle that this was a great idea, in all of the databases which I've designed, I've rarely heeded this sage advice. This is partly because planning things often results in frustration and headaches for me, but also partly because I can "see" with my mind's eye what the database will look like and what it will do prior to a single keystroke being executed (note to the faint of heart and the true database newbs: semi-professional DBA on a closed course. Do not attempt at home or work. Especially at work).

One other caveat is necessary when discussing database design: don't be too afraid of change.

When the idea of Forty-Two first came into my mind is hard to say- it predates this blog by a few years at the very least. The concept was fairly modest, at first, and didn't even actually have music or media as its primary focus. It was actually my Lego collection. This was another project that grew by fits, false starts, and occasional bursts of inspiration and diligence. And it was done entirely in Excel. Over time, though, I saw the possibility of building something more powerful (and consequently more useful) in Access.

The earliest Access versions- starting in Access 2003, then moving to 2007 and finally 2010- were not grand by any stretch of the imagination, and were at first only intended to catalog music CDs. Eventually, movies seemed to be a natural addition and were incorporated, followed by books, software, console games and finally books in the latest iteration. And all of it goes back to Lego.

One of the problems I have with Lego elements is that although I do not have a large collection by many AFOL (Adult Fan of Lego) collectors' standards, I have enough to necessitate them being stored in different containers and in different locations in our home. As I was working in Excel, I found that I didn't have a really good way of taking this into account. When I realized that Access could handle this particular problem, another thought occurred to me: I could do this with media as well, and eventually incorporate things that were totally unrelated, and this could be useful in insurance planning.

That's the short version of the history of Forty-Two. The immediate future, as alluded to in the first paragraph, will see the end of what I often refer to as the "primary" table. It will be replaced by several (relatively) smaller tables, each being tasked with holding a specific type of media: music, videos, books, etc. Other tables will host data on Legos and electronics, for starters. And lastly there will be the helper table which exist primarily to normalize the database.

Whew! A whole blog post devoted to data and nothing but data. At this point some may be wondering what is up with the chairs in the title? Well, "Tables" alone sounded boring; "chairs" is pretty much an attempt at a hook to draw a potential reader in.

As always, I am hochspeyer, blogging data analysis and management so you don't have to.

No comments:

Post a Comment