ContactsContract defines an extensible database of contact-related information.
Contact information is stored in a three-tier data model:
* A row in the ContactsContract.Data table can store any kind of personal data, such as a phone number or email addresses. The set of data kinds that can be stored in this table is open-ended. There is a predefined set of common kinds, but any application can add its own data kinds.
* A row in the ContactsContract.RawContacts table represents a set of data describing a person and associated with a single account (for example, one of the user's Gmail accounts).
* A row in the ContactsContract.Contacts table represents an aggregate of one or more RawContacts presumably describing the same person. When data in or associated with the RawContacts table is changed, the affected aggregate contacts are updated as necessary.
Other tables include:
* ContactsContract.Groups, which contains information about raw contact groups such as Gmail contact groups. The current API does not support the notion of groups spanning multiple accounts.
* ContactsContract.StatusUpdates, which contains social status updates including IM availability.
* ContactsContract.AggregationExceptions, which is used for manual aggregation and disaggregation of raw contacts
* ContactsContract.Settings, which contains visibility and sync settings for accounts and groups.
* ContactsContract.SyncState, which contains free-form data maintained on behalf of sync adapters
* ContactsContract.PhoneLookup, which is used for quick caller-ID lookup