Skip to main content

Posts

Showing posts with the label Databases

Board Game Geek Data - Sliced and Diced

Inspired by the discovery of the API for the BoardGameGeek website , I decided to play around with some of its data by some Ruby and JavaScript scripting. One thing I wanted to look at was the interconnectedness of game mechanics, but first I wanted to find alternative ways to look at how to measure ones "use" of ones game collection, and the associated question of "can a board game collection ever be too big?". H-index and play per game For example, the concept of H-index  is being discussed quite a bit on the ’geek. In short this entails sorting your games by number of plays and finding the last entry in the list with a number of plays higher than (or equal to) the position in the list. It’s rank is your H-index. (This does, of course require one to  meticulously  log ones plays, but that is another story… For example my overall BGG H-index for the last 12 months is (or seems to be) a measly 5.) Another concept used is to take the number og games owned an...

Sequel on the Pi - and how to access Access DBs from Ruby (in parenthesis)

Recently I had to liberate some data from an old MS Access DB, so I discovered a gem of a Ruby gem called " sequel " that generalizes database access (for many different databases) - ORM style. Most excellent, so I figured I wanted to run it on my raspberry pi to access various sqlite databases I have lying around. Assuming you already have ruby (1.9) installed, you can simply do (in any Debian flavored Linux, for that matter): sudo apt-get install sqlite3 libsqlite3-dev and sudo gem install sequel sqlite3 So now one can fire up irb and do things like: require 'sequel' db = Sequel.sqlite('some_db.db') Etc . (This will, of course, not let you access MS Access DBs on your pi, as they rely on the "win32ole" gem - only available on windows, and the " Microsoft Access Database Engine " - also only available on windows. More info on how to connect to those kinds of database can be found here  - under 'ado'.)