Week 7 — OOP Python & DBMS Kickoff

intermediate oops dbms dsa

Goal: “The more that you read, the more things you will know. The more that you learn, the more places you’ll go.” — OOP wraps up this week with Python’s elegant take on it, and we kick off DBMS — the last major theory block before system design.

Topics

DayTrackFocusTopics
MonA — DSA PracticeGraphs (BFS/DFS)Solve 2-3 graph traversal problems. Focus on connected components, shortest path, and cycle detection.
TueB — OOP (Python)Foundations & InheritanceClasses and Instances · Method Types (static/class) · Inheritance and MRO · Encapsulation and Name Mangling · Polymorphism and Duck Typing
WedA — DSA PracticeDP BasicsSolve 2-3 DP problems. Start with 1D (climbing stairs, house robber) before attempting 2D.
ThuB — OOP (Python)Advanced & Dunder MethodsDunder Methods Deep Dive · Property Decorators and Descriptors · Abstract Classes and ABC · Dataclasses and NamedTuple · slots and Memory Optimization
FriB — OOP (Python) + DBMSOOP Wrap-up & DBMS StartComposition vs Inheritance · Metaclasses · Protocols and Structural Subtyping · SOLID Principles in Python · Design Patterns for OOP · What is a DBMS? · Types of Databases · SQL vs NoSQL · ACID Properties · BASE Properties · CAP Theorem

Note: Friday is heavier on paper, but the OOP wrap-up topics are lighter (reinforcement from our Python study) and the DBMS fundamentals are conceptual quick reads. It balances out.

Key Concepts

  • Python OOP has duck typing — “if it quacks like a duck, it’s a duck.” We care about what an object can do, not what it is. This is fundamentally different from Java/C++ style OOP.
  • Name mangling (__attr becomes _ClassName__attr) is Python’s way of saying “please don’t touch this” — it’s not truly private, just heavily discouraged.
  • MRO (Method Resolution Order) uses C3 linearization to resolve multiple inheritance. Call ClassName.__mro__ to see the lookup order.
  • ACID = Atomicity, Consistency, Isolation, Durability — the foundation of reliable transactions. Every database interview starts here.
  • CAP theorem says we can only guarantee 2 out of 3: Consistency, Availability, Partition tolerance. In distributed systems, partition tolerance is non-negotiable, so the real choice is between C and A.

Practice

  • DSA: Solve 5-6 problems this week — mix of graph traversal and basic DP
  • OOP: Implement the Observer pattern in Python with proper use of ABC and dunder methods
  • DBMS: Explain ACID vs BASE in your own words — write it out as if teaching a junior developer

~21 topics + DSA practice · ~2 hrs/day · OOP done! DBMS begins