Linking an iPhone app's database to a website's database

Discussion in 'Web Design and Development' started by cloud, Sep 17, 2009.

  1. cloud macrumors member

    Joined:
    Jul 4, 2002
    Location:
    The Matrix
    #1
    Good day all!

    I will begin learning how to make iPhone apps, but one of the things I really need to find out is how do you link an iPhone app's SQL database to a website's SQL database.

    I was looking around the web for info, but I didn't see any. If you can point me in the right direction (website or book), please do so! I appreciate your time and help guys and gals!

    :apple:
     
  2. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #2
  3. jeremy.king macrumors 603

    jeremy.king

    Joined:
    Jul 23, 2002
    Location:
    Fuquay Varina, NC
    #3
    You will have to do the syncing on your own. Assuming you have a relatively small db - you can use XML and webservices to exchange data.
     
  4. sanPietro98 macrumors 6502a

    sanPietro98

    Joined:
    May 30, 2008
    Location:
    28.416834,-81.581214
    #4
    The iPhone uses SQLite not a fully-compliant SQL Database (it's close though). So you first need to make sure that the features/operations you want are supported by SQLite 3.

    Then, your website code will need to have access to the SQLite database file. Java Sevlets and JSPs can do this (if you get the correct JDBC JAR File). I **think** there's a PHP library for SQLite, but I'm not 100% sure.

    I assume you want to have the same file being used on the iPhone and a different copy on the website?
     
  5. itsbarry macrumors newbie

    Joined:
    May 14, 2009
    #5
    Well, I wanted the iPhone to be able to pull from the same database as a website. I don't know if XML is better for that or not, though. :(
     
  6. sanPietro98 macrumors 6502a

    sanPietro98

    Joined:
    May 30, 2008
    Location:
    28.416834,-81.581214
    #6
    I don't know if the iPhone SDK has the MySQL drivers built-in or not. But it's conceivable to make the iPhone just act as a DB client.

    But I would recommend having a web-based front-end that serves XML or some other interface you design.
     

Share This Page