Are transaction codes stored in the database?

No, the transaction codes are not stored in the database. The transaction codes are mapped to a specific nature of transaction while generating annexure data.