I am making an application that basically holds categories of questions (and, needless to mention, questions within each category). The users are able to add/remove categories and add/remove questions within those categories. I need to now capture this structure in SQLDatabase and I am kind of stuck.
I have realized that I will need two tables to capture this relationship but I have absolutely no clue to how to go about it.
So, should I make two different SQLiteOpenHelpers for the two tables? If so, how do I go about creating a link between them? Each Category object has an ID,a title and a list of Question objects and each Question object has a Category object, ID, String (the actual question). So which fields should I include in both the tables?
I am really confused and a little guidance will help a lot. I am just a beginner so a little explanation would be appreciate a lot.
Aucun commentaire:
Enregistrer un commentaire