register_taxonomy must be called on every page load, the data is
"registered" for the current page load only, and must be called before
anything that needs to use it. The best place is a hook attached to
The only data which is stored in the database is the actual Terms,
which are stored in the 'terms' table. The relationship between a
Term->Post object is stored in the 'term_relationships' table, and the
relationship linking a term to it's taxonomy is in the 'term_taxonomy'
table - Only the slug of the Taxonomy is stored in the database, in
your case, it would be 'genre' or 'writer' but they'll only be there
if you insert a Term that's actually in that taxonomy, the code you're
using inserts a category only.