Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

whitedragon101

macrumors 65816
Original poster
Sep 11, 2008
1,349
339
I am writing an iphone app that uses sqlite3. I am just learning how it works but it is very hard as I can not see the database except issuing commands in the app code (some of which may be wrong).

Is there a program like phpmyadmin where I can open the database, see and edit the tables and data and maybe even execute commands using the .db file the app creates?
 
Have you considered using Core Data with a SQLite store type?

I was hoping that my background of writing php / mysql would make the sqlite3 option the most straightforward without having to learn a new system. I have made a singleton class that I import to each viewcontroller and then each VC uses the singleton to make data inserts and requests.
 
I was hoping that my background of writing php / mysql would make the sqlite3 option the most straightforward without having to learn a new system. I have made a singleton class that I import to each viewcontroller and then each VC uses the singleton to make data inserts and requests.

This is the approach I'm using with my app too. As much as I like Core Data (or at least the idea of it) and while I'm certainly open to giving it a shot again in the future, I find sqlite to be much easier to work with.

As for applications that allow you to edit a sqlite database (using DDL and DML) I've found several in the Mac App Store, but there are two that stand out for me:

Base by Menial
This is a very nice sqlite database editor that gives you graphical editors for designing tables and editing data as well as a console view for composing and running SQL statements.

Navicat Essentials for SQLite
There is an expensive full version and a less expensive essentials version. I got the essentials version which gives you everything Base includes plus it lets you create different database connection objects with various editable paraments. The super expensive full version includes a graphical data modeler.

Navicat is currently my goto appliaction for database editing. It provides not only a basic console view but also a "code" editor view that lets you save your progress and/or run it in one view. Very convenient.

Both of the above mentioned titles have been updated numerous times since I've purchased.

Before purchasing Navicat, from the Mac App Store, check their website as they can give you special upgrade pricing that they can't provide through the Mac App Store.

Keep us updated!
 
ooh, nice. It doesn't require loading the db each time to refresh the data. Awesome.

If anyone has any others please let me know.

Thanks

incidentally are there any abc walk throughs of using sqlite in objective c. Like tiztag do for mysql on php?
http://www.tizag.com/mysqlTutorial/mysqlinsert.php

eg
create table
select
insert

etc

Something like this will do: https://github.com/ccgus/fmdb

The objective-c methods used for accessing the sqlite is pretty similar to the way php-mysql does things. And you can use prepopulated databases which is a big plus.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.