The bot uses a mix of database tables and LUA tables to store and lookup data as well as local and global variables.  Some variables are organised into LUA tables.  Although the bot does save several LUA tables to files, it loads them all into memory and uses them there.  They are only saved as an emergency backup incase the database fails.  Some database tables also only exist in memory.  This is done for speed and because their data is created and used only when the bot is running.