CodeGym
AI Academy
Promotion
CodeGym University
Learning
Courses
Tasks
Surveys & Quizzes
Games
Help
Schedule
Community
Users
Forum
Chat
Articles
Success stories
Activity
Reviews
Subscriptions
Light theme

Lessons

  • Reviews
  • About us
Start
Start learning
Start learning now
  • My Progress
  • Courses
  • University
  • Quest Map
  • Lessons
  • Getting to Know SQL for Applications

    Kotlin SELF
    Level 59, Lesson 0
    We break down the basic “mental model” of relational databases: tables, rows, columns, and the schema as a data contract. We learn to see SQL as the foundation of CRUD operations ( INSERT, SELECT, UPDATE, DELETE), understand integrity constraints ( PRIMARY KEY, NOT NULL, UNIQUE, FOREIGN KEY), and also build the right habit: a fixed query + parameters ( ?) instead of string concatenation. All examples are shown as Kotlin strings with trimIndent() for future work with JDBC and Exposed.
    Available
  • JDBC — Connection, PreparedStatement, ResultSet

    Kotlin SELF
    Level 59, Lesson 1
    We break down the “three nesting dolls” of JDBC: Connection (a channel to the DB), PreparedStatement (a prepared SQL statement with ? parameters) and ResultSet (a cursor over rows). Using Kotlin examples, we learn how to safely run SELECT/ INSERT/ UPDATE/ DELETE, map results into a data class, and avoid resource leaks with use().
    Available
  • Transactions in JDBC — boundaries, autoCommit, commit/rollback

    Kotlin SELF
    Level 59, Lesson 2
    We break down why JDBC needs transactions and where their boundaries are: how the autoCommit mode affects persisting changes, why multiple SQL operations must live in a single transaction, and how to correctly build a try/ catch/ finally pattern to guarantee commit() and rollback(). In practice, we assemble a convenient inTx wrapper, tie together inserting an expense and an audit record, discuss money transfers as a “double UPDATE”, and review common mistakes (early commit, forgotten rollback, transaction that’s too wide).
    Available
  • Exposed: tables and CRUD via DSL

    Kotlin SELF
    Level 59, Lesson 3
    We break down the Exposed library from the SQL DSL angle: how to add dependencies and call Database.connect, describe a table via LongIdTable, work within transaction { }, and implement CRUD operations via insert, select/ selectAll, update, deleteWhere. At the end—how to “hide” Exposed behind a repository interface and which mistakes beginners make most often.
    Available
  • Database access in coroutines: Dispatchers . IO

    Kotlin SELF
    Level 59, Lesson 4
    We break down why JDBC remains blocking even inside coroutines, how dispatchers differ, and why it’s worth moving queries into withContext( Dispatchers . IO). We lock in an architectural rule: “IO lives in the storage layer”, handle transactions carefully (don’t break the context), build a minimal Expense Tracker on JDBC, and discuss Exposed under coroutines. At the end — an honest error model and a list of common pitfalls.
    Available
Learn
  • Registration
  • Java Course
  • Help with Tasks
  • Pricing
  • Java Syntax
Community
  • Users
  • Articles
  • Forum
  • Chat
  • Success Stories
  • Activity
  • Affiliate Program
Company
  • About us
  • Contacts
  • Reviews
  • Press Room
  • CodeGym for EDU
  • FAQ
  • Support
CodeGym CodeGym is an online course for learning Java programming from scratch. This course is a perfect way to master Java for beginners. It contains 1200+ tasks with instant verification and an essential scope of Java fundamentals theory. To help you succeed in education, we’ve implemented a set of motivational features: quizzes, coding projects, content about efficient learning, and a Java developer’s career.
Follow us
Interface language
English
Deutsch Español हिन्दी Français Português Polski বাংলা 简体中文 मराठी தமிழ் Italiano Bahasa Indonesia 繁體中文 Nederlands 日本語 한국어 Bulgarian Danish Hungarian Basa Jawa Malay Norwegian Romanian Swedish Telugu Thai Українська Filipino Turkish Azərbaycan Русский Vietnamese
Programmers Are Made, Not Born © 2026 CodeGym
MastercardVisa
Programmers Are Made, Not Born © 2026 CodeGym