2

This is following up on this previous useful answer; I'd have left a comment there if i had the rep(: In case you have the same questions i did:

First, i had to rename AddressBook-v22.abcddb to end with a .db suffix before i could get my sqlite DB browser (Version 3.8.0) to recognize it as a SQLite database, even though sqlite3 could open it from the command line.

Second, the biggest hassle i had was figuring out the data model used in this database. For me, the DB Browser GUI made fishing around across the tables worth the effort.

  • The primary integrating table is ZABCDRECORD (Why did Apple have to add ZABCD to all table names?!)
  • The name of the other tables' attributes which allow them to be joined varies, eg:

    LEFT JOIN ZABCDPOSTALADDRESS ON ZABCDPOSTALADDRESS.ZOWNER = ZABCDRECORD.Z_PK
    LEFT JOIN ZABCDEMAILADDRESS ON ZABCDEMAILADDRESS.ZOWNER = ZABCDRECORD.Z_PK
    LEFT JOIN ZABCDNOTE ON ZABCDNOTE.ZCONTACT = ZABCDRECORD.Z_PK
    

Note that while I'm able to get existing Contacts data in these tables, I haven't found anyway to have Contacts take up any subsequent edits to the sqlite database. @bmike suggests using vCard import/export, and that is certainly a workaround.

closed as too broad by bmike Feb 18 '16 at 20:08

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    Sorry I can't help with your question however I wanted to say thanks for turning me on to DB Browser for SQLite. – user3439894 Jan 8 '16 at 0:50
  • I don't think you can achieve anything on working on the .abcddb because this is a database which is built by Contacts from its internal data which is the Metadata directory. – dan Jan 17 '16 at 10:29
  • Welcome to Ask Different. What specifically are you looking to modify? Exporting data as vCard and manipulating that file and then importing is the fastest way I know to make bulk changes to the database. That code is well documented or you could import into a simplified sqlite database schema if you needed. Also - if you could stick to one question per question, that works best here. – bmike Feb 18 '16 at 20:02
  • hey @bmike, i was pursuing the contacts' .abcddb <--> sqlite connection. (if i was starting over, i'd probably use vCards as you suggest.) yes, i can import into sqlite, but it seems impossible to round-trip. that comes close to the 'answer' i wish i'd had. tell me how you'd like this editted to conform and i'm happy to oblige. – rikb Feb 19 '16 at 22:22
  • Everything after the code block needs do to go I think. Modifying contacts app to use a different schema is too broad IMO. Basically, can you specify a more narrow end goal? – bmike Feb 19 '16 at 23:51

Browse other questions tagged .