Added commands to encode database and tables