A program to open sqlite3 .db files?

Discussion in 'iOS Programming' started by whitedragon101, Mar 20, 2013.

  1. whitedragon101 macrumors 6502a

    Joined:
    Sep 11, 2008
    #1
    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?
     
  2. MarcelEdward macrumors member

    Joined:
    Sep 24, 2012
  3. whitedragon101 thread starter macrumors 6502a

    Joined:
    Sep 11, 2008
    #4
    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
     
  4. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #5
    Have you considered using Core Data with a SQLite store type?
     
  5. whitedragon101 thread starter macrumors 6502a

    Joined:
    Sep 11, 2008
    #6
    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.
     
  6. TheWatchfulOne macrumors 6502

    Joined:
    Jun 19, 2009
    #7
    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!
     
  7. PhoneyDeveloper macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
  8. MarcelEdward macrumors member

    Joined:
    Sep 24, 2012
    #9
    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.
     

Share This Page