relationships between tables SQLite
Recently, I started looking at a ready-made telegram bot on Aiogram 3.x for selling digital goods, which is publicly available, and noticed that in db_helper.py
SQLite tables are being generated. So it uses the primary key and the auto-increment as an “increment”, but is not used as a foreign key in other tables. But foreign keys are taken into account, for example, in the storage_position
table this is the category_id from the storage_category
table, and in the storage_item
table this is the category_id
from storage_category
and position_id
from storage_postion
. UNIX is stored in all these ids
. So, can I write these queries in a different way (see option 2)?