SQL Database: Roughly implement get_fields and set_fields.