SQL Database Implemented

Implemented an SQL database in order to appropriate lasting commands,
rather than commands that are lost upon exiting the thread, which would
be somewhat pointless.