Changed database to use proper identifiers on column names based on database type