I'm new with iOS Development and i'm also new with SQLITE database. I used FMDB as a wrapper in my project and i have two tables 1) ParticepentsTable
and 2) ExerciseTable
.
ParticepentsTable
contains 4-Rows like Id, Name, Gender and Exercise_Id
and the ExerciseTable
contains 2-Rows i.e. Id and exercise_Name
.
My questions are as follow:-
1) I want to make a Foreign-key Relation between Table-1 & 2 using FMDB, so that i can store the exercise according to Participants choice.
2) Or any other way to select or insert exercises according to the participants?
3) Can I use Join to fetch data from both the tables according to the Participants id?
Any one can help please!
Tutorial link is more appreciated! Thanks!