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
ZABCDto 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.