Coder
Coder

Reputation: 45

iOS SQLite database...pre-populate data

I have a simple question & answers kind of data, and modeled it in XCode and have the classes working with relations defined as I needed (Each question has 4 answers, one of them is correct etc...)

Now the big task of putting all the questions I have prepared into the SQLite database on iOS.

What are the recommended and efficient ways to do this?

I can put the questions and answers in a text file (with some markers) and write a throwaway iOS code to read line by line and populate the database...but wanted to see here if someone recommends some other solution, before I start there.

I do NOT have the data in soft form at the moment, so I am open to anything. I started writing a desktop app (C#) to enter the data but would that desktop SQLite (on Windows) match with the iOS SQLite database?

Thanks!

Upvotes: 1

Views: 938

Answers (1)

Steven Parkes
Steven Parkes

Reputation: 46

I downloaded BASE (http://menial.co.uk/software/base/) and populated my database in there. The trial version works fine for import/export, just limits query results.

It even has an import from Excel function. Although I find that was hard to get to work. It was easier to write code in my Excel file to generate SQL statements, and then run those in BASE to create all the data I required.

Upvotes: 3

Related Questions