Database actions for books, renamed some MySQL

Conditions is a reserved word, so it's been renamed to state (as in book
condition / state).