SQL schema
Authoritative version is in source:chrome/songbee/songbee-sql.js but here is an annotated version.
CREATE TABLE play_item ( --- An item in a playlist id INTEGER PRIMARY KEY NOT NULL, playlist int(11) , --- which playlist we are a member of song int(11) , --- an entry into the "song" table position int(11) , --- order of this item in the list type varchar(255) , --- (new in 2.0) perhaps it's not a song - what is it? data --- (new in 2.0) if it isn't a song, any associated data (bible ref, URL etc.) ); CREATE TABLE playlist ( --- A playlist id INTEGER PRIMARY KEY NOT NULL, name varchar(255), css --- (new in 2.0) per-playlist display preferences ); CREATE TABLE song ( --- A song id INTEGER PRIMARY KEY NOT NULL, song_key int(11) , --- Key (Unused as yet) title varchar(255) , --- Title first_line varchar(255) , --- First line (automatically extracted from XML) xml text, --- Song data age integer, --- Number of playlists viewed since song was created playcount integer --- Number of times the song has been played. );
song.playcount / song.age is a rough indicator of popularity. play_item.type and play_item.data are a mechanism for extending the functionality of playlists beyond merely songs. source:chrome/songbee/songbee.js needs a bit of a rewrite to make them happen nicely - perhaps a dispatch table on type.
