Kotlin and Databases: A Practical Guide
Kotlin and Databases: A Practical Guide
Summary:
The book "Kotlin and Databases: A Practical Guide" is a comprehensive resource for developers who want to master working with databases in Kotlin. Whether you are creating a mobile application, a web service, or an enterprise system, this book will be your reliable assistant in building effective data interaction.
What you will learn from the book:
- Basics of working with databases in Kotlin — setting up the environment, connecting drivers, executing SQL queries.
- Working with SQLite — a lightweight embedded database for mobile and desktop applications.
- PostgreSQL in Kotlin — advanced techniques: transactions, indexes, window functions.
- ORM libraries — a detailed breakdown of Exposed, Hibernate, and Room for Kotlin.
- Asynchronous work with databases — coroutines, Flow, and reactive streams.
- Migrations and schema versioning — Flyway, Liquibase, and manual management.
- Testing data operations — mock objects, in-memory databases, and integration tests.
Who this book is for:
- Beginner Kotlin developers — from simple queries to complex architectural solutions.
- Android developers — working with Room, SQLite, and network databases.
- Backend engineers — integrating Kotlin with PostgreSQL, MySQL, and cloud services.
- Anyone who wants to systematize their knowledge — from theory to production code.
Features of the edition:
- Over 50 practical examples with ready-made code.
- Real-world cases: an online store, a booking system, an analytics dashboard.
- Comparative analysis of approaches: plain JDBC vs ORM vs NoSQL.
- Tips for query optimization and avoiding common mistakes.
- Ready-made project templates for IntelliJ IDEA and Android Studio.
The book is written by a practicing developer with 10 years of experience, which guarantees the relevance of the information and its applicability in real projects. Each chapter contains exercises for reinforcing the material and questions for self-assessment.
After reading, you will be able to confidently design data schemas, write efficient queries, choose the right tool for a specific task, and create scalable Kotlin applications that work with any databases.
Additional materials: the source code for all examples is available on GitHub, and at the end of the book there is a list of useful libraries and tools from the Kotlin ecosystem for working with data.