Django uses gettext : https://www.gnu.org/software/gettext/
gettext use .po and .mo files.
When you run makemessages, Django parses all files of all apps and generate a .po file. It's a text file that you can edit with softwares like poedit.
When you run compilemessages, it compiles your .po file into a .mo binary file, to increase performance. The gettext function in Django (aka
_() ) uses this .mo file
So there is no link with the database.