How To Create or Stabiles relationship between two tables in FMDB?
Asked Answered
W

1

3

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!

Wilds answered 24/9, 2013 at 5:33 Comment(0)
A
1

By looking at your other question I guess you already sorted this out. Here's my answer anyway. In iOS development it's uncommon to use SQLite directly, instead we use CoreData, which is an API that serializes data to SQLite (or you can configure it to serialize it to binary or XML too).

Here are some links for you:

SQLite

CoreData

Hope this helps!

Adelaideadelaja answered 26/9, 2013 at 18:48 Comment(1)
I'm not using SQLITE Directly. I'm using SQLITE with FMDB which is a Wrapper for the sqlite my functionality works but trouble while making relation between two tables. I am new in development but i know how to use Sqlite but don't know how to use FMDB. Any HelpWilds

© 2022 - 2024 — McMap. All rights reserved.