I'm new to database design/usage, and I need to setup a database that will track an inventory of items contained inside other items (such as boxes, enclosures, etc).
To achieve this, all entries will include an id field (incidentally the PRIMARY KEY), and if they're inside something, the container_id field will reference the id of the containing item (box, enclosure etc).
Using SQLite, how can I formulate a SELECT query that will automatically include all the entries (ids) referenced by any container_ids?
Aucun commentaire:
Enregistrer un commentaire