{"id":3676,"date":"2026-09-24T09:00:00","date_gmt":"2026-09-24T09:00:00","guid":{"rendered":"https:\/\/otus.ru\/journal\/?p=3676"},"modified":"2026-09-25T15:29:23","modified_gmt":"2026-09-25T15:29:23","slug":"mysql-i-android-chto-nuzhno-znat-programmistu","status":"publish","type":"post","link":"https:\/\/otus.ru\/journal\/mysql-i-android-chto-nuzhno-znat-programmistu\/","title":{"rendered":"\u0411\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 Android: SQLite, Room \u0438 \u0433\u0434\u0435 \u0437\u0434\u0435\u0441\u044c MySQL"},"content":{"rendered":"<p><strong>\u0411\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 Android<\/strong> &#8212; \u044d\u0442\u043e \u0447\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0444\u0430\u0439\u043b SQLite \u0432\u043d\u0443\u0442\u0440\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f: \u0434\u0432\u0438\u0436\u043e\u043a SQLite \u0432\u0441\u0442\u0440\u043e\u0435\u043d \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0443, \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0435 \u043d\u0443\u0436\u0435\u043d, \u0430 \u0434\u0430\u043d\u043d\u044b\u0435 \u043b\u0435\u0436\u0430\u0442 \u0432 \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u043e\u0439 \u043f\u0430\u043f\u043a\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0420\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0441 \u043d\u0438\u043c \u043e\u0431\u044b\u0447\u043d\u043e \u0447\u0435\u0440\u0435\u0437 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 <strong>Room<\/strong> \u0438\u0437 Android Jetpack &#8212; \u043e\u043d\u0430 \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442 Kotlin-\u043a\u043b\u0430\u0441\u0441\u044b \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 SQL-\u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435. <strong>MySQL<\/strong> &#8212; \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u0430\u044f \u0421\u0423\u0411\u0414: \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043a \u043d\u0435\u0439 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e, \u0430 \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043a \u0441\u0432\u043e\u0435\u043c\u0443 \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u043f\u043e HTTPS, \u0438 \u0443\u0436\u0435 \u0441\u0435\u0440\u0432\u0435\u0440 \u0447\u0438\u0442\u0430\u0435\u0442 \u0438 \u043f\u0438\u0448\u0435\u0442 MySQL.<\/p>\n<div class=\"oj-toc\" style=\"background:#f6f6f6;border-radius:8px;padding:14px 20px;margin:20px 0\">\n<p><strong>\u0421\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435<\/strong><\/p>\n<ol>\n<li><a href=\"#s1\">\u0422\u0440\u0438 \u0441\u043b\u043e\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0447\u0430\u0441\u0442\u043e \u043f\u0443\u0442\u0430\u044e\u0442<\/a><\/li>\n<li><a href=\"#s2\">\u0413\u0434\u0435 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435: \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e \u0438\u043b\u0438 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435<\/a><\/li>\n<li><a href=\"#s3\">\u041f\u043e\u0447\u0435\u043c\u0443 MySQL \u043d\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u044e\u0442 \u0438\u0437 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e<\/a><\/li>\n<li><a href=\"#s4\">\u0420\u0430\u0431\u043e\u0447\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u043d\u0430 SQLite: \u0434\u0432\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438 JOIN<\/a><\/li>\n<li><a href=\"#s5\">\u0422\u0430 \u0436\u0435 \u0441\u0445\u0435\u043c\u0430 \u043d\u0430 Room<\/a><\/li>\n<li><a href=\"#s6\">\u041c\u0438\u0433\u0440\u0430\u0446\u0438\u0438: \u043f\u043e\u0447\u0435\u043c\u0443 \u043d\u0435\u043b\u044c\u0437\u044f \u00abDROP \u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0437\u0430\u043d\u043e\u0432\u043e\u00bb<\/a><\/li>\n<li><a href=\"#s7\">\u0411\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0431\u0430\u0437\u044b<\/a><\/li>\n<li><a href=\"#s8\">\u0415\u0441\u043b\u0438 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c<\/a><\/li>\n<li><a href=\"#s9\">\u0412\u044b\u0432\u043e\u0434\u044b<\/a><\/li>\n<li><a href=\"#s10\">\u0413\u0434\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \/ \u0441\u0432\u044f\u0437\u044c \u0441 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u043e\u0439<\/a><\/li>\n<li><a href=\"#s11\">FAQ<\/a><\/li>\n<\/ol>\n<\/div>\n<p>\u041d\u0438\u0436\u0435 &#8212; \u0441\u0445\u0435\u043c\u0430 \u00ab\u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e \u0438\u043b\u0438 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435\u00bb, \u0440\u0430\u0431\u043e\u0447\u0438\u0439 SQL \u043d\u0430 SQLite, \u0442\u0430 \u0436\u0435 \u0441\u0445\u0435\u043c\u0430 \u043d\u0430 Room, \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u0431\u0435\u0437 \u043f\u043e\u0442\u0435\u0440\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0442\u0438\u043f\u043e\u0432\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438.<\/p>\n<h2 id=\"s1\">\u0422\u0440\u0438 \u0441\u043b\u043e\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0447\u0430\u0441\u0442\u043e \u043f\u0443\u0442\u0430\u044e\u0442<\/h2>\n<ul>\n<li><strong>SQLite<\/strong> &#8212; \u0441\u0430\u043c \u0434\u0432\u0438\u0436\u043e\u043a \u0438 \u0444\u043e\u0440\u043c\u0430\u0442 \u0444\u0430\u0439\u043b\u0430 \u0431\u0430\u0437\u044b. \u0412\u0441\u0442\u0440\u043e\u0435\u043d \u0432 Android, \u0432\u0435\u0440\u0441\u0438\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0432\u0435\u0440\u0441\u0438\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b.<\/li>\n<li><strong>SQLiteOpenHelper<\/strong> &#8212; \u0441\u0442\u0430\u0440\u044b\u0439 \u043d\u0438\u0437\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u044b\u0439 API Android: SQL \u0441\u0442\u0440\u043e\u043a\u0430\u043c\u0438, \u043a\u0443\u0440\u0441\u043e\u0440\u044b, \u0440\u0443\u0447\u043d\u043e\u0439 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">onUpgrade<\/code>. \u0420\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043d\u043e \u043c\u043d\u043e\u0433\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430.<\/li>\n<li><strong>Room<\/strong> &#8212; \u043d\u0430\u0434\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043d\u0430\u0434 SQLite: \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438 (<code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">@Entity<\/code>), DAO \u0441 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c\u0438 (<code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">@Dao<\/code>, <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">@Query<\/code>), \u043a\u043b\u0430\u0441\u0441 \u0431\u0430\u0437\u044b (<code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">@Database<\/code>) \u0438 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438. \u0412\u043d\u0443\u0442\u0440\u0438 \u0432\u0441\u0435 \u0440\u0430\u0432\u043d\u043e SQLite.<\/li>\n<li><strong>MySQL<\/strong> &#8212; \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440, \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u044e\u0442\u0441\u044f \u043f\u043e \u0441\u0435\u0442\u0438. \u041d\u0430 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0435 \u043e\u043d \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<\/li>\n<\/ul>\n<h2 id=\"s2\">\u0413\u0434\u0435 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435: \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e \u0438\u043b\u0438 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435<\/h2>\n<table>\n<thead>\n<tr>\n<th>\u0417\u0430\u0434\u0430\u0447\u0430<\/th>\n<th>\u0427\u0442\u043e \u0432\u0437\u044f\u0442\u044c<\/th>\n<th>\u041f\u043e\u0447\u0435\u043c\u0443<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>\u0417\u0430\u043c\u0435\u0442\u043a\u0438, \u0447\u0435\u0440\u043d\u043e\u0432\u0438\u043a\u0438, \u0438\u0441\u0442\u043e\u0440\u0438\u044f, \u043e\u0444\u043b\u0430\u0439\u043d-\u043a\u0435\u0448<\/td>\n<td>SQLite \u0447\u0435\u0440\u0435\u0437 Room<\/td>\n<td>\u0420\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0431\u0435\u0437 \u0441\u0435\u0442\u0438, \u0434\u0430\u043d\u043d\u044b\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u044d\u0442\u043e\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430<\/td>\n<\/tr>\n<tr>\n<td>\u041e\u0431\u0449\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439: \u0437\u0430\u043a\u0430\u0437\u044b, \u0447\u0430\u0442\u044b, \u043a\u0430\u0442\u0430\u043b\u043e\u0433<\/td>\n<td>\u0421\u0435\u0440\u0432\u0435\u0440 + MySQL\/PostgreSQL, \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0445\u043e\u0434\u0438\u0442 \u0447\u0435\u0440\u0435\u0437 API<\/td>\n<td>\u0414\u0430\u043d\u043d\u044b\u0435 \u0432\u0438\u0434\u044f\u0442 \u0432\u0441\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u044b, \u043f\u0440\u0430\u0432\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u0441\u0435\u0440\u0432\u0435\u0440<\/td>\n<\/tr>\n<tr>\n<td>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438: \u0442\u0435\u043c\u0430, \u0444\u043b\u0430\u0436\u043a\u0438, \u0442\u043e\u043a\u0435\u043d \u0441\u0435\u0441\u0441\u0438\u0438<\/td>\n<td>DataStore<\/td>\n<td>\u042d\u0442\u043e \u043f\u0430\u0440\u044b \u043a\u043b\u044e\u0447-\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u043d\u0435 \u043d\u0443\u0436\u043d\u044b<\/td>\n<\/tr>\n<tr>\n<td>\u0418 \u043e\u0444\u043b\u0430\u0439\u043d, \u0438 \u043e\u0431\u0449\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/td>\n<td>Room \u043a\u0430\u043a \u043a\u0435\u0448 + \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u044f \u0441 API<\/td>\n<td>\u042d\u043a\u0440\u0430\u043d \u0447\u0438\u0442\u0430\u0435\u0442 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0443\u044e \u0431\u0430\u0437\u0443, \u0441\u0435\u0442\u044c \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442 \u0435\u0435<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u0413\u0440\u0430\u043d\u0438\u0446\u0430 \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u043d\u0430\u044f: \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445 \u0447\u0430\u0441\u0442\u043e \u0441\u043e\u0447\u0435\u0442\u0430\u044e\u0442 \u0432\u0441\u0435 \u0442\u0440\u0438 \u0441\u043b\u043e\u044f. \u041d\u043e \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u043e\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0442\u0430\u043a\u043e\u0435: \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0435 &#8212; \u0432 Room, \u043e\u0431\u0449\u0435\u0435 &#8212; \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0437\u0430 API.<\/p>\n<h2 id=\"s3\">\u041f\u043e\u0447\u0435\u043c\u0443 MySQL \u043d\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u044e\u0442 \u0438\u0437 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e<\/h2>\n<p>\u0422\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438 JDBC-\u0434\u0440\u0430\u0439\u0432\u0435\u0440 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043f\u044b\u0442\u0430\u0442\u044c\u0441\u044f \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 APK, \u043d\u043e \u0442\u0430\u043a \u043d\u0435 \u0434\u0435\u043b\u0430\u044e\u0442 \u043f\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u043c.<\/p>\n<ol>\n<li><strong>\u041f\u0430\u0440\u043e\u043b\u044c \u043a \u0431\u0430\u0437\u0435 \u043e\u043a\u0430\u0436\u0435\u0442\u0441\u044f \u0432 APK.<\/strong> \u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u0430\u0442\u044c \u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f. \u0414\u0430\u043b\u044c\u0448\u0435 \u0443 \u0437\u043b\u043e\u0443\u043c\u044b\u0448\u043b\u0435\u043d\u043d\u0438\u043a\u0430 \u043f\u0440\u044f\u043c\u043e\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u043a\u043e \u0432\u0441\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u043c, \u0430 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043a \u0441\u0432\u043e\u0438\u043c.<\/li>\n<li><strong>\u041f\u043e\u0440\u0442 \u0421\u0423\u0411\u0414 \u043e\u0442\u043a\u0440\u044b\u0442 \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442.<\/strong> MySQL \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0432\u044b\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043d\u0430\u0440\u0443\u0436\u0443, \u044d\u0442\u043e \u043b\u0438\u0448\u043d\u044f\u044f \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u044c \u0430\u0442\u0430\u043a\u0438.<\/li>\n<li><strong>\u041d\u0435\u0442 \u043f\u0440\u0430\u0432 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.<\/strong> \u0421\u0423\u0411\u0414 \u0437\u043d\u0430\u0435\u0442 \u043e\u0434\u043d\u0443 \u0443\u0447\u0435\u0442\u043a\u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0430 \u043d\u0435 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430. \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u00ab\u044d\u0442\u043e\u0442 \u0437\u0430\u043a\u0430\u0437 &#8212; \u0442\u0432\u043e\u0439\u00bb \u0434\u0435\u043b\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0435\u0440\u0432\u0435\u0440.<\/li>\n<li><strong>\u041c\u043e\u0431\u0438\u043b\u044c\u043d\u0430\u044f \u0441\u0435\u0442\u044c \u043d\u0435\u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u0430.<\/strong> \u0414\u043e\u043b\u0433\u0438\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0440\u0432\u0443\u0442\u0441\u044f, \u0430 HTTP-\u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0441 \u0442\u0430\u0439\u043c\u0430\u0443\u0442\u0430\u043c\u0438 \u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u0430\u043c\u0438 \u043f\u0435\u0440\u0435\u0436\u0438\u0432\u0430\u044e\u0442 \u0441\u043c\u0435\u043d\u0443 Wi-Fi \u043d\u0430 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u0443\u044e \u0441\u0435\u0442\u044c.<\/li>\n<\/ol>\n<p>\u041f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u0430\u044f \u0441\u0445\u0435\u043c\u0430: \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 -&gt; HTTPS-\u0437\u0430\u043f\u0440\u043e\u0441 \u0441 \u0442\u043e\u043a\u0435\u043d\u043e\u043c -&gt; \u0441\u0435\u0440\u0432\u0435\u0440 (\u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f, \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043f\u0440\u0430\u0432, \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439 SQL) -&gt; MySQL. \u041d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u044d\u0442\u043e \u043a\u043b\u0438\u0435\u043d\u0442 \u0432\u0440\u043e\u0434\u0435 Retrofit \u0438\u043b\u0438 Ktor, \u0430 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0430\u044f \u043a\u043e\u043f\u0438\u044f \u043d\u0443\u0436\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043b\u0435\u0436\u0438\u0442 \u0432 Room.<\/p>\n<h2 id=\"s4\">\u0420\u0430\u0431\u043e\u0447\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u043d\u0430 SQLite: \u0434\u0432\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438 JOIN<\/h2>\n<p>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u0430\u043c SQL &#8212; \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0433\u043d\u0430\u0442\u044c \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u043e\u043c <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">sqlite3<\/code> \u043d\u0430 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435, \u0442\u043e\u0442 \u0436\u0435 \u0434\u0432\u0438\u0436\u043e\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432\u043d\u0443\u0442\u0440\u0438 Android. \u0421\u0445\u0435\u043c\u0430 \u0438\u0437 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0441\u0442\u0430\u0442\u044c\u0438: \u0440\u0430\u0431\u043e\u0442\u043e\u0434\u0430\u0442\u0435\u043b\u0438 \u0438 \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u0438, \u0443 \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u0430 \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u043a\u043b\u044e\u0447 \u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u043e\u0434\u0430\u0442\u0435\u043b\u044f.<\/p>\n<pre style=\"background:#282c34;color:#abb2bf;border-radius:8px;padding:16px 20px;margin:20px 0;overflow-x:auto;font-size:14px;line-height:1.55;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\"><code style=\"background:none\"><span style=\"color: #C678DD\">CREATE<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #C678DD\">TABLE<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">employer<\/span><span style=\"color: #ABB2BF\"> (<\/span>\n<span style=\"color: #ABB2BF\">    <\/span><span style=\"color: #E06C75\">id<\/span><span style=\"color: #ABB2BF\">   <\/span><span style=\"color: #E5C07B\">INTEGER<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #C678DD\">PRIMARY<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #C678DD\">KEY<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">AUTOINCREMENT<\/span><span style=\"color: #ABB2BF\">,<\/span>\n<span style=\"color: #ABB2BF\">    <\/span><span style=\"color: #E06C75\">name<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E5C07B\">TEXT<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #C678DD\">NOT<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #C678DD\">NULL<\/span>\n<span style=\"color: #ABB2BF\">);<\/span>\n<span style=\"color: #C678DD\">CREATE<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #C678DD\">TABLE<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">employee<\/span><span style=\"color: #ABB2BF\"> (<\/span>\n<span style=\"color: #ABB2BF\">    <\/span><span style=\"color: #E06C75\">id<\/span><span style=\"color: #ABB2BF\">          <\/span><span style=\"color: #E5C07B\">INTEGER<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #C678DD\">PRIMARY<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #C678DD\">KEY<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">AUTOINCREMENT<\/span><span style=\"color: #ABB2BF\">,<\/span>\n<span style=\"color: #ABB2BF\">    <\/span><span style=\"color: #E06C75\">name<\/span><span style=\"color: #ABB2BF\">        <\/span><span style=\"color: #E5C07B\">TEXT<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #C678DD\">NOT<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #C678DD\">NULL<\/span><span style=\"color: #ABB2BF\">,<\/span>\n<span style=\"color: #ABB2BF\">    <\/span><span style=\"color: #E06C75\">employer_id<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E5C07B\">INTEGER<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #C678DD\">NOT<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #C678DD\">NULL<\/span>\n<span style=\"color: #ABB2BF\">        <\/span><span style=\"color: #C678DD\">REFERENCES<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">employer<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">id<\/span><span style=\"color: #ABB2BF\">) <\/span><span style=\"color: #C678DD\">ON<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #C678DD\">DELETE<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #C678DD\">CASCADE<\/span>\n<span style=\"color: #ABB2BF\">);<\/span>\n<span style=\"color: #C678DD\">CREATE<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #C678DD\">INDEX<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">index_employee_employer_id<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #C678DD\">ON<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">employee<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">employer_id<\/span><span style=\"color: #ABB2BF\">);<\/span>\n\n<span style=\"color: #C678DD\">INSERT<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #C678DD\">INTO<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">employer<\/span><span style=\"color: #ABB2BF\"> (<\/span><span style=\"color: #E06C75\">name<\/span><span style=\"color: #ABB2BF\">) <\/span><span style=\"color: #C678DD\">VALUES<\/span><span style=\"color: #ABB2BF\"> (<\/span><span style=\"color: #98C379\">'Otus'<\/span><span style=\"color: #ABB2BF\">), (<\/span><span style=\"color: #98C379\">'Acme'<\/span><span style=\"color: #ABB2BF\">);<\/span>\n<span style=\"color: #C678DD\">INSERT<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #C678DD\">INTO<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">employee<\/span><span style=\"color: #ABB2BF\"> (<\/span><span style=\"color: #E06C75\">name<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">employer_id<\/span><span style=\"color: #ABB2BF\">) <\/span><span style=\"color: #C678DD\">VALUES<\/span>\n<span style=\"color: #ABB2BF\">    (<\/span><span style=\"color: #98C379\">'Anna'<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #D19A66\">1<\/span><span style=\"color: #ABB2BF\">), (<\/span><span style=\"color: #98C379\">'Boris'<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #D19A66\">1<\/span><span style=\"color: #ABB2BF\">), (<\/span><span style=\"color: #98C379\">'Vera'<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #D19A66\">2<\/span><span style=\"color: #ABB2BF\">);<\/span>\n\n<span style=\"color: #C678DD\">SELECT<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">e<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">name<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #C678DD\">AS<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">employee<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">r<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">name<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #C678DD\">AS<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">employer<\/span>\n<span style=\"color: #C678DD\">FROM<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">employee<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">e<\/span>\n<span style=\"color: #C678DD\">JOIN<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">employer<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">r<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #C678DD\">ON<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">r<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">id<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">e<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">employer_id<\/span>\n<span style=\"color: #C678DD\">WHERE<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">r<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">name<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #98C379\">'Otus'<\/span>\n<span style=\"color: #C678DD\">ORDER<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #C678DD\">BY<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">e<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">name<\/span><span style=\"color: #ABB2BF\">;<\/span><\/code><\/pre>\n<p>\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u0435 \u043a\u0430\u043a <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">schema.sql<\/code> \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">sqlite3 staff.db &lt; schema.sql<\/code>. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 (\u043f\u0440\u043e\u0432\u0435\u0440\u0435\u043d\u043e \u0432 sqlite3 3.51.0):<\/p>\n<pre style=\"background:#282c34;color:#abb2bf;border-radius:8px;padding:16px 20px;margin:20px 0;overflow-x:auto;font-size:14px;line-height:1.55;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\"><code style=\"background:none\">Anna|Otus\nBoris|Otus\n<\/code><\/pre>\n<p>\u0418\u043d\u0434\u0435\u043a\u0441 \u043d\u0430 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">employer_id<\/code> \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u043d\u0435 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e: SQLite \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0438\u043d\u0434\u0435\u043a\u0441 \u043f\u043e\u0434 \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u043a\u043b\u044e\u0447 \u0441\u0430\u043c, \u0430 \u0431\u0435\u0437 \u043d\u0435\u0433\u043e JOIN \u0438 \u043a\u0430\u0441\u043a\u0430\u0434\u043d\u043e\u0435 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u044e\u0442 \u0432\u0441\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u043e\u0432.<\/p>\n<h3>\u041b\u043e\u0432\u0443\u0448\u043a\u0430: \u0432\u043d\u0435\u0448\u043d\u0438\u0435 \u043a\u043b\u044e\u0447\u0438 \u0432 SQLite \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u044b \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e<\/h3>\n<p>\u041d\u0435\u0432\u0435\u0440\u043d\u043e\u0435 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u0435: \u0440\u0430\u0437 \u0432 \u0441\u0445\u0435\u043c\u0435 \u0435\u0441\u0442\u044c <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">REFERENCES<\/code>, \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u0430 \u0441 \u043d\u0435\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c \u0440\u0430\u0431\u043e\u0442\u043e\u0434\u0430\u0442\u0435\u043b\u0435\u043c \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043d\u0435\u043b\u044c\u0437\u044f. \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430 \u0442\u043e\u0439 \u0436\u0435 \u0431\u0430\u0437\u0435:<\/p>\n<pre style=\"background:#282c34;color:#abb2bf;border-radius:8px;padding:16px 20px;margin:20px 0;overflow-x:auto;font-size:14px;line-height:1.55;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\"><code style=\"background:none\"><span style=\"color: #E06C75\">PRAGMA<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">foreign_keys<\/span><span style=\"color: #ABB2BF\">;<\/span>\n<span style=\"color: #C678DD\">INSERT<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #C678DD\">INTO<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">employee<\/span><span style=\"color: #ABB2BF\"> (<\/span><span style=\"color: #E06C75\">name<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">employer_id<\/span><span style=\"color: #ABB2BF\">) <\/span><span style=\"color: #C678DD\">VALUES<\/span><span style=\"color: #ABB2BF\"> (<\/span><span style=\"color: #98C379\">'Ghost'<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #D19A66\">99<\/span><span style=\"color: #ABB2BF\">);<\/span>\n<span style=\"color: #C678DD\">SELECT<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #C678DD\">count<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #56B6C2\">*<\/span><span style=\"color: #ABB2BF\">) <\/span><span style=\"color: #C678DD\">FROM<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">employee<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #C678DD\">WHERE<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">employer_id<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #D19A66\">99<\/span><span style=\"color: #ABB2BF\">;<\/span><\/code><\/pre>\n<pre style=\"background:#282c34;color:#abb2bf;border-radius:8px;padding:16px 20px;margin:20px 0;overflow-x:auto;font-size:14px;line-height:1.55;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\"><code style=\"background:none\">0\n1\n<\/code><\/pre>\n<p><code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">PRAGMA foreign_keys<\/code> \u0432\u0435\u0440\u043d\u0443\u043b 0 &#8212; \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u0430, \u0438 \u00ab\u0441\u0438\u0440\u043e\u0442\u0430\u00bb \u0441 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">employer_id = 99<\/code> \u0441\u043f\u043e\u043a\u043e\u0439\u043d\u043e \u0437\u0430\u043f\u0438\u0441\u0430\u043b\u0441\u044f. \u0418\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 &#8212; \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f:<\/p>\n<pre style=\"background:#282c34;color:#abb2bf;border-radius:8px;padding:16px 20px;margin:20px 0;overflow-x:auto;font-size:14px;line-height:1.55;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\"><code style=\"background:none\"><span style=\"color: #E06C75\">PRAGMA<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">foreign_keys<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #C678DD\">ON<\/span><span style=\"color: #ABB2BF\">;<\/span>\n<span style=\"color: #C678DD\">DELETE<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #C678DD\">FROM<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">employee<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #C678DD\">WHERE<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">employer_id<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #D19A66\">99<\/span><span style=\"color: #ABB2BF\">;<\/span>\n<span style=\"color: #C678DD\">INSERT<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #C678DD\">INTO<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">employee<\/span><span style=\"color: #ABB2BF\"> (<\/span><span style=\"color: #E06C75\">name<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">employer_id<\/span><span style=\"color: #ABB2BF\">) <\/span><span style=\"color: #C678DD\">VALUES<\/span><span style=\"color: #ABB2BF\"> (<\/span><span style=\"color: #98C379\">'Ghost'<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #D19A66\">99<\/span><span style=\"color: #ABB2BF\">);<\/span><\/code><\/pre>\n<pre style=\"background:#282c34;color:#abb2bf;border-radius:8px;padding:16px 20px;margin:20px 0;overflow-x:auto;font-size:14px;line-height:1.55;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\"><code style=\"background:none\">Runtime error near line 3: FOREIGN KEY constraint failed (19)\n<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u0441\u0442\u0430\u0432\u043a\u0430 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0430. \u0418 \u043a\u0430\u0441\u043a\u0430\u0434 \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b: \u0443\u0434\u0430\u043b\u044f\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u043e\u0434\u0430\u0442\u0435\u043b\u044f &#8212; \u0443\u0445\u043e\u0434\u044f\u0442 \u0435\u0433\u043e \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u0438.<\/p>\n<pre style=\"background:#282c34;color:#abb2bf;border-radius:8px;padding:16px 20px;margin:20px 0;overflow-x:auto;font-size:14px;line-height:1.55;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\"><code style=\"background:none\"><span style=\"color: #E06C75\">PRAGMA<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">foreign_keys<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #C678DD\">ON<\/span><span style=\"color: #ABB2BF\">;<\/span>\n<span style=\"color: #C678DD\">DELETE<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #C678DD\">FROM<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">employer<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #C678DD\">WHERE<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">name<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #98C379\">'Acme'<\/span><span style=\"color: #ABB2BF\">;<\/span>\n<span style=\"color: #C678DD\">SELECT<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">name<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #C678DD\">FROM<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">employee<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #C678DD\">ORDER<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #C678DD\">BY<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">name<\/span><span style=\"color: #ABB2BF\">;<\/span><\/code><\/pre>\n<pre style=\"background:#282c34;color:#abb2bf;border-radius:8px;padding:16px 20px;margin:20px 0;overflow-x:auto;font-size:14px;line-height:1.55;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\"><code style=\"background:none\">Anna\nBoris\n<\/code><\/pre>\n<p>\u0412 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">SQLiteOpenHelper<\/code> \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0442 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">db.setForeignKeyConstraintsEnabled(true)<\/code> \u0432 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">onConfigure()<\/code>. Room \u043f\u0440\u0438 \u043d\u0430\u043b\u0438\u0447\u0438\u0438 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">foreignKeys<\/code> \u0432 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044f\u0445 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0441\u0430\u043c.<\/p>\n<h2 id=\"s5\">\u0422\u0430 \u0436\u0435 \u0441\u0445\u0435\u043c\u0430 \u043d\u0430 Room<\/h2>\n<p>Room \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u043a\u043e\u0434 \u043f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435 \u0447\u0435\u0440\u0435\u0437 KSP. \u041f\u0440\u0438\u043c\u0435\u0440 \u043d\u0438\u0436\u0435 &#8212; \u043d\u0430 \u0432\u0435\u0442\u043a\u0435 Room 2.x (2.8.5, \u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044c 2026), \u0435\u0435 API \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e\u043c \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b\u043e\u0432 \u0438 \u0440\u0430\u0431\u043e\u0447\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432. \u0417\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0432 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">build.gradle.kts<\/code> \u043c\u043e\u0434\u0443\u043b\u044f (\u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u043d\u043e\u043c\u0435\u0440 \u0432\u0435\u0440\u0441\u0438\u0438 \u0431\u0435\u0440\u0438\u0442\u0435 \u0441\u043e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0440\u0435\u043b\u0438\u0437\u043e\u0432 AndroidX):<\/p>\n<pre style=\"background:#282c34;color:#abb2bf;border-radius:8px;padding:16px 20px;margin:20px 0;overflow-x:auto;font-size:14px;line-height:1.55;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\"><code style=\"background:none\"><span style=\"color: #E06C75\">plugins<\/span><span style=\"color: #ABB2BF\"> {<\/span>\n<span style=\"color: #ABB2BF\">    <\/span><span style=\"color: #E06C75\">id<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #98C379\">\"com.google.devtools.ksp\"<\/span><span style=\"color: #ABB2BF\">)<\/span>\n<span style=\"color: #ABB2BF\">}<\/span>\n\n<span style=\"color: #E06C75\">dependencies<\/span><span style=\"color: #ABB2BF\"> {<\/span>\n<span style=\"color: #ABB2BF\">    <\/span><span style=\"color: #C678DD\">val<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">roomVersion<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #98C379\">\"2.8.5\"<\/span>\n<span style=\"color: #ABB2BF\">    <\/span><span style=\"color: #E06C75\">implementation<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #98C379\">\"androidx.room:room-runtime:$<\/span><span style=\"color: #E06C75\">roomVersion<\/span><span style=\"color: #98C379\">\"<\/span><span style=\"color: #ABB2BF\">)<\/span>\n<span style=\"color: #ABB2BF\">    <\/span><span style=\"color: #E06C75\">implementation<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #98C379\">\"androidx.room:room-ktx:$<\/span><span style=\"color: #E06C75\">roomVersion<\/span><span style=\"color: #98C379\">\"<\/span><span style=\"color: #ABB2BF\">)<\/span>\n<span style=\"color: #ABB2BF\">    <\/span><span style=\"color: #E06C75\">ksp<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #98C379\">\"androidx.room:room-compiler:$<\/span><span style=\"color: #E06C75\">roomVersion<\/span><span style=\"color: #98C379\">\"<\/span><span style=\"color: #ABB2BF\">)<\/span>\n<span style=\"color: #ABB2BF\">}<\/span><\/code><\/pre>\n<p>\u0421\u0443\u0449\u043d\u043e\u0441\u0442\u0438 &#8212; \u044d\u0442\u043e \u0442\u0430\u0431\u043b\u0438\u0446\u044b. \u0412\u043d\u0435\u0448\u043d\u0438\u0439 \u043a\u043b\u044e\u0447 \u0438 \u0438\u043d\u0434\u0435\u043a\u0441 \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f\u043c\u0438, \u043a\u0430\u043a \u0432 SQL \u0432\u044b\u0448\u0435:<\/p>\n<pre style=\"background:#282c34;color:#abb2bf;border-radius:8px;padding:16px 20px;margin:20px 0;overflow-x:auto;font-size:14px;line-height:1.55;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\"><code style=\"background:none\"><span style=\"color: #61AFEF\">@Entity<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">tableName<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #98C379\">\"employer\"<\/span><span style=\"color: #ABB2BF\">)<\/span>\n<span style=\"color: #C678DD\">data<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #C678DD\">class<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E5C07B\">Employer<\/span><span style=\"color: #ABB2BF\">(<\/span>\n<span style=\"color: #ABB2BF\">    <\/span><span style=\"color: #61AFEF\">@PrimaryKey<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">autoGenerate<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E5C07B\">true<\/span><span style=\"color: #ABB2BF\">) <\/span><span style=\"color: #C678DD\">val<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">id<\/span><span style=\"color: #ABB2BF\">: <\/span><span style=\"color: #E5C07B\">Long<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #D19A66\">0<\/span><span style=\"color: #ABB2BF\">,<\/span>\n<span style=\"color: #ABB2BF\">    <\/span><span style=\"color: #C678DD\">val<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">name<\/span><span style=\"color: #ABB2BF\">: <\/span><span style=\"color: #E5C07B\">String<\/span>\n<span style=\"color: #ABB2BF\">)<\/span>\n\n<span style=\"color: #61AFEF\">@Entity<\/span><span style=\"color: #ABB2BF\">(<\/span>\n<span style=\"color: #ABB2BF\">    <\/span><span style=\"color: #E06C75\">tableName<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #98C379\">\"employee\"<\/span><span style=\"color: #ABB2BF\">,<\/span>\n<span style=\"color: #ABB2BF\">    <\/span><span style=\"color: #E06C75\">foreignKeys<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">[<\/span><span style=\"color: #E06C75\">ForeignKey<\/span><span style=\"color: #ABB2BF\">(<\/span>\n<span style=\"color: #ABB2BF\">        <\/span><span style=\"color: #E06C75\">entity<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">Employer<\/span><span style=\"color: #56B6C2\">::<\/span><span style=\"color: #E06C75\">class<\/span><span style=\"color: #ABB2BF\">,<\/span>\n<span style=\"color: #ABB2BF\">        <\/span><span style=\"color: #E06C75\">parentColumns<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">[<\/span><span style=\"color: #98C379\">\"id\"<\/span><span style=\"color: #56B6C2\">]<\/span><span style=\"color: #ABB2BF\">,<\/span>\n<span style=\"color: #ABB2BF\">        <\/span><span style=\"color: #E06C75\">childColumns<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">[<\/span><span style=\"color: #98C379\">\"employer_id\"<\/span><span style=\"color: #56B6C2\">]<\/span><span style=\"color: #ABB2BF\">,<\/span>\n<span style=\"color: #ABB2BF\">        <\/span><span style=\"color: #E06C75\">onDelete<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">ForeignKey<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">CASCADE<\/span>\n<span style=\"color: #ABB2BF\">    )<\/span><span style=\"color: #56B6C2\">]<\/span><span style=\"color: #ABB2BF\">,<\/span>\n<span style=\"color: #ABB2BF\">    <\/span><span style=\"color: #E06C75\">indices<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">[<\/span><span style=\"color: #E06C75\">Index<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #98C379\">\"employer_id\"<\/span><span style=\"color: #ABB2BF\">)<\/span><span style=\"color: #56B6C2\">]<\/span>\n<span style=\"color: #ABB2BF\">)<\/span>\n<span style=\"color: #C678DD\">data<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #C678DD\">class<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E5C07B\">Employee<\/span><span style=\"color: #ABB2BF\">(<\/span>\n<span style=\"color: #ABB2BF\">    <\/span><span style=\"color: #61AFEF\">@PrimaryKey<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">autoGenerate<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E5C07B\">true<\/span><span style=\"color: #ABB2BF\">) <\/span><span style=\"color: #C678DD\">val<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">id<\/span><span style=\"color: #ABB2BF\">: <\/span><span style=\"color: #E5C07B\">Long<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #D19A66\">0<\/span><span style=\"color: #ABB2BF\">,<\/span>\n<span style=\"color: #ABB2BF\">    <\/span><span style=\"color: #C678DD\">val<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">name<\/span><span style=\"color: #ABB2BF\">: <\/span><span style=\"color: #E5C07B\">String<\/span><span style=\"color: #ABB2BF\">,<\/span>\n<span style=\"color: #ABB2BF\">    <\/span><span style=\"color: #61AFEF\">@ColumnInfo<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">name<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #98C379\">\"employer_id\"<\/span><span style=\"color: #ABB2BF\">) <\/span><span style=\"color: #C678DD\">val<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">employerId<\/span><span style=\"color: #ABB2BF\">: <\/span><span style=\"color: #E5C07B\">Long<\/span><span style=\"color: #ABB2BF\">,<\/span>\n<span style=\"color: #ABB2BF\">    <\/span><span style=\"color: #C678DD\">val<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">email<\/span><span style=\"color: #ABB2BF\">: <\/span><span style=\"color: #E5C07B\">String?<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E5C07B\">null<\/span>\n<span style=\"color: #ABB2BF\">)<\/span><\/code><\/pre>\n<p>DAO &#8212; \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0441 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c\u0438. SQL \u0432 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">@Query<\/code> Room \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u043f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435: \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u0430 \u0432 \u0438\u043c\u0435\u043d\u0438 \u0441\u0442\u043e\u043b\u0431\u0446\u0430 \u0434\u0430\u0441\u0442 \u043e\u0448\u0438\u0431\u043a\u0443 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438, \u0430 \u043d\u0435 \u043f\u0430\u0434\u0435\u043d\u0438\u0435 \u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.<\/p>\n<pre style=\"background:#282c34;color:#abb2bf;border-radius:8px;padding:16px 20px;margin:20px 0;overflow-x:auto;font-size:14px;line-height:1.55;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\"><code style=\"background:none\"><span style=\"color: #C678DD\">data<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #C678DD\">class<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E5C07B\">EmployeeRow<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #C678DD\">val<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">employee<\/span><span style=\"color: #ABB2BF\">: <\/span><span style=\"color: #E5C07B\">String<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #C678DD\">val<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">employer<\/span><span style=\"color: #ABB2BF\">: <\/span><span style=\"color: #E5C07B\">String<\/span><span style=\"color: #ABB2BF\">)<\/span>\n\n<span style=\"color: #61AFEF\">@Dao<\/span>\n<span style=\"color: #C678DD\">interface<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E5C07B\">StaffDao<\/span><span style=\"color: #ABB2BF\"> {<\/span>\n<span style=\"color: #ABB2BF\">    <\/span><span style=\"color: #61AFEF\">@Insert<\/span>\n<span style=\"color: #ABB2BF\">    <\/span><span style=\"color: #C678DD\">suspend<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #C678DD\">fun<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #61AFEF; font-weight: bold\">insertEmployer<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">employer<\/span><span style=\"color: #ABB2BF\">: <\/span><span style=\"color: #E06C75\">Employer<\/span><span style=\"color: #ABB2BF\">): <\/span><span style=\"color: #E5C07B\">Long<\/span>\n\n<span style=\"color: #ABB2BF\">    <\/span><span style=\"color: #61AFEF\">@Insert<\/span>\n<span style=\"color: #ABB2BF\">    <\/span><span style=\"color: #C678DD\">suspend<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #C678DD\">fun<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #61AFEF; font-weight: bold\">insertEmployee<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">employee<\/span><span style=\"color: #ABB2BF\">: <\/span><span style=\"color: #E06C75\">Employee<\/span><span style=\"color: #ABB2BF\">): <\/span><span style=\"color: #E5C07B\">Long<\/span>\n\n<span style=\"color: #ABB2BF\">    <\/span><span style=\"color: #61AFEF\">@Query<\/span><span style=\"color: #ABB2BF\">(<\/span>\n<span style=\"color: #ABB2BF\">        <\/span><span style=\"color: #98C379\">\"SELECT e.name AS employee, r.name AS employer \"<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">+<\/span>\n<span style=\"color: #ABB2BF\">        <\/span><span style=\"color: #98C379\">\"FROM employee e JOIN employer r ON r.id = e.employer_id \"<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">+<\/span>\n<span style=\"color: #ABB2BF\">        <\/span><span style=\"color: #98C379\">\"WHERE r.name = :employer ORDER BY e.name\"<\/span>\n<span style=\"color: #ABB2BF\">    )<\/span>\n<span style=\"color: #ABB2BF\">    <\/span><span style=\"color: #C678DD\">fun<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #61AFEF; font-weight: bold\">observeByEmployer<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">employer<\/span><span style=\"color: #ABB2BF\">: <\/span><span style=\"color: #E5C07B\">String<\/span><span style=\"color: #ABB2BF\">): <\/span><span style=\"color: #E06C75\">Flow<\/span><span style=\"color: #56B6C2\">&lt;<\/span><span style=\"color: #E06C75\">List<\/span><span style=\"color: #56B6C2\">&lt;<\/span><span style=\"color: #E06C75\">EmployeeRow<\/span><span style=\"color: #56B6C2\">&gt;&gt;<\/span>\n<span style=\"color: #ABB2BF\">}<\/span><\/code><\/pre>\n<p>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">:employer<\/code> Room \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442 \u043a\u0430\u043a \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0439 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442, \u0430 \u043d\u0435 \u0441\u043a\u043b\u0435\u0438\u0432\u0430\u0435\u0442 \u0432 \u0441\u0442\u0440\u043e\u043a\u0443 &#8212; \u044d\u0442\u043e \u0437\u0430\u0449\u0438\u0449\u0430\u0435\u0442 \u043e\u0442 SQL-\u0438\u043d\u044a\u0435\u043a\u0446\u0438\u0439. <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">Flow<\/code> \u0441\u0430\u043c \u043f\u0440\u0438\u0441\u044b\u043b\u0430\u0435\u0442 \u043d\u043e\u0432\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a, \u043a\u043e\u0433\u0434\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044d\u043a\u0440\u0430\u043d \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0431\u0435\u0437 \u0440\u0443\u0447\u043d\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u0447\u0438\u0442\u044b\u0432\u0430\u043d\u0438\u044f.<\/p>\n<p>\u041a\u043b\u0430\u0441\u0441 \u0431\u0430\u0437\u044b \u0438 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044f \u0441 \u0432\u0435\u0440\u0441\u0438\u0438 1 \u043d\u0430 2 (\u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u0441\u0442\u043e\u043b\u0431\u0435\u0446 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">email<\/code>):<\/p>\n<pre style=\"background:#282c34;color:#abb2bf;border-radius:8px;padding:16px 20px;margin:20px 0;overflow-x:auto;font-size:14px;line-height:1.55;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\"><code style=\"background:none\"><span style=\"color: #61AFEF\">@Database<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">entities<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">[<\/span><span style=\"color: #E06C75\">Employer<\/span><span style=\"color: #56B6C2\">::<\/span><span style=\"color: #E06C75\">class<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">Employee<\/span><span style=\"color: #56B6C2\">::<\/span><span style=\"color: #E06C75\">class<\/span><span style=\"color: #56B6C2\">]<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">version<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #D19A66\">2<\/span><span style=\"color: #ABB2BF\">)<\/span>\n<span style=\"color: #C678DD\">abstract<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #C678DD\">class<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E5C07B\">AppDatabase<\/span><span style=\"color: #ABB2BF\"> : <\/span><span style=\"color: #E06C75\">RoomDatabase<\/span><span style=\"color: #ABB2BF\">() {<\/span>\n<span style=\"color: #ABB2BF\">    <\/span><span style=\"color: #C678DD\">abstract<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #C678DD\">fun<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #61AFEF; font-weight: bold\">staffDao<\/span><span style=\"color: #ABB2BF\">(): <\/span><span style=\"color: #E06C75\">StaffDao<\/span>\n<span style=\"color: #ABB2BF\">}<\/span>\n\n<span style=\"color: #C678DD\">val<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">MIGRATION_1_2<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #C678DD\">object<\/span><span style=\"color: #ABB2BF\"> : <\/span><span style=\"color: #E5C07B\">Migration<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #D19A66\">1<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #D19A66\">2<\/span><span style=\"color: #ABB2BF\">) {<\/span>\n<span style=\"color: #ABB2BF\">    <\/span><span style=\"color: #C678DD\">override<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #C678DD\">fun<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #61AFEF; font-weight: bold\">migrate<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">db<\/span><span style=\"color: #ABB2BF\">: <\/span><span style=\"color: #E06C75\">SupportSQLiteDatabase<\/span><span style=\"color: #ABB2BF\">) {<\/span>\n<span style=\"color: #ABB2BF\">        <\/span><span style=\"color: #E06C75\">db<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">execSQL<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #98C379\">\"ALTER TABLE employee ADD COLUMN email TEXT\"<\/span><span style=\"color: #ABB2BF\">)<\/span>\n<span style=\"color: #ABB2BF\">    }<\/span>\n<span style=\"color: #ABB2BF\">}<\/span>\n\n<span style=\"color: #C678DD\">fun<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #61AFEF; font-weight: bold\">buildDatabase<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">context<\/span><span style=\"color: #ABB2BF\">: <\/span><span style=\"color: #E06C75\">Context<\/span><span style=\"color: #ABB2BF\">): <\/span><span style=\"color: #E06C75\">AppDatabase<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span>\n<span style=\"color: #ABB2BF\">    <\/span><span style=\"color: #E06C75\">Room<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">databaseBuilder<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">context<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">AppDatabase<\/span><span style=\"color: #56B6C2\">::<\/span><span style=\"color: #E06C75\">class<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">java<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #98C379\">\"staff.db\"<\/span><span style=\"color: #ABB2BF\">)<\/span>\n<span style=\"color: #ABB2BF\">        .<\/span><span style=\"color: #E06C75\">addMigrations<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">MIGRATION_1_2<\/span><span style=\"color: #ABB2BF\">)<\/span>\n<span style=\"color: #ABB2BF\">        .<\/span><span style=\"color: #E06C75\">build<\/span><span style=\"color: #ABB2BF\">()<\/span><\/code><\/pre>\n<p>\u0421 \u0438\u044e\u043b\u044f 2026 \u0433\u043e\u0434\u0430 \u0441\u0442\u0430\u0431\u0438\u043b\u0435\u043d \u0438 <strong>Room 3.0<\/strong> &#8212; \u044d\u0442\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u044b <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">androidx.room3:room3-*<\/code> \u0438 \u043f\u0430\u043a\u0435\u0442 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">androidx.room3<\/code>. \u0412 \u043d\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e Kotlin \u0438 KSP, \u043c\u0435\u0442\u043e\u0434\u044b DAO \u043e\u0431\u044f\u0437\u0430\u043d\u044b \u0431\u044b\u0442\u044c <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">suspend<\/code> \u0438\u043b\u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">Flow<\/code>, \u0430 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044f \u043f\u0438\u0448\u0435\u0442\u0441\u044f \u043a\u0430\u043a <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">override suspend fun migrate(connection: SQLiteConnection)<\/code> \u0432\u043c\u0435\u0441\u0442\u043e <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">SupportSQLiteDatabase<\/code>. \u0421\u0445\u0435\u043c\u0430 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439 \u0438 SQL \u0432 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">@Query<\/code> \u043e\u0441\u0442\u0430\u044e\u0442\u0441\u044f \u0442\u0435\u043c\u0438 \u0436\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0438\u043c\u0435\u0440 \u0432\u044b\u0448\u0435 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u043f\u043e\u0447\u0442\u0438 \u0431\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439.<\/p>\n<p>\u0411\u0430\u0437\u0443 \u0441\u043e\u0437\u0434\u0430\u044e\u0442 \u043e\u0434\u0438\u043d \u0440\u0430\u0437 \u043d\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 (\u0441\u0438\u043d\u0433\u043b\u0442\u043e\u043d \u0447\u0435\u0440\u0435\u0437 DI \u0438\u043b\u0438 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">Application<\/code>), \u0430 \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0442 \u0438\u0437 \u043a\u043e\u0440\u0443\u0442\u0438\u043d\u044b, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0432\u043e ViewModel:<\/p>\n<pre style=\"background:#282c34;color:#abb2bf;border-radius:8px;padding:16px 20px;margin:20px 0;overflow-x:auto;font-size:14px;line-height:1.55;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\"><code style=\"background:none\"><span style=\"color: #E06C75\">viewModelScope<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">launch<\/span><span style=\"color: #ABB2BF\"> {<\/span>\n<span style=\"color: #ABB2BF\">    <\/span><span style=\"color: #C678DD\">val<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">otusId<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">dao<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">insertEmployer<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">Employer<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">name<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #98C379\">\"Otus\"<\/span><span style=\"color: #ABB2BF\">))<\/span>\n<span style=\"color: #ABB2BF\">    <\/span><span style=\"color: #E06C75\">dao<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">insertEmployee<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">Employee<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">name<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #98C379\">\"Anna\"<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">employerId<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">otusId<\/span><span style=\"color: #ABB2BF\">))<\/span>\n<span style=\"color: #ABB2BF\">}<\/span><\/code><\/pre>\n<h2 id=\"s6\">\u041c\u0438\u0433\u0440\u0430\u0446\u0438\u0438: \u043f\u043e\u0447\u0435\u043c\u0443 \u043d\u0435\u043b\u044c\u0437\u044f \u00abDROP \u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0437\u0430\u043d\u043e\u0432\u043e\u00bb<\/h2>\n<p>\u0412 \u0441\u0442\u0430\u0440\u044b\u0445 \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b\u0430\u0445, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u043f\u0440\u0435\u0436\u043d\u044e\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438, <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">onUpgrade<\/code> \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0435\u0435 \u0441\u043d\u043e\u0432\u0430. \u0427\u0442\u043e \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442 \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0432\u0438\u0434\u043d\u043e \u043d\u0430 \u043a\u043e\u043f\u0438\u0438 \u0431\u0430\u0437\u044b \u0441 \u0434\u0432\u0443\u043c\u044f \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u0430\u043c\u0438:<\/p>\n<pre style=\"background:#282c34;color:#abb2bf;border-radius:8px;padding:16px 20px;margin:20px 0;overflow-x:auto;font-size:14px;line-height:1.55;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\"><code style=\"background:none\"><span style=\"color: #E06C75\">PRAGMA<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">user_version<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #D19A66\">1<\/span><span style=\"color: #ABB2BF\">;<\/span>\n<span style=\"color: #C678DD\">DROP<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #C678DD\">TABLE<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #C678DD\">IF<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #C678DD\">EXISTS<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">employee<\/span><span style=\"color: #ABB2BF\">;<\/span>\n<span style=\"color: #C678DD\">CREATE<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #C678DD\">TABLE<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">employee<\/span><span style=\"color: #ABB2BF\"> (<\/span>\n<span style=\"color: #ABB2BF\">    <\/span><span style=\"color: #E06C75\">id<\/span><span style=\"color: #ABB2BF\">          <\/span><span style=\"color: #E5C07B\">INTEGER<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #C678DD\">PRIMARY<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #C678DD\">KEY<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">AUTOINCREMENT<\/span><span style=\"color: #ABB2BF\">,<\/span>\n<span style=\"color: #ABB2BF\">    <\/span><span style=\"color: #E06C75\">name<\/span><span style=\"color: #ABB2BF\">        <\/span><span style=\"color: #E5C07B\">TEXT<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #C678DD\">NOT<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #C678DD\">NULL<\/span><span style=\"color: #ABB2BF\">,<\/span>\n<span style=\"color: #ABB2BF\">    <\/span><span style=\"color: #E06C75\">employer_id<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E5C07B\">INTEGER<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #C678DD\">NOT<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #C678DD\">NULL<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #C678DD\">REFERENCES<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">employer<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">id<\/span><span style=\"color: #ABB2BF\">) <\/span><span style=\"color: #C678DD\">ON<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #C678DD\">DELETE<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #C678DD\">CASCADE<\/span><span style=\"color: #ABB2BF\">,<\/span>\n<span style=\"color: #ABB2BF\">    <\/span><span style=\"color: #E06C75\">email<\/span><span style=\"color: #ABB2BF\">       <\/span><span style=\"color: #E5C07B\">TEXT<\/span>\n<span style=\"color: #ABB2BF\">);<\/span>\n<span style=\"color: #E06C75\">PRAGMA<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">user_version<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #D19A66\">2<\/span><span style=\"color: #ABB2BF\">;<\/span>\n<span style=\"color: #C678DD\">SELECT<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #C678DD\">count<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #56B6C2\">*<\/span><span style=\"color: #ABB2BF\">) <\/span><span style=\"color: #C678DD\">FROM<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">employee<\/span><span style=\"color: #ABB2BF\">;<\/span><\/code><\/pre>\n<pre style=\"background:#282c34;color:#abb2bf;border-radius:8px;padding:16px 20px;margin:20px 0;overflow-x:auto;font-size:14px;line-height:1.55;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\"><code style=\"background:none\">0\n<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u043e\u0432 \u043d\u043e\u043b\u044c &#8212; \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043f\u043e\u0442\u0435\u0440\u044f\u043d\u044b. \u0418\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 &#8212; \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0441\u0445\u0435\u043c\u0443, \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0432 \u0441\u0442\u0440\u043e\u043a\u0438, \u0432 \u043e\u0434\u043d\u043e\u0439 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438:<\/p>\n<pre style=\"background:#282c34;color:#abb2bf;border-radius:8px;padding:16px 20px;margin:20px 0;overflow-x:auto;font-size:14px;line-height:1.55;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\"><code style=\"background:none\"><span style=\"color: #E06C75\">PRAGMA<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">user_version<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #D19A66\">1<\/span><span style=\"color: #ABB2BF\">;<\/span>\n<span style=\"color: #C678DD\">BEGIN<\/span><span style=\"color: #ABB2BF\">;<\/span>\n<span style=\"color: #C678DD\">ALTER<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #C678DD\">TABLE<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">employee<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #C678DD\">ADD<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #C678DD\">COLUMN<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">email<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E5C07B\">TEXT<\/span><span style=\"color: #ABB2BF\">;<\/span>\n<span style=\"color: #E06C75\">PRAGMA<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">user_version<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #D19A66\">2<\/span><span style=\"color: #ABB2BF\">;<\/span>\n<span style=\"color: #C678DD\">COMMIT<\/span><span style=\"color: #ABB2BF\">;<\/span>\n<span style=\"color: #E06C75\">PRAGMA<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">user_version<\/span><span style=\"color: #ABB2BF\">;<\/span>\n<span style=\"color: #C678DD\">SELECT<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">name<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">email<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #C678DD\">FROM<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">employee<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #C678DD\">ORDER<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #C678DD\">BY<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">name<\/span><span style=\"color: #ABB2BF\">;<\/span><\/code><\/pre>\n<pre style=\"background:#282c34;color:#abb2bf;border-radius:8px;padding:16px 20px;margin:20px 0;overflow-x:auto;font-size:14px;line-height:1.55;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\"><code style=\"background:none\">2\nAnna|\nBoris|\n<\/code><\/pre>\n<p>\u0421\u0442\u0440\u043e\u043a\u0438 \u043d\u0430 \u043c\u0435\u0441\u0442\u0435, \u043d\u043e\u0432\u044b\u0439 \u0441\u0442\u043e\u043b\u0431\u0435\u0446 \u043f\u0443\u0441\u0442\u043e\u0439. <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">user_version<\/code> &#8212; \u044d\u0442\u043e \u043d\u043e\u043c\u0435\u0440 \u0441\u0445\u0435\u043c\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0445\u0440\u0430\u043d\u0438\u0442 \u0441\u0430\u043c \u0444\u0430\u0439\u043b SQLite; \u043f\u043e \u043d\u0435\u043c\u0443 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">SQLiteOpenHelper<\/code> \u0438 Room \u043f\u043e\u043d\u0438\u043c\u0430\u044e\u0442, \u043a\u0430\u043a\u0443\u044e \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c. <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">ALTER TABLE ... ADD COLUMN<\/code> \u043f\u043e\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u0441\u043b\u0443\u0447\u0430\u0438; \u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u0441 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c \u0442\u0438\u043f\u0430 \u0438\u043b\u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439 \u0432 SQLite \u043e\u0431\u044b\u0447\u043d\u043e \u0434\u0435\u043b\u0430\u044e\u0442 \u0447\u0435\u0440\u0435\u0437 \u043d\u043e\u0432\u0443\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443, \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u0437\u0430\u043c\u0435\u043d\u0443.<\/p>\n<h2 id=\"s7\">\u0411\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0431\u0430\u0437\u044b<\/h2>\n<ul>\n<li>\u0424\u0430\u0439\u043b \u0431\u0430\u0437\u044b \u043b\u0435\u0436\u0438\u0442 \u0432 \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u043e\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0434\u0440\u0443\u0433\u0438\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0435\u0433\u043e \u043d\u0435 \u0447\u0438\u0442\u0430\u044e\u0442. \u041d\u043e \u043e\u043d \u043d\u0435 \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d: \u043d\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435 \u0441 root \u0438\u043b\u0438 \u0438\u0437 \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u043e\u0439 \u043a\u043e\u043f\u0438\u0438 \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u043a\u0440\u044b\u0442\u044c.<\/li>\n<li>\u041f\u0430\u0440\u043e\u043b\u0438 \u0438 \u0442\u043e\u043a\u0435\u043d\u044b \u0432 \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u043c \u0432\u0438\u0434\u0435 \u0432 \u0431\u0430\u0437\u0443 \u043d\u0435 \u043a\u043b\u0430\u0434\u0438\u0442\u0435. \u041a\u043b\u044e\u0447\u0438 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0445\u0440\u0430\u043d\u0438\u0442 Android Keystore, \u0430 \u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0448\u0438\u0444\u0440\u0443\u044e\u0442 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, SQLCipher).<\/li>\n<li>\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0431\u044d\u043a\u0430\u043f Android \u043c\u043e\u0436\u0435\u0442 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0444\u0430\u0439\u043b \u0431\u0430\u0437\u044b \u0432 \u043a\u043e\u043f\u0438\u044e. \u0427\u0442\u043e \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442 \u0432 \u0431\u044d\u043a\u0430\u043f, \u0437\u0430\u0434\u0430\u044e\u0442 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0432 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442\u0435: <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">dataExtractionRules<\/code> \u0434\u043b\u044f Android 12 \u0438 \u043d\u043e\u0432\u0435\u0435, <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">fullBackupContent<\/code> \u0434\u043b\u044f Android 11 \u0438 \u0441\u0442\u0430\u0440\u0448\u0435 &#8212; \u043f\u0440\u0438 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">minSdk<\/code> \u043d\u0438\u0436\u0435 31 \u043d\u0443\u0436\u043d\u044b \u043e\u0431\u0430.<\/li>\n<li>\u0414\u0430\u043d\u043d\u044b\u0435 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0431\u0430\u0437\u0435 &#8212; \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u0435\u0448: \u043f\u0440\u0430\u0432\u0430 \u0432\u0441\u0435 \u0440\u0430\u0432\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u0441\u0435\u0440\u0432\u0435\u0440.<\/li>\n<\/ul>\n<h2 id=\"s8\">\u0415\u0441\u043b\u0438 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c<\/h2>\n<table>\n<thead>\n<tr>\n<th>\u0421\u0438\u043c\u043f\u0442\u043e\u043c<\/th>\n<th>\u041f\u0440\u0438\u0447\u0438\u043d\u0430<\/th>\n<th>\u0427\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">IllegalStateException<\/code> \u043f\u0440\u043e \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0431\u0430\u0437\u0435 \u0438\u0437 \u0433\u043b\u0430\u0432\u043d\u043e\u0433\u043e \u043f\u043e\u0442\u043e\u043a\u0430<\/td>\n<td>\u0417\u0430\u043f\u0440\u043e\u0441 Room \u0432\u044b\u0437\u0432\u0430\u043d \u043d\u0430 UI-\u043f\u043e\u0442\u043e\u043a\u0435<\/td>\n<td>\u0421\u0434\u0435\u043b\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434 DAO <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">suspend<\/code> \u0438\u043b\u0438 \u0432\u0435\u0440\u043d\u0443\u0442\u044c <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">Flow<\/code>, \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0438\u0437 \u043a\u043e\u0440\u0443\u0442\u0438\u043d\u044b<\/td>\n<\/tr>\n<tr>\n<td>\u041f\u0430\u0434\u0435\u043d\u0438\u0435 \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043f\u043e\u0441\u043b\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f: \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044f \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u0430<\/td>\n<td>\u041f\u043e\u0434\u043d\u044f\u043b\u0438 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">version<\/code>, \u043d\u043e \u043d\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">Migration<\/code><\/td>\n<td>\u041d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044e \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0432 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">addMigrations<\/code><\/td>\n<\/tr>\n<tr>\n<td>\u041f\u043e\u0441\u043b\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u043f\u0430\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0435<\/td>\n<td>\u0420\u0430\u0437\u0440\u0443\u0448\u0430\u044e\u0449\u0430\u044f \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044f (DROP \u0438\u043b\u0438 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">fallbackToDestructiveMigration(...)<\/code>)<\/td>\n<td>\u0417\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0430 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">ALTER TABLE<\/code> \u0438\u043b\u0438 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 \u043d\u043e\u0432\u0443\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443<\/td>\n<\/tr>\n<tr>\n<td><code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">FOREIGN KEY constraint failed<\/code><\/td>\n<td>\u0412\u0441\u0442\u0430\u0432\u043a\u0430 \u0441\u0441\u044b\u043b\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043d\u0435\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u0438\u043b\u0438 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0432\u0441\u0442\u0430\u0432\u043e\u043a \u043d\u0430\u0440\u0443\u0448\u0435\u043d<\/td>\n<td>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f, \u0432\u0437\u044f\u0442\u044c \u0435\u0433\u043e id<\/td>\n<\/tr>\n<tr>\n<td>\u041d\u0435 \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u043b\u0435\u0436\u0438\u0442 \u0432 \u0431\u0430\u0437\u0435<\/td>\n<td>&#8212;<\/td>\n<td>Android Studio: App Inspection -&gt; Database Inspector \u043d\u0430 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 id=\"s9\">\u0412\u044b\u0432\u043e\u0434\u044b<\/h2>\n<ul>\n<li>\u0411\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 Android \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e &#8212; \u044d\u0442\u043e SQLite: \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u0434\u0432\u0438\u0436\u043e\u043a \u0438 \u0444\u0430\u0439\u043b \u0432 \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u043e\u0439 \u043f\u0430\u043f\u043a\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0431\u0435\u0437 \u0441\u0435\u0440\u0432\u0435\u0440\u0430.<\/li>\n<li>Room &#8212; \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 SQLite: \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438, DAO \u0441 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u043e\u0439 SQL \u043f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435, <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">Flow<\/code> \u0438 \u044f\u0432\u043d\u044b\u0435 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438.<\/li>\n<li>\u0412 SQLite \u0432\u043d\u0435\u0448\u043d\u0438\u0435 \u043a\u043b\u044e\u0447\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0441\u043b\u0435 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">PRAGMA foreign_keys = ON<\/code>; \u0438\u043d\u0434\u0435\u043a\u0441 \u043f\u043e\u0434 \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u043a\u043b\u044e\u0447 \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0430\u043c\u043e\u043c\u0443.<\/li>\n<li>\u041c\u0438\u0433\u0440\u0430\u0446\u0438\u044f \u0447\u0435\u0440\u0435\u0437 DROP \u0441\u0442\u0438\u0440\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f; \u0441\u0445\u0435\u043c\u0443 \u043c\u0435\u043d\u044f\u044e\u0442 \u0447\u0435\u0440\u0435\u0437 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">ALTER TABLE<\/code> \u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u043d\u043e\u0441 \u0432 \u043d\u043e\u0432\u0443\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443.<\/li>\n<li>MySQL \u0436\u0438\u0432\u0435\u0442 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435: \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0445\u043e\u0434\u0438\u0442 \u043a \u043d\u0435\u043c\u0443 \u0447\u0435\u0440\u0435\u0437 HTTPS API, \u043f\u0430\u0440\u043e\u043b\u044c \u043e\u0442 \u0421\u0423\u0411\u0414 \u0432 APK \u043d\u0435 \u043a\u043b\u0430\u0434\u0443\u0442.<\/li>\n<\/ul>\n<h2 id=\"s10\">\u0413\u0434\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \/ \u0441\u0432\u044f\u0437\u044c \u0441 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u043e\u0439<\/h2>\n<div class=\"oj-cta\" style=\"background:#fbf4e4;border-left:4px solid #c9962b;border-radius:8px;padding:16px 20px;margin:24px 0\">\n<p style=\"margin:0 0 8px\"><strong>\u041e\u0441\u0432\u043e\u0439\u0442\u0435 \u0442\u0435\u043c\u0443 \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435<\/strong><\/p>\n<p>\u041b\u043e\u043a\u0430\u043b\u044c\u043d\u0430\u044f \u0431\u0430\u0437\u0430 &#8212; \u0447\u0430\u0441\u0442\u044c \u043f\u043e\u0447\u0442\u0438 \u043b\u044e\u0431\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f: \u043e\u0444\u043b\u0430\u0439\u043d-\u0440\u0435\u0436\u0438\u043c, \u043a\u0435\u0448 \u043b\u0435\u043d\u0442\u044b, \u0447\u0435\u0440\u043d\u043e\u0432\u0438\u043a\u0438, \u0438\u0441\u0442\u043e\u0440\u0438\u044f. Room, \u043a\u043e\u0440\u0443\u0442\u0438\u043d\u044b, ViewModel \u0438 \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u0441\u0435\u0442\u0435\u0432\u044b\u043c API \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u044e\u0442\u0441\u044f \u0432 \u043a\u0443\u0440\u0441\u0435 <a href=\"https:\/\/otus.ru\/lessons\/android-basic\/?int_article=mysql-i-android-chto-nuzhno-znat-programmistu&amp;int_place=article&amp;int_variant=v1\">\u00abAndroid-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a. \u0411\u0430\u0437\u043e\u0432\u044b\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c\u00bb<\/a>: \u0442\u0430\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0446\u0435\u043b\u0438\u043a\u043e\u043c, \u043e\u0442 \u044d\u043a\u0440\u0430\u043d\u043e\u0432 \u0434\u043e \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445. \u0427\u0442\u043e\u0431\u044b \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u0444\u043e\u0440\u043c\u0430\u0442, \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0447\u0430\u0442\u044c \u0441 <a href=\"https:\/\/otus.ru\/events\/?int_article=mysql-i-android-chto-nuzhno-znat-programmistu&amp;int_place=article&amp;int_variant=v1\">\u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0445 \u0443\u0440\u043e\u043a\u043e\u0432 Otus<\/a>.<\/p>\n<\/div>\n<p>\u0421\u043c\u0435\u0436\u043d\u0430\u044f \u0442\u0435\u043c\u0430: <a href=\"\/journal\/znakomstvo-s-sqlite-chto-nuzhno-znat-o-subd\/\">\u0437\u043d\u0430\u043a\u043e\u043c\u0441\u0442\u0432\u043e \u0441 SQLite \u0438 \u0435\u0435 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043a\u0430\u043a \u0421\u0423\u0411\u0414<\/a>.<\/p>\n<h2 id=\"s11\">FAQ<\/h2>\n<p><strong>\u041c\u043e\u0436\u043d\u043e \u043b\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c MySQL \u043f\u0440\u044f\u043c\u043e \u043d\u0430 Android-\u0442\u0435\u043b\u0435\u0444\u043e\u043d?<\/strong><br \/>\n\u0414\u043b\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u0443\u0431\u043b\u0438\u043a\u0443\u0435\u0442\u0441\u044f \u0432 \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0435, &#8212; \u043d\u0435\u0442 \u0441\u043c\u044b\u0441\u043b\u0430: \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u043d\u0435 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440 \u0421\u0423\u0411\u0414. \u0414\u043b\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0435\u0441\u0442\u044c \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 SQLite.<\/p>\n<p><strong>Room \u0438\u043b\u0438 SQLiteOpenHelper \u0434\u043b\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430?<\/strong><br \/>\nRoom: \u043c\u0435\u043d\u044c\u0448\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430, \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435 \u0438 \u0433\u043e\u0442\u043e\u0432\u0430\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u043a\u043e\u0440\u0443\u0442\u0438\u043d. SQLiteOpenHelper \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0441\u0442\u0430\u0440\u043e\u043c \u043a\u043e\u0434\u0435, \u0435\u0433\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0443\u043c\u0435\u0442\u044c \u0447\u0438\u0442\u0430\u0442\u044c.<\/p>\n<p><strong>\u0413\u0434\u0435 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438 \u043b\u0435\u0436\u0438\u0442 \u0444\u0430\u0439\u043b \u0431\u0430\u0437\u044b?<\/strong><br \/>\n\u0412 \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u043e\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0432 \u043f\u0430\u043f\u043a\u0435 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">databases<\/code>. \u041f\u0443\u0442\u044c \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0447\u0435\u0440\u0435\u0437 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">context.getDatabasePath(\"staff.db\")<\/code>, \u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 Database Inspector.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0411\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 Android &#8212; \u044d\u0442\u043e \u0447\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0444\u0430\u0439\u043b SQLite \u0432\u043d\u0443\u0442\u0440\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f: \u0434\u0432\u0438\u0436\u043e\u043a SQLite \u0432\u0441\u0442\u0440\u043e\u0435\u043d \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0443, \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0435 \u043d\u0443\u0436\u0435\u043d, \u0430 \u0434\u0430\u043d\u043d\u044b\u0435 \u043b\u0435\u0436\u0430\u0442 \u0432 \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u043e\u0439 \u043f\u0430\u043f\u043a\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0420\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0441 \u043d\u0438\u043c \u043e\u0431\u044b\u0447\u043d\u043e \u0447\u0435\u0440\u0435\u0437 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 Room \u0438\u0437 Android Jetpack &#8212; \u043e\u043d\u0430 \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442 Kotlin-\u043a\u043b\u0430\u0441\u0441\u044b \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 SQL-\u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435. MySQL &#8212; \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u0430\u044f \u0421\u0423\u0411\u0414: \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0435 [&hellip;]<\/p>\n","protected":false},"author":11,"featured_media":3677,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[74,189,38],"class_list":["post-3676","post","type-post","status-publish","format-standard","has-post-thumbnail","","category-polza","tag-android-2","tag-mysql","tag-sql"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.2 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u041a\u0430\u043a\u0443\u044e \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 Android-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438: SQLite \u0438 Room (\u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438, DAO, \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438), \u0432\u043d\u0435\u0448\u043d\u0438\u0435 \u043a\u043b\u044e\u0447\u0438 \u0438 \u043f\u043e\u0447\u0435\u043c\u0443 \u043a MySQL \u0445\u043e\u0434\u044f\u0442 \u0447\u0435\u0440\u0435\u0437 API, \u0430 \u043d\u0435 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"A. Pavlenko\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/otus.ru\/journal\/mysql-i-android-chto-nuzhno-znat-programmistu\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.2\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/mysql-i-android-chto-nuzhno-znat-programmistu\\\/#article\",\"name\":\"\\u0411\\u0430\\u0437\\u0430 \\u0434\\u0430\\u043d\\u043d\\u044b\\u0445 \\u043d\\u0430 Android: SQLite, Room \\u0438 MySQL | Otus\",\"headline\":\"\\u0411\\u0430\\u0437\\u0430 \\u0434\\u0430\\u043d\\u043d\\u044b\\u0445 \\u043d\\u0430 Android: SQLite, Room \\u0438 \\u0433\\u0434\\u0435 \\u0437\\u0434\\u0435\\u0441\\u044c MySQL\",\"author\":{\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/author\\\/a-pavlenko\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/otus.ru\\\/journal\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/oj-1080x7207-1.png\",\"width\":1080,\"height\":720},\"datePublished\":\"2026-09-24T09:00:00+00:00\",\"dateModified\":\"2026-09-25T15:29:23+00:00\",\"inLanguage\":\"ru-RU\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/mysql-i-android-chto-nuzhno-znat-programmistu\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/mysql-i-android-chto-nuzhno-znat-programmistu\\\/#webpage\"},\"articleSection\":\"\\u041f\\u043e\\u043b\\u0435\\u0437\\u043d\\u043e\\u0435, Android, mysql, SQL\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/mysql-i-android-chto-nuzhno-znat-programmistu\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/otus.ru\\\/journal\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/category\\\/polza\\\/#listItem\",\"name\":\"\\u041f\\u043e\\u043b\\u0435\\u0437\\u043d\\u043e\\u0435\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/category\\\/polza\\\/#listItem\",\"position\":2,\"name\":\"\\u041f\\u043e\\u043b\\u0435\\u0437\\u043d\\u043e\\u0435\",\"item\":\"https:\\\/\\\/otus.ru\\\/journal\\\/category\\\/polza\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/mysql-i-android-chto-nuzhno-znat-programmistu\\\/#listItem\",\"name\":\"\\u0411\\u0430\\u0437\\u0430 \\u0434\\u0430\\u043d\\u043d\\u044b\\u0445 \\u043d\\u0430 Android: SQLite, Room \\u0438 \\u0433\\u0434\\u0435 \\u0437\\u0434\\u0435\\u0441\\u044c MySQL\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/mysql-i-android-chto-nuzhno-znat-programmistu\\\/#listItem\",\"position\":3,\"name\":\"\\u0411\\u0430\\u0437\\u0430 \\u0434\\u0430\\u043d\\u043d\\u044b\\u0445 \\u043d\\u0430 Android: SQLite, Room \\u0438 \\u0433\\u0434\\u0435 \\u0437\\u0434\\u0435\\u0441\\u044c MySQL\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/category\\\/polza\\\/#listItem\",\"name\":\"\\u041f\\u043e\\u043b\\u0435\\u0437\\u043d\\u043e\\u0435\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/#organization\",\"name\":\"\\u041e\\u0442\\u0443\\u0441 \\u043e\\u043d\\u043b\\u0430\\u0439\\u043d-\\u043e\\u0431\\u0440\\u0430\\u0437\\u043e\\u0432\\u0430\\u043d\\u0438\\u0435\",\"description\":\"\\u0411\\u043b\\u043e\\u0433 \\u043f\\u0440\\u043e IT\",\"url\":\"https:\\\/\\\/otus.ru\\\/journal\\\/\",\"telephone\":\"+74999389202\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/otus.ru\\\/journal\\\/wp-content\\\/uploads\\\/2026\\\/04\\\/OTUS-journal-logo-180x180-1.png\",\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/mysql-i-android-chto-nuzhno-znat-programmistu\\\/#organizationLogo\",\"width\":180,\"height\":180},\"image\":{\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/mysql-i-android-chto-nuzhno-znat-programmistu\\\/#organizationLogo\"},\"sameAs\":[\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCetgtvy93o3i3CvyGXKFU3g\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/author\\\/a-pavlenko\\\/#author\",\"url\":\"https:\\\/\\\/otus.ru\\\/journal\\\/author\\\/a-pavlenko\\\/\",\"name\":\"A. Pavlenko\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/mysql-i-android-chto-nuzhno-znat-programmistu\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/13488c7d5b657aaaf1808afd398f71e0225df07dd94eb7e5fcdfc45feff43cb5?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"A. Pavlenko\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/mysql-i-android-chto-nuzhno-znat-programmistu\\\/#webpage\",\"url\":\"https:\\\/\\\/otus.ru\\\/journal\\\/mysql-i-android-chto-nuzhno-znat-programmistu\\\/\",\"name\":\"\\u0411\\u0430\\u0437\\u0430 \\u0434\\u0430\\u043d\\u043d\\u044b\\u0445 \\u043d\\u0430 Android: SQLite, Room \\u0438 MySQL | Otus\",\"description\":\"\\u041a\\u0430\\u043a\\u0443\\u044e \\u0431\\u0430\\u0437\\u0443 \\u0434\\u0430\\u043d\\u043d\\u044b\\u0445 \\u0438\\u0441\\u043f\\u043e\\u043b\\u044c\\u0437\\u043e\\u0432\\u0430\\u0442\\u044c \\u0432 Android-\\u043f\\u0440\\u0438\\u043b\\u043e\\u0436\\u0435\\u043d\\u0438\\u0438: SQLite \\u0438 Room (\\u0441\\u0443\\u0449\\u043d\\u043e\\u0441\\u0442\\u0438, DAO, \\u043c\\u0438\\u0433\\u0440\\u0430\\u0446\\u0438\\u0438), \\u0432\\u043d\\u0435\\u0448\\u043d\\u0438\\u0435 \\u043a\\u043b\\u044e\\u0447\\u0438 \\u0438 \\u043f\\u043e\\u0447\\u0435\\u043c\\u0443 \\u043a MySQL \\u0445\\u043e\\u0434\\u044f\\u0442 \\u0447\\u0435\\u0440\\u0435\\u0437 API, \\u0430 \\u043d\\u0435 \\u043d\\u0430\\u043f\\u0440\\u044f\\u043c\\u0443\\u044e.\",\"inLanguage\":\"ru-RU\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/mysql-i-android-chto-nuzhno-znat-programmistu\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/author\\\/a-pavlenko\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/author\\\/a-pavlenko\\\/#author\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/otus.ru\\\/journal\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/oj-1080x7207-1.png\",\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/mysql-i-android-chto-nuzhno-znat-programmistu\\\/#mainImage\",\"width\":1080,\"height\":720},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/mysql-i-android-chto-nuzhno-znat-programmistu\\\/#mainImage\"},\"datePublished\":\"2026-09-24T09:00:00+00:00\",\"dateModified\":\"2026-09-25T15:29:23+00:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/#website\",\"url\":\"https:\\\/\\\/otus.ru\\\/journal\\\/\",\"name\":\"OTUS \\u0416\\u0443\\u0440\\u043d\\u0430\\u043b - \\u0411\\u043b\\u043e\\u0433 \\u043f\\u0440\\u043e IT\",\"alternateName\":\"OTUS \\u0416\\u0443\\u0440\\u043d\\u0430\\u043b\",\"description\":\"\\u0411\\u043b\\u043e\\u0433 \\u043f\\u0440\\u043e IT\",\"inLanguage\":\"ru-RU\",\"publisher\":{\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\u0411\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 Android: SQLite, Room \u0438 MySQL | Otus","description":"\u041a\u0430\u043a\u0443\u044e \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 Android-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438: SQLite \u0438 Room (\u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438, DAO, \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438), \u0432\u043d\u0435\u0448\u043d\u0438\u0435 \u043a\u043b\u044e\u0447\u0438 \u0438 \u043f\u043e\u0447\u0435\u043c\u0443 \u043a MySQL \u0445\u043e\u0434\u044f\u0442 \u0447\u0435\u0440\u0435\u0437 API, \u0430 \u043d\u0435 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e.","canonical_url":"https:\/\/otus.ru\/journal\/mysql-i-android-chto-nuzhno-znat-programmistu\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/otus.ru\/journal\/mysql-i-android-chto-nuzhno-znat-programmistu\/#article","name":"\u0411\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 Android: SQLite, Room \u0438 MySQL | Otus","headline":"\u0411\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 Android: SQLite, Room \u0438 \u0433\u0434\u0435 \u0437\u0434\u0435\u0441\u044c MySQL","author":{"@id":"https:\/\/otus.ru\/journal\/author\/a-pavlenko\/#author"},"publisher":{"@id":"https:\/\/otus.ru\/journal\/#organization"},"image":{"@type":"ImageObject","url":"https:\/\/otus.ru\/journal\/wp-content\/uploads\/2022\/06\/oj-1080x7207-1.png","width":1080,"height":720},"datePublished":"2026-09-24T09:00:00+00:00","dateModified":"2026-09-25T15:29:23+00:00","inLanguage":"ru-RU","mainEntityOfPage":{"@id":"https:\/\/otus.ru\/journal\/mysql-i-android-chto-nuzhno-znat-programmistu\/#webpage"},"isPartOf":{"@id":"https:\/\/otus.ru\/journal\/mysql-i-android-chto-nuzhno-znat-programmistu\/#webpage"},"articleSection":"\u041f\u043e\u043b\u0435\u0437\u043d\u043e\u0435, Android, mysql, SQL"},{"@type":"BreadcrumbList","@id":"https:\/\/otus.ru\/journal\/mysql-i-android-chto-nuzhno-znat-programmistu\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/otus.ru\/journal\/#listItem","position":1,"name":"Home","item":"https:\/\/otus.ru\/journal\/","nextItem":{"@type":"ListItem","@id":"https:\/\/otus.ru\/journal\/category\/polza\/#listItem","name":"\u041f\u043e\u043b\u0435\u0437\u043d\u043e\u0435"}},{"@type":"ListItem","@id":"https:\/\/otus.ru\/journal\/category\/polza\/#listItem","position":2,"name":"\u041f\u043e\u043b\u0435\u0437\u043d\u043e\u0435","item":"https:\/\/otus.ru\/journal\/category\/polza\/","nextItem":{"@type":"ListItem","@id":"https:\/\/otus.ru\/journal\/mysql-i-android-chto-nuzhno-znat-programmistu\/#listItem","name":"\u0411\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 Android: SQLite, Room \u0438 \u0433\u0434\u0435 \u0437\u0434\u0435\u0441\u044c MySQL"},"previousItem":{"@type":"ListItem","@id":"https:\/\/otus.ru\/journal\/#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/otus.ru\/journal\/mysql-i-android-chto-nuzhno-znat-programmistu\/#listItem","position":3,"name":"\u0411\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 Android: SQLite, Room \u0438 \u0433\u0434\u0435 \u0437\u0434\u0435\u0441\u044c MySQL","previousItem":{"@type":"ListItem","@id":"https:\/\/otus.ru\/journal\/category\/polza\/#listItem","name":"\u041f\u043e\u043b\u0435\u0437\u043d\u043e\u0435"}}]},{"@type":"Organization","@id":"https:\/\/otus.ru\/journal\/#organization","name":"\u041e\u0442\u0443\u0441 \u043e\u043d\u043b\u0430\u0439\u043d-\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435","description":"\u0411\u043b\u043e\u0433 \u043f\u0440\u043e IT","url":"https:\/\/otus.ru\/journal\/","telephone":"+74999389202","logo":{"@type":"ImageObject","url":"https:\/\/otus.ru\/journal\/wp-content\/uploads\/2026\/04\/OTUS-journal-logo-180x180-1.png","@id":"https:\/\/otus.ru\/journal\/mysql-i-android-chto-nuzhno-znat-programmistu\/#organizationLogo","width":180,"height":180},"image":{"@id":"https:\/\/otus.ru\/journal\/mysql-i-android-chto-nuzhno-znat-programmistu\/#organizationLogo"},"sameAs":["https:\/\/www.youtube.com\/channel\/UCetgtvy93o3i3CvyGXKFU3g"]},{"@type":"Person","@id":"https:\/\/otus.ru\/journal\/author\/a-pavlenko\/#author","url":"https:\/\/otus.ru\/journal\/author\/a-pavlenko\/","name":"A. Pavlenko","image":{"@type":"ImageObject","@id":"https:\/\/otus.ru\/journal\/mysql-i-android-chto-nuzhno-znat-programmistu\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/13488c7d5b657aaaf1808afd398f71e0225df07dd94eb7e5fcdfc45feff43cb5?s=96&d=mm&r=g","width":96,"height":96,"caption":"A. Pavlenko"}},{"@type":"WebPage","@id":"https:\/\/otus.ru\/journal\/mysql-i-android-chto-nuzhno-znat-programmistu\/#webpage","url":"https:\/\/otus.ru\/journal\/mysql-i-android-chto-nuzhno-znat-programmistu\/","name":"\u0411\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 Android: SQLite, Room \u0438 MySQL | Otus","description":"\u041a\u0430\u043a\u0443\u044e \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 Android-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438: SQLite \u0438 Room (\u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438, DAO, \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438), \u0432\u043d\u0435\u0448\u043d\u0438\u0435 \u043a\u043b\u044e\u0447\u0438 \u0438 \u043f\u043e\u0447\u0435\u043c\u0443 \u043a MySQL \u0445\u043e\u0434\u044f\u0442 \u0447\u0435\u0440\u0435\u0437 API, \u0430 \u043d\u0435 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e.","inLanguage":"ru-RU","isPartOf":{"@id":"https:\/\/otus.ru\/journal\/#website"},"breadcrumb":{"@id":"https:\/\/otus.ru\/journal\/mysql-i-android-chto-nuzhno-znat-programmistu\/#breadcrumblist"},"author":{"@id":"https:\/\/otus.ru\/journal\/author\/a-pavlenko\/#author"},"creator":{"@id":"https:\/\/otus.ru\/journal\/author\/a-pavlenko\/#author"},"image":{"@type":"ImageObject","url":"https:\/\/otus.ru\/journal\/wp-content\/uploads\/2022\/06\/oj-1080x7207-1.png","@id":"https:\/\/otus.ru\/journal\/mysql-i-android-chto-nuzhno-znat-programmistu\/#mainImage","width":1080,"height":720},"primaryImageOfPage":{"@id":"https:\/\/otus.ru\/journal\/mysql-i-android-chto-nuzhno-znat-programmistu\/#mainImage"},"datePublished":"2026-09-24T09:00:00+00:00","dateModified":"2026-09-25T15:29:23+00:00"},{"@type":"WebSite","@id":"https:\/\/otus.ru\/journal\/#website","url":"https:\/\/otus.ru\/journal\/","name":"OTUS \u0416\u0443\u0440\u043d\u0430\u043b - \u0411\u043b\u043e\u0433 \u043f\u0440\u043e IT","alternateName":"OTUS \u0416\u0443\u0440\u043d\u0430\u043b","description":"\u0411\u043b\u043e\u0433 \u043f\u0440\u043e IT","inLanguage":"ru-RU","publisher":{"@id":"https:\/\/otus.ru\/journal\/#organization"}}]}},"aioseo_meta_data":{"post_id":"3676","title":"\u0411\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 Android: SQLite, Room \u0438 MySQL | Otus","description":"\u041a\u0430\u043a\u0443\u044e \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 Android-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438: SQLite \u0438 Room (\u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438, DAO, \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438), \u0432\u043d\u0435\u0448\u043d\u0438\u0435 \u043a\u043b\u044e\u0447\u0438 \u0438 \u043f\u043e\u0447\u0435\u043c\u0443 \u043a MySQL \u0445\u043e\u0434\u044f\u0442 \u0447\u0435\u0440\u0435\u0437 API, \u0430 \u043d\u0435 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e.","keywords":[],"keyphrases":{"focus":[],"additional":[]},"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":null,"og_article_tags":[],"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":{"id":"aioseo-article-6363ce1ace8c0","slug":"article","graphName":"Article","label":"\u0421\u0442\u0430\u0442\u044c\u044f","properties":{"type":"BlogPosting","name":"#post_title","headline":"#post_title","description":"#post_excerpt","image":"","keywords":"","author":{"name":"#author_name","url":"#author_url"},"dates":{"include":true,"datePublished":"","dateModified":""}}},"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":"{\"article\":{\"articleType\":\"BlogPosting\"},\"course\":{\"name\":\"\",\"description\":\"\",\"provider\":\"\"},\"faq\":{\"pages\":[]},\"product\":{\"reviews\":[]},\"recipe\":{\"ingredients\":[],\"instructions\":[],\"keywords\":[]},\"software\":{\"reviews\":[],\"operatingSystems\":[]},\"webPage\":{\"webPageType\":\"WebPage\"}}","pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":"-1","robots_max_videopreview":"-1","robots_max_imagepreview":"large","priority":null,"frequency":"default","location":null,"local_seo":{"businessInfo":{"name":"","urls":{"website":"","aboutPage":"","contactPage":""},"address":{"line1":"","line2":"","zip":"","city":"","state":"","country":""},"contact":{"email":"","phone":"","fax":""},"ids":{"vatID":"","taxID":"","chamberID":""},"payment":{"priceIndication":"","currenciesAccepted":"","methodsAccepted":""},"areaServed":""},"openingHours":{"show":false,"closedLabel":"","open24h":false,"open24hLabel":"","open247":false,"use24hFormat":false,"twoSets":false,"timezone":"","hours":[]}},"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2022-06-08 17:07:15","updated":"2026-09-25 17:43:05","seo_analyzer_scan_date":null,"focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/otus.ru\/journal\/\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/otus.ru\/journal\/category\/polza\/\" title=\"\u041f\u043e\u043b\u0435\u0437\u043d\u043e\u0435\">\u041f\u043e\u043b\u0435\u0437\u043d\u043e\u0435<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t\u0411\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 Android: SQLite, Room \u0438 \u0433\u0434\u0435 \u0437\u0434\u0435\u0441\u044c MySQL\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/otus.ru\/journal\/"},{"label":"\u041f\u043e\u043b\u0435\u0437\u043d\u043e\u0435","link":"https:\/\/otus.ru\/journal\/category\/polza\/"},{"label":"\u0411\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 Android: SQLite, Room \u0438 \u0433\u0434\u0435 \u0437\u0434\u0435\u0441\u044c MySQL","link":"https:\/\/otus.ru\/journal\/mysql-i-android-chto-nuzhno-znat-programmistu\/"}],"_links":{"self":[{"href":"https:\/\/otus.ru\/journal\/wp-json\/wp\/v2\/posts\/3676","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/otus.ru\/journal\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/otus.ru\/journal\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/otus.ru\/journal\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/otus.ru\/journal\/wp-json\/wp\/v2\/comments?post=3676"}],"version-history":[{"count":3,"href":"https:\/\/otus.ru\/journal\/wp-json\/wp\/v2\/posts\/3676\/revisions"}],"predecessor-version":[{"id":12947,"href":"https:\/\/otus.ru\/journal\/wp-json\/wp\/v2\/posts\/3676\/revisions\/12947"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/otus.ru\/journal\/wp-json\/wp\/v2\/media\/3677"}],"wp:attachment":[{"href":"https:\/\/otus.ru\/journal\/wp-json\/wp\/v2\/media?parent=3676"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/otus.ru\/journal\/wp-json\/wp\/v2\/categories?post=3676"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/otus.ru\/journal\/wp-json\/wp\/v2\/tags?post=3676"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}