I'm making a Android app and i'm using SQLite but i'm having a hard time figuring out how to design the database.
What i'm doing is i'm displaying products from a store by search term. I can't figure out the best way to design the db so that when the app is offline and the user searches something, then the proper products will show. Each product can have multiple search terms.
This is what I thought of so far.
Product(int id, String productName, String image)
Search(int id, String term, int productID)
So I will hold all the products in the product table and then for every product I will make a entry in the Search table. Which means the product may have multiple search terms.
Is this a good strategy?
Aucun commentaire:
Enregistrer un commentaire