Persist flashcards to mysql database