<< Back to posts

Schema of Mac OSX's AddressBook SQLite database for storing contacts

Posted on December 24, 2024 • Tags: mac sqlite contacts addressbook

Mac OSX stores your local contacts data in ~/Library/Application Support/AddressBook/.

Specifically, your local contacts are stored in the SQLite database at ~/Library/Application Support/AddressBook/AddressBook-v22.abcddb. It is a SQLite database containing 34 tables.

Note: If you have other linked accounts (e.g. Gmail, iCloud, etc.), those contacts will not appear in this database unless you explicitly download them onto your Mac as follows:

download_contacts

Here is the schema of AddressBook-v22.abcddb:

Table: ZABCDALERTTONE

  • Z_PK (INTEGER)
  • Z_ENT (INTEGER)
  • Z_OPT (INTEGER)
  • ZIOSLEGACYIDENTIFIER (INTEGER)
  • ZOWNER (INTEGER)
  • Z22_OWNER (INTEGER)
  • ZTONEDATA (VARCHAR)
  • ZTYPE (VARCHAR)
  • ZUNIQUEID (VARCHAR)

Table: ZABCDCALENDARURI

  • Z_PK (INTEGER)
  • Z_ENT (INTEGER)
  • Z_OPT (INTEGER)
  • ZIOSLEGACYIDENTIFIER (INTEGER)
  • ZISPRIMARY (INTEGER)
  • ZISPRIVATE (INTEGER)
  • ZORDERINGINDEX (INTEGER)
  • ZOWNER (INTEGER)
  • Z22_OWNER (INTEGER)
  • ZLABEL (VARCHAR)
  • ZUNIQUEID (VARCHAR)
  • ZURL (VARCHAR)

Table: ZABCDCONTACTDATE

  • Z_PK (INTEGER)
  • Z_ENT (INTEGER)
  • Z_OPT (INTEGER)
  • ZDATEYEAR (INTEGER)
  • ZIOSLEGACYIDENTIFIER (INTEGER)
  • ZISPRIMARY (INTEGER)
  • ZISPRIVATE (INTEGER)
  • ZORDERINGINDEX (INTEGER)
  • ZOWNER (INTEGER)
  • Z22_OWNER (INTEGER)
  • ZDATE (TIMESTAMP)
  • ZDATEYEARLESS (FLOAT)
  • ZLABEL (VARCHAR)
  • ZUNIQUEID (VARCHAR)

Table: ZABCDCONTACTINDEX

  • Z_PK (INTEGER)
  • Z_ENT (INTEGER)
  • Z_OPT (INTEGER)
  • ZCONTACT (INTEGER)
  • Z22_CONTACT (INTEGER)
  • ZSTRINGFORINDEXING (VARCHAR)

Table: ZABCDCUSTOMPROPERTY

  • Z_PK (INTEGER)
  • Z_ENT (INTEGER)
  • Z_OPT (INTEGER)
  • ZVALUETYPE (INTEGER)
  • ZPROPERTYNAME (VARCHAR)
  • ZRECORDTYPE (VARCHAR)

Table: ZABCDCUSTOMPROPERTYVALUE

  • Z_PK (INTEGER)
  • Z_ENT (INTEGER)
  • Z_OPT (INTEGER)
  • ZDATEVALUEYEAR (INTEGER)
  • ZIOSLEGACYIDENTIFIER (INTEGER)
  • ZISPRIMARY (INTEGER)
  • ZISPRIVATE (INTEGER)
  • ZORDERINGINDEX (INTEGER)
  • ZCUSTOMPROPERTY (INTEGER)
  • ZOWNER (INTEGER)
  • Z17_OWNER (INTEGER)
  • ZDATEVALUE (TIMESTAMP)
  • ZDATEVALUEYEARLESS (FLOAT)
  • ZNUMBERVALUE (FLOAT)
  • ZLABEL (VARCHAR)
  • ZSTRINGVALUE (VARCHAR)
  • ZUNIQUEID (VARCHAR)
  • ZDATAVALUE (BLOB)

Table: ZABCDDATECOMPONENTS

  • Z_PK (INTEGER)
  • Z_ENT (INTEGER)
  • Z_OPT (INTEGER)
  • ZDAY (INTEGER)
  • ZERA (INTEGER)
  • ZIOSLEGACYIDENTIFIER (INTEGER)
  • ZISLEAPMONTH (INTEGER)
  • ZMONTH (INTEGER)
  • ZYEAR (INTEGER)
  • ZCONTACT (INTEGER)
  • Z22_CONTACT (INTEGER)
  • ZCALENDARIDENTIFIER (VARCHAR)
  • ZUNIQUEID (VARCHAR)

