1
0
Fork 0
mirror of https://github.com/EDeev/mobiles_dataset.git synced 2026-10-07 20:49:44 +03:00
Курсовая по базам данных (Московский Политех): датасет смартфонов 2025 в PostgreSQL (3НФ), приложение на PyQt6 и анализ индексов
Find a file
Egor Deev 2daa52a238 README на русском и английском, скриншоты, CI и сборка .exe в релиз
- README: факты курсовой сверены с кодом (пять таблиц, 930 строк датасета → 914 моделей),
  ссылка клонирования — на настоящий репозиторий вместо шаблонной, инструкция без Docker
  исправлена (скрипт схемы сам создаёт базу и выполняется под postgres);
- CI: ruff, создание схемы и импорт датасета в PostgreSQL;
- по тегу v* GitHub Actions собирает MobileDevices.exe (PyInstaller) и кладёт в релиз.
2026-10-05 17:36:36 +00:00
.github/workflows README на русском и английском, скриншоты, CI и сборка .exe в релиз 2026-10-05 17:36:36 +00:00
docker docker-compose: PostgreSQL 15 со схемой курсовой и ролью по умолчанию для локального запуска 2026-10-05 17:23:12 +00:00
docs README на русском и английском, скриншоты, CI и сборка .exe в релиз 2026-10-05 17:36:36 +00:00
scripts Таблицы: сортировка выключается на время заполнения 2026-10-05 17:35:37 +00:00
sql Переводы строк приведены к LF 2026-10-05 17:19:44 +00:00
.gitattributes Переводы строк приведены к LF 2026-10-05 17:19:44 +00:00
compose.yaml docker-compose: PostgreSQL 15 со схемой курсовой и ролью по умолчанию для локального запуска 2026-10-05 17:23:12 +00:00
database.py Подключение к БД — из переменных окружения DB_*, лишние импорты убраны 2026-10-05 17:21:14 +00:00
main.py Переводы строк в CSV с результатами EXPLAIN приведены к LF 2026-10-05 17:21:14 +00:00
main_window.py Таблицы: сортировка выключается на время заполнения 2026-10-05 17:35:37 +00:00
Mobiles Dataset 2025.csv Переводы строк приведены к LF 2026-10-05 17:19:44 +00:00
README.en.md README на русском и английском, скриншоты, CI и сборка .exe в релиз 2026-10-05 17:36:36 +00:00
README.md README на русском и английском, скриншоты, CI и сборка .exe в релиз 2026-10-05 17:36:36 +00:00
requirements.txt v. 1.0 2025-06-06 18:37:39 +03:00

Mobile Devices Database

Русский · English

CI Release

Database design coursework: the 2025 mobile devices dataset split into a normalized PostgreSQL database, a PyQt6 desktop app to work with it, and a measurement of index gains with EXPLAIN ANALYZE.

Status: coursework ("Database Design and Administration", Moscow Polytechnic University, 2025), completed

Models tab

Stack: Python 3.11 · PostgreSQL 15 · psycopg2 · PyQt6 · pandas · Docker

Features

  • 3NF schema of five tables (companies, processors, models, regions, prices) with foreign keys and cascading actions
  • Import of the Kaggle dataset (930 rows; 914 models and 4569 prices after cleaning) split into reference tables
  • App: companies and models with create, edit and delete, prices in five regions (Pakistan, India, China, UAE, USA) with currency symbols, search by name, company and RAM, a price statistics tab
  • Index experiment: EXPLAIN ANALYZE queries before and after, plans saved in sql/explain_results/
Metric No indexes With indexes Difference
Search 0.234 ms 0.089 ms 62% faster
Four-table JOIN 18.6 ms 0.95 ms 95% faster
Planner cost 44.76 12.45 72% lower
Rows scanned 914 18 98% fewer

Measured on this dataset (hundreds of rows), so absolute times are fractions of a millisecond.

Quick start

git clone https://github.com/EDeev/mobiles_dataset.git && cd mobiles_dataset
docker compose up -d                  # PostgreSQL 15 with the schema from sql/create_schema.sql
pip install -r requirements.txt
python scripts/import_data.py         # load the dataset
python main.py                        # the app

A ready-made Windows build (.exe) is in the releases.

Without Docker

  1. Run sql/create_schema.sql in psql or pgAdmin as postgres — the script creates the mobile_devices_db database itself.
  2. Set the connection with DB_HOST, DB_PORT, DB_NAME, DB_USER, DB_PASSWORD (defaults: localhost:5432, mobile_devices_db, admin / password).
  3. python scripts/import_data.py, then python main.py.

Screenshots

Companies Analytics
Companies Analytics

License

Coursework (Database Design and Administration, Moscow Polytechnic University, 2025). The code is open for study; there is no separate license. The dataset comes from Kaggle under its author's terms.

Author

Egor Deev — GitHub · Telegram · egor@deev.space


⭐ If you find this project useful, give it a star on GitHub!

Made with ❤️ — deev.space