Updated mysql database

Added necessary features + revised database layout