Whenever you're ready, walk me through how you'd approach this.
Explain how object-oriented design principles, SQL optimization, and clean design principles work together in your code and database work.
Discuss how you would structure application classes, repositories, and database queries so that responsibilities remain clear while performance and maintainability are preserved. Include one concrete example involving a slow or inefficient query and explain how you would improve both the code design and the SQL.
Keep the discussion language-agnostic, but you may use Java and Oracle Database terminology where useful.