Table: ZABCDDELETEDRECORDLOG

  • Z_PK (INTEGER)
  • Z_ENT (INTEGER)
  • Z_OPT (INTEGER)
  • ZCONTAINER (INTEGER)
  • ZDELETEDRECORDUNIQUEID (VARCHAR)
  • ZUNIQUEID (VARCHAR)

Table: ZABCDDISTRIBUTIONLISTCONFIG

  • Z_PK (INTEGER)
  • Z_ENT (INTEGER)
  • Z_OPT (INTEGER)
  • ZADDRESS (INTEGER)
  • ZCONTACT (INTEGER)
  • Z22_CONTACT (INTEGER)
  • ZEMAIL (INTEGER)
  • ZGROUP (INTEGER)
  • Z19_GROUP (INTEGER)
  • ZPHONE (INTEGER)
  • ZPROPERTYNAME (VARCHAR)

Table: ZABCDEMAILADDRESS

  • Z_PK (INTEGER)
  • Z_ENT (INTEGER)
  • Z_OPT (INTEGER)
  • ZIOSLEGACYIDENTIFIER (INTEGER)
  • ZISPRIMARY (INTEGER)
  • ZISPRIVATE (INTEGER)
  • ZORDERINGINDEX (INTEGER)
  • ZOWNER (INTEGER)
  • Z22_OWNER (INTEGER)
  • ZADDRESS (VARCHAR)
  • ZADDRESSNORMALIZED (VARCHAR)
  • ZLABEL (VARCHAR)
  • ZUNIQUEID (VARCHAR)

Table: ZABCDLIKENESS

  • Z_PK (INTEGER)
  • Z_ENT (INTEGER)
  • Z_OPT (INTEGER)
  • ZIOSLEGACYIDENTIFIER (INTEGER)
  • ZISPRIMARY (INTEGER)
  • ZISPRIVATE (INTEGER)
  • ZKIND (INTEGER)
  • ZORDERINGINDEX (INTEGER)
  • ZOWNER (INTEGER)
  • Z22_OWNER (INTEGER)
  • ZLABEL (VARCHAR)
  • ZUNIQUEID (VARCHAR)
  • ZVERSION (VARCHAR)
  • ZDATA (BLOB)

Table: ZABCDMESSAGINGADDRESS

  • Z_PK (INTEGER)
  • Z_ENT (INTEGER)
  • Z_OPT (INTEGER)
  • ZIOSLEGACYIDENTIFIER (INTEGER)
  • ZISPRIMARY (INTEGER)
  • ZISPRIVATE (INTEGER)
  • ZORDERINGINDEX (INTEGER)
  • ZOWNER (INTEGER)
  • Z22_OWNER (INTEGER)
  • ZSERVICE (INTEGER)
  • ZADDRESS (VARCHAR)
  • ZBUNDLEIDENTIFIERSSTRING (VARCHAR)
  • ZLABEL (VARCHAR)
  • ZTEAMIDENTIFIER (VARCHAR)
  • ZUNIQUEID (VARCHAR)
  • ZUSERIDENTIFIER (VARCHAR)

Table: ZABCDNOTE

  • Z_PK (INTEGER)
  • Z_ENT (INTEGER)
  • Z_OPT (INTEGER)
  • ZCONTACT (INTEGER)
  • Z22_CONTACT (INTEGER)
  • ZTEXT (VARCHAR)
  • ZRICHTEXTDATA (BLOB)

Table: ZABCDPHONENUMBER

  • Z_PK (INTEGER)
  • Z_ENT (INTEGER)
  • Z_OPT (INTEGER)
  • ZIOSLEGACYIDENTIFIER (INTEGER)
  • ZISPRIMARY (INTEGER)
  • ZISPRIVATE (INTEGER)
  • ZORDERINGINDEX (INTEGER)
  • ZOWNER (INTEGER)
  • Z22_OWNER (INTEGER)
  • ZAREACODE (VARCHAR)
  • ZCOUNTRYCODE (VARCHAR)
  • ZEXTENSION (VARCHAR)
  • ZFULLNUMBER (VARCHAR)
  • ZLABEL (VARCHAR)
  • ZLASTFOURDIGITS (VARCHAR)
  • ZLOCALNUMBER (VARCHAR)
  • ZUNIQUEID (VARCHAR)

