Since I'm unable to use SQLite in a node-webkit app, I'm looking at LokiJS but I cannot seem to find an easy way of making joins or some kind of relations between 2 datasets.
One dataset is artists and the other is media. Since it could possibly hold 5000 artists and a million medias, I think it would be better to avoid repetition by making the artist a subdocument of a media. Also if I modify the artist of 1000 media entries, it would require a lot of writing instead of just updating one single entry in the artist dataset.
The only join I found create the returned json as followed:
Object {
left: {
// artists
},
right: {
// media
}
}
What I would prefer is something more traditionnal like:
{
artist_id:
artist_name:
media_id:
media_title:
}
I looked at NeDB which offer joins more easily but wasn't updated for over 2 years now. and I cannot get SQLite3 to compile for nodewebkit 0.28.0 and got no answers from SO. Anyway, LokiJS looks way more fun to play with anyway since it's in memory and on disk.
So how can I join artists and media?
Thanks!