205 decoupling learning material crud

Fixes #205
Yeah, that would make sense, but I figured that it's always a  delete of everything and then an insert, so the transaction would fail if it couldn't delete in the first place... I can change it.