Table: ZABCDPOSTALADDRESS

  • Z_PK (INTEGER)
  • Z_ENT (INTEGER)
  • Z_OPT (INTEGER)
  • ZIOSLEGACYIDENTIFIER (INTEGER)
  • ZISPRIMARY (INTEGER)
  • ZISPRIVATE (INTEGER)
  • ZORDERINGINDEX (INTEGER)
  • ZOWNER (INTEGER)
  • Z22_OWNER (INTEGER)
  • ZCITY (VARCHAR)
  • ZCOUNTRYCODE (VARCHAR)
  • ZCOUNTRYNAME (VARCHAR)
  • ZLABEL (VARCHAR)
  • ZREGION (VARCHAR)
  • ZSAMA (VARCHAR)
  • ZSTATE (VARCHAR)
  • ZSTREET (VARCHAR)
  • ZSUBLOCALITY (VARCHAR)
  • ZUNIQUEID (VARCHAR)
  • ZZIPCODE (VARCHAR)
  • ZCUSTOMVALUESDICTIONARY (BLOB)

Table: Z_18PARENTGROUPS

  • Z_18CHILDGROUPS (INTEGER)
  • Z_19PARENTGROUPS (INTEGER)

Table: Z_22PARENTGROUPS

  • Z_22CONTACTS (INTEGER)
  • Z_19PARENTGROUPS1 (INTEGER)

Table: ZABCDRELATEDNAME

  • Z_PK (INTEGER)
  • Z_ENT (INTEGER)
  • Z_OPT (INTEGER)
  • ZIOSLEGACYIDENTIFIER (INTEGER)
  • ZISPRIMARY (INTEGER)
  • ZISPRIVATE (INTEGER)
  • ZORDERINGINDEX (INTEGER)
  • ZOWNER (INTEGER)
  • Z22_OWNER (INTEGER)
  • ZLABEL (VARCHAR)
  • ZNAME (VARCHAR)
  • ZUNIQUEID (VARCHAR)

Table: ZABCDREMOTELOCATION

  • Z_PK (INTEGER)
  • Z_ENT (INTEGER)
  • Z_OPT (INTEGER)
  • ZISPRIMARY (INTEGER)
  • ZISPRIVATE (INTEGER)
  • ZORDERINGINDEX (INTEGER)
  • ZOWNER (INTEGER)
  • Z17_OWNER (INTEGER)
  • ZLABEL (VARCHAR)
  • ZUNIQUEID (VARCHAR)
  • ZURL (VARCHAR)

Table: ZABCDSERVICE

  • Z_PK (INTEGER)
  • Z_ENT (INTEGER)
  • Z_OPT (INTEGER)
  • ZSERVICENAME (VARCHAR)

Table: ZABCDSOCIALPROFILE

  • Z_PK (INTEGER)
  • Z_ENT (INTEGER)
  • Z_OPT (INTEGER)
  • ZIOSLEGACYIDENTIFIER (INTEGER)
  • ZISPRIMARY (INTEGER)
  • ZISPRIVATE (INTEGER)
  • ZORDERINGINDEX (INTEGER)
  • ZOWNER (INTEGER)
  • Z22_OWNER (INTEGER)
  • ZBUNDLEIDENTIFIERSSTRING (VARCHAR)
  • ZDISPLAYNAME (VARCHAR)
  • ZLABEL (VARCHAR)
  • ZSERVICENAME (VARCHAR)
  • ZTEAMIDENTIFIER (VARCHAR)
  • ZUNIQUEID (VARCHAR)
  • ZURLSTRING (VARCHAR)
  • ZUSERIDENTIFIER (VARCHAR)
  • ZUSERNAME (VARCHAR)
  • ZCUSTOMVALUESDATA (BLOB)

Table: ZABCDUNKNOWNPROPERTY

  • Z_PK (INTEGER)
  • Z_ENT (INTEGER)
  • Z_OPT (INTEGER)
  • ZOWNER (INTEGER)
  • Z17_OWNER (INTEGER)
  • ZPROPERTYNAME (VARCHAR)
  • ZORIGINALLINE (BLOB)

Table: ZABCDURLADDRESS

  • Z_PK (INTEGER)
  • Z_ENT (INTEGER)
  • Z_OPT (INTEGER)
  • ZIOSLEGACYIDENTIFIER (INTEGER)
  • ZISPRIMARY (INTEGER)
  • ZISPRIVATE (INTEGER)
  • ZORDERINGINDEX (INTEGER)
  • ZOWNER (INTEGER)
  • Z22_OWNER (INTEGER)
  • ZLABEL (VARCHAR)
  • ZUNIQUEID (VARCHAR)
  • ZURL (VARCHAR)

