/gdshowsdb

All Grateful Dead show information in a relational database.

Primary LanguageRubyMIT LicenseMIT

https://github.com/jefmsmit/gdshowsdb/actions?query=workflow%3ACI

Gdshowsdb

All Grateful Dead show information in a relational database.

Hoping to make this freely available database the cannonical resource for all Grateful Dead concert information.

Additionally, This Gem can be used as an API to the data.

Please Note

Versions prior to 4.0.0 had issues with data integrity. Specificaly, there were no database constrains around uniqueness, and there were duplicate UUIDs on Songs. It is strongly recommended that you upgrade to a version 4.0.0 or higher.

Using with Ruby

require 'gdshowsdb'

Gdshowsdb.init()
Gdshowsdb.load()

jack_straw_shows = SongRef.find_by_name('Jack Straw').shows

jack_straw_shows.each do |show|
	puts show.title
end

Using with Rails

Add this to your Gemfile

gem 'gdshowsdb'

Generate the database migrations

rails generate gdshowsdatabase

Understanding the Model

The SongRef class represents the reference data about a song. For example there is only one SongRef instance (or database row if you prefer) for "Wharf Rat". This allows us to normalize song names so its always "Goin' Down The Road Feeling Bad" and not sometimes "GDTRFB". A SongRef knows the Shows where it was performed.

The Show class is for reprsenting all the particulars about a performance. City, State, Venue, etc.

The ShowSet class is for representing a segment of a show. That way we can know what was played in the first set version the second versus the encore. I did not call it Set in order to avoid confusing with the Ruby class of the same name.

The Song class is for representing the occurence of a SongRef. Songs know which set the occurence of a SongRef happened in, its position in the ShowSet as well as wether it was segued out of.

The SongOccurence class is named association (think join table in sql) that allows a Show to know which SongRefs were performed without having to traverse throug the ShowSets. I'm not convinced of this classes value and might remove it.