Real Work for SQLs
Real work in SQL means using the language the way teams do on the job. Views save complex queries as reusable virtual tables, while stored procedures, functions and triggers keep logic inside the database. Practice projects, such as designing a library or shop schema and writing its reports, tie together modelling, querying and tuning.
Stage: Performance and Practice · Part of the SQL roadmap · Last reviewed 19 November 2026
What to learn in Real Work
- Create a view that hides a join and exposes a clean reporting interface
- Write a stored procedure or function that takes parameters
- Explain when a trigger helps and when it hides surprising behaviour
- Design a schema for a small shop and load sample data
- Write a set of reporting queries and check them against expected results
Real Work interview questions
What is the difference between a view and a materialised view?
A view stores only a query and runs it each time it is read, so results are always current. A materialised view stores the result rows on disk, which makes reads fast but requires a refresh to stay current. Use materialised views for expensive, read-heavy reports.
When would you avoid putting logic in stored procedures?
Avoid it when the logic needs version control, unit testing and deployment alongside application code, or when you need portability across database vendors. Procedures can be good for set-based, data-heavy work, but heavy business rules there get hard to test and maintain.
Where Real Work fits in the SQL roadmap
Real Work belongs to the Performance and Practice stage (intermediate level), which takes about 18 hours. Make it fast and correct.