So I am working on a book tracking app and I need to store data about the books. Using objects I would store a list of author objects which would include series objects. Those would have book objects.
What is the best way to translate this into a database? Will be using SQLite.
You would create your tables based on your Object structure and relationships.
It seems what you have is an
Authors(table) that has manySeries(table).Serieshave manyBooks(table). Correct me if I’m wrong, I didn’t understand your last sentence that well.If I am correct then you would need foreign keys as follows:
an
author_idon your series table, and aseries_idon your books table to link back to the parent table for queries. Let me know if it helps!