I'm not sure, but weren't there server APIs that were also used in the collaboration plugin from last year's GSOC?
Because when editing directly in the DB also all entrys from other tables of Joplin (resources, ...) must always be edited or updated or otherwise it could come to inconsistencies and e.g. resources are deleted because they are no longer tracked correctly ...