Skip to content
This repository has been archived by the owner on Dec 29, 2018. It is now read-only.

Commit

Permalink
initial thoughts on schema
Browse files Browse the repository at this point in the history
  • Loading branch information
bywo committed Nov 14, 2013
1 parent 1bc91a0 commit 4d02060
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions schema.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
### Base

* Users can create Playlists.
* Songs can be added to Playlists.
* Songs are represented by one or more Sounds.
* This part isn't required, but I think it's useful
* prevents duplicate Songs
* allows for a fallback if a single Sound gets taken down for whatever reason
* gives flexibility for if a user has a preferred audio source (e.g. premium spotify account)
* Reordering playlists will take O(n) time to replace the `index` field for each Song. I couldn't find a better representation for playlists. We can worry about perf later.

```
Song

This comment has been minimized.

Copy link
@mcchang

mcchang Nov 14, 2013

Collaborator

How do remixes/mashups fall into this?

This comment has been minimized.

Copy link
@bywo

bywo Nov 14, 2013

Author Owner

remixes/mashups are also Songs. We can start tracking relationships between songs (something I'm really interested in), but it might be out of the scope of MVP

RemixesOf
    id
    original {Song}
    remix {Song}
id

This comment has been minimized.

Copy link
@mcchang

mcchang Nov 14, 2013

Collaborator

Is this some random ID?

This comment has been minimized.

Copy link
@bywo

bywo Nov 14, 2013

Author Owner

yea assuming it's gonna be auto-generated by the ORM.

title
artist
album
Sound
id
song {Song}
type # e.g. youtube, soundcloud, mp3
location # used with type to locate the sound
Playlist
id
user {User}
name
SongInList
id
playlist {Playlist}
song {Song}
index # int for where song is in the list
User
```

### Optional

```
Profile
id
user
blurb
facebook
twitter
SongUserData

This comment has been minimized.

Copy link
@mcchang

mcchang Nov 15, 2013

Collaborator

Should the reference be from Song -> SongUserData. Also, it might be interesting to rate each Sound, so people could see the best rated "sound" for each Song

This comment has been minimized.

Copy link
@bywo

bywo Nov 15, 2013

Author Owner

I'm assuming Songs are global, meaning many users can have playlists with the same songs. Each user will have a SongUserData for each Song they add to a playlist. does that make sense?

I like the idea for rating sounds! We need to put some thought into how the ratings work...

Is it on a 1-10 scale for each sound, which is the average of all ratings given by users?
or is it a count on the number of "votes". each user votes for the best sound for a song.

id
user {User}
song {Song}
rating
time_added
num_listens
```

0 comments on commit 4d02060

Please sign in to comment.