Table: ZCNCDCHANGEHISTORYCLIENT

  • Z_PK (INTEGER)
  • Z_ENT (INTEGER)
  • Z_OPT (INTEGER)
  • ZNEEDSFULLSYNCNUMBER (INTEGER)
  • ZIDENTIFIER (VARCHAR)
  • ZLASTTOKENDATA (BLOB)

Table: ZCNCDUNIFIEDCONTACTINFO

  • Z_PK (INTEGER)
  • Z_ENT (INTEGER)
  • Z_OPT (INTEGER)
  • ZCHANGETYPENUMBER (INTEGER)
  • ZINHIBITSINDIVIDUALCONTACTNUMBER (INTEGER)
  • ZLINKEDRECORDIDENTIFIERSSTRING (VARCHAR)
  • ZUNIFIEDRECORDIDENTIFIER (VARCHAR)

Table: Z_METADATA

  • Z_VERSION (INTEGER)
  • Z_UUID (VARCHAR(255))
  • Z_PLIST (BLOB)

Table: Z_MODELCACHE

  • Z_CONTENT (BLOB)

Table: ACHANGE

  • Z_PK (INTEGER)
  • Z_ENT (INTEGER)
  • Z_OPT (INTEGER)
  • ZCHANGETYPE (INTEGER)
  • ZENTITY (INTEGER)
  • ZENTITYPK (INTEGER)
  • ZTRANSACTIONID (INTEGER)
  • ZCOLUMNS (BLOB)
  • ZTOMBSTONE0 (BLOB)
  • ZTOMBSTONE1 (BLOB)
  • ZTOMBSTONE2 (BLOB)
  • ZTOMBSTONE3 (BLOB)

Table: ATRANSACTION

  • Z_PK (INTEGER)
  • Z_ENT (INTEGER)
  • Z_OPT (INTEGER)
  • ZAUTHORTS (INTEGER)
  • ZBUNDLEIDTS (INTEGER)
  • ZCONTEXTNAMETS (INTEGER)
  • ZPROCESSIDTS (INTEGER)
  • ZTIMESTAMP (FLOAT)
  • ZAUTHOR (VARCHAR)
  • ZBUNDLEID (VARCHAR)
  • ZCONTEXTNAME (VARCHAR)
  • ZPROCESSID (VARCHAR)
  • ZQUERYGEN (BLOB)

Table: ATRANSACTIONSTRING

  • Z_PK (INTEGER)
  • Z_ENT (INTEGER)
  • Z_OPT (INTEGER)
  • ZNAME (VARCHAR)

Table: ZABCDADDRESSINGGRAMMAR

  • Z_PK (INTEGER)
  • Z_ENT (INTEGER)
  • Z_OPT (INTEGER)
  • ZIOSLEGACYIDENTIFIER (INTEGER)
  • ZISPRIMARY (INTEGER)
  • ZISPRIVATE (INTEGER)
  • ZORDERINGINDEX (INTEGER)
  • ZOWNER (INTEGER)
  • Z22_OWNER (INTEGER)
  • ZADDRESSINGGRAMMAR (VARCHAR)
  • ZLABEL (VARCHAR)
  • ZUNIQUEID (VARCHAR)

Table: ZABCDRECORD

  • Z_PK (INTEGER)
  • Z_ENT (INTEGER)
  • Z_OPT (INTEGER)
  • ZCREATIONDATEYEAR (INTEGER)
  • ZDISPLAYFLAGS (INTEGER)
  • ZIOSLEGACYIDENTIFIER (INTEGER)
  • ZMODIFICATIONDATEYEAR (INTEGER)
  • ZSYNCSTATUS (INTEGER)
  • ZCONTAINER (INTEGER)
  • ZEXTERNALGROUPBEHAVIOR (INTEGER)
  • ZBIRTHDAYYEAR (INTEGER)
  • ZPREFERREDFORLINKNAME (INTEGER)
  • ZPREFERREDFORLINKPHOTO (INTEGER)
  • ZPRIVACYFLAGS (INTEGER)
  • ZCONTACTINDEX (INTEGER)
  • ZCONTAINER1 (INTEGER)
  • ZCONTAINERWHERECONTACTISME (INTEGER)
  • ZLUNARBIRTHDAYCOMPONENTS (INTEGER)
  • ZNOTE (INTEGER)
  • ZASSISTANTSYNCANCHOR (INTEGER)
  • ZSHARECOUNT (INTEGER)
  • ZSYNCCOUNT (INTEGER)
  • ZVERSION (INTEGER)
  • ZCONTAINER2 (INTEGER)
  • ZGUARDIANFLAGS (INTEGER)
  • ZISALL (INTEGER)
  • ZTYPE (INTEGER)
  • ZINFO (INTEGER)
  • ZME (INTEGER)
  • Z22_ME (INTEGER)
  • ZPROVIDERMETADATA (INTEGER)
  • ZCREATIONDATE (TIMESTAMP)
  • ZCREATIONDATEYEARLESS (FLOAT)
  • ZMODIFICATIONDATE (TIMESTAMP)
  • ZMODIFICATIONDATEYEARLESS (FLOAT)
  • ZBIRTHDAY (TIMESTAMP)
  • ZBIRTHDAYYEARLESS (FLOAT)
  • ZLASTSYNCDATE (TIMESTAMP)
  • ZEXTERNALCOLLECTIONPATH (VARCHAR)
  • ZEXTERNALFILENAME (VARCHAR)
  • ZEXTERNALHASH (VARCHAR)
  • ZEXTERNALIMAGEURI (VARCHAR)
  • ZEXTERNALMODIFICATIONTAG (VARCHAR)
  • ZEXTERNALURI (VARCHAR)
  • ZEXTERNALUUID (VARCHAR)
  • ZUNIQUEID (VARCHAR)
  • ZNAME (VARCHAR)
  • ZNAMENORMALIZED (VARCHAR)
  • ZTMPREMOTELOCATION (VARCHAR)
  • ZCROPRECT (VARCHAR)
  • ZCROPRECTID (VARCHAR)
  • ZDEPARTMENT (VARCHAR)
  • ZDOWNTIMEWHITELIST (VARCHAR)
  • ZFIRSTNAME (VARCHAR)
  • ZIDENTITYUNIQUEID (VARCHAR)
  • ZIMAGEREFERENCE (VARCHAR)
  • ZIMAGETYPE (VARCHAR)
  • ZJOBTITLE (VARCHAR)
  • ZLASTNAME (VARCHAR)
  • ZLINKID (VARCHAR)
  • ZMAIDENNAME (VARCHAR)
  • ZMIDDLENAME (VARCHAR)
  • ZNICKNAME (VARCHAR)
  • ZORGANIZATION (VARCHAR)
  • ZPHONEMEDATA (VARCHAR)
  • ZPHONETICFIRSTNAME (VARCHAR)
  • ZPHONETICLASTNAME (VARCHAR)
  • ZPHONETICMIDDLENAME (VARCHAR)
  • ZPHONETICORGANIZATION (VARCHAR)
  • ZPREFERREDAPPLEPERSONAIDENTIFIER (VARCHAR)
  • ZPREFERREDLIKENESSSOURCE (VARCHAR)
  • ZSORTINGFIRSTNAME (VARCHAR)
  • ZSORTINGLASTNAME (VARCHAR)
  • ZSUFFIX (VARCHAR)
  • ZTITLE (VARCHAR)
  • ZTMPHOMEPAGE (VARCHAR)
  • ZWALLPAPERURI (VARCHAR)
  • ZASSISTANTVALIDITY (VARCHAR)
  • ZCREATEDVERSION (VARCHAR)
  • ZLASTDOTMACACCOUNT (VARCHAR)
  • ZLASTSAVEDVERSION (VARCHAR)
  • ZSYNCANCHOR (VARCHAR)
  • ZEXTERNALIDENTIFIER (VARCHAR)
  • ZNAME1 (VARCHAR)
  • ZPROVIDERIDENTIFIER (VARCHAR)
  • ZREMOTELOCATION (VARCHAR)
  • ZSERIALNUMBER (VARCHAR)
  • ZEXTERNALREPRESENTATION (BLOB)
  • ZMODIFIEDUNIQUEIDSDATA (BLOB)
  • ZSEARCHELEMENTDATA (BLOB)
  • ZCROPRECTHASH (BLOB)
  • ZIMAGEDATA (BLOB)
  • ZIMAGEHASH (BLOB)
  • ZMEMOJIMETADATA (BLOB)
  • ZSENSITIVECONTENTCONFIGURATION (BLOB)
  • ZTHUMBNAILIMAGEDATA (BLOB)
  • ZWALLPAPER (BLOB)

Table: ZCNCDPROVIDERMETADATA

  • Z_PK (INTEGER)
  • Z_ENT (INTEGER)
  • Z_OPT (INTEGER)
  • ZVERSION (INTEGER)
  • ZCONTAINER (INTEGER)
  • ZPAGEDATA (BLOB)
  • ZSYNCANCHORDATA (BLOB)

Table: Z_PRIMARYKEY

  • Z_ENT (INTEGER)
  • Z_NAME (VARCHAR)
  • Z_SUPER (INTEGER)
  • Z_MAX (INTEGER)