Kotlin and Databases: A Practical Guide
300 pages
English
PDF
4.5

Kotlin and Databases: A Practical Guide

Kotlin and Databases: A Practical Guide

Author:

Year:

Summary:

This book is your practical guide to integrating databases into Kotlin projects. If you are already familiar with the basics of Kotlin and want to learn how to confidently work with data — from simple SQLite storage to scalable PostgreSQL solutions — this guide will become an indispensable assistant.



The author consistently leads the reader from basic concepts to advanced techniques: connection setup, CRUD operations, working with transactions, schema migrations, and performance optimization. Special attention is paid to popular libraries: Exposed (a lightweight ORM from JetBrains) and traditional JDBC.



Who is this book for?

  • Kotlin backend developers looking to master working with relational databases
  • Java programmers transitioning to Kotlin and seeking modern approaches to data
  • Students and beginners studying industrial development


What will you learn from the book?

  • How to set up and use SQLite for mobile and desktop applications
  • Full-fledged work with PostgreSQL: connection pools, complex queries, indexes
  • Using Exposed DSL for type-safe SQL queries without ORM magic
  • Data access patterns: Repository, DAO, Unit of Work
  • Query optimization, profiling, and combating the N+1 problem
  • Testing code that works with databases using in-memory databases
  • Schema migrations and data version management


Each chapter contains practical examples with complete code, ready-to-run projects, and assignments for independent work. You won't just read theory — you will create a real task management application that uses all the techniques you've learned.



The book is written in a lively, clear language, without excessive academicism. All examples are available in a GitHub repository. Suitable both for learning from scratch and for quickly diving into the topic if you have experience with other languages.



Make Kotlin your primary tool for working with data — start with this book!

Recommendations