This ERD is contributed and maintained by Ben Vautier from http://www.sqlrecipes.com
Pictures have been updated for version 1.7
It is worth noting that some tables have a 'entity_table' and a 'entity_id' field, such as the 'civicrm_location' table. This allows multiple tables to have a relationship with 'civirm_location'. The 'entity_table' will store the name of the table name, such as 'civirm_contact' and the 'entity_id' field stores the 'id' of the entity contained in the referenced 'entity table'.
An example should clarify this . Let's say we want to add a new location for contact_id 7. In the 'civicrm_location' table we would have 'entity_table' = 'civicrm_contact' and 'entity_id' = '7'.
This means that we can add a location to any entity contained in any table.
The picture below focuses on the "group" tables.
The "civicrm_contact" table is missing because it would be too messy to include it. However you can see it's relationship in the picture above.
The "civicrm_group_contact" is a child of "civicrm_contact".
This is a picture of the relationship between the civicrm_uf_* tables. The "uf" letters stand for "User Framework". The tables are used to manage 'users' from Drupal or Joomla with contacts in CiviCRM. The civicrm_uf_match is especially important as it stores the information that matches the contact_id with the user id (or uf_id) in Drupal or Joomla.
Contribution Tables
Custom Tables
Mailing List Tables
ACL Tables
Membership Tables
As many tables as possible
By now you should be able to work yourself around... hope it is not too confusing
This ERD is contributed and maintained by Ben Vautier from http://www.sqlrecipes.com