Week 3 — JS Execution, Async & SQL

intermediate javascript dbms dsa

Goal: Understand how JavaScript actually runs your code, get comfortable with async patterns, and start writing SQL that does real work.

Topics

DayFocusTopics
MonJS Execution ModelExecution Context · The this Keyword · Shallow Copy & Deep Copy
TueJS Async BasicsCallbacks · Promises
WedJS Async AdvancedAsync/Await · Promise Methods
ThuSQL QueryingACID Properties · DDL, DML & DCL · Joins · Aggregations & GROUP BY
FriDSA TechniquesPrefix Sum & Difference Arrays · Matrix Problems

Key Concepts

  • How this changes based on call context — global, method, arrow, explicit binding
  • Execution context creation (memory phase vs execution phase)
  • Promise chaining vs async/await — same thing, different syntax, different readability
  • Promise.all vs Promise.allSettled vs Promise.race — know when to use each
  • ACID guarantees and why they matter for data integrity
  • Types of SQL joins — inner, left, right, full, cross — and when each makes sense
  • Prefix sum technique for O(1) range queries

Practice

  • Predict the value of this in 5 different scenarios (method call, arrow in object, class, setTimeout, explicit bind)
  • Convert a callback-hell example to clean async/await code
  • Write JOIN queries for 3 scenarios: user orders, employee departments, optional relationships
  • Solve a prefix sum problem (e.g., subarray sum equals K)

~13 topics · ~2 hrs/day · Focus: read the linked notes, then code each concept