Review the provided database code (TypeORM or Prisma) and suggest improvements for: - Query performance - Transaction safety - Error handling