Relationships

 

The main concept in a Relational Database is that each table contains one kind of record and those records are related to each other using special columns to tie them together. These special columns are known as Primary and Foreign Keys. Below is a partial representation of the table relationships centered around Contacts. (If you want your Database Relationships Table to look like this one, please notify Support.)

Finding Relationships in MinistryPlatform

There is much evidence of these Primary/Foreign Key relationships in the platform. Here are three:

Advanced Search

The expandable folders in Advanced Search represent Foreign Keys. When you select these, the platform adds a JOIN to your query to get fields from related tables. The Advanced Search uses the Table Lookup Convention to represent table joins.

Link Navigation

The small link icons represent Foreign Keys and related tables. Clicking on these follows the relationships to pages which represent the related tables. Clicking the link next to Contact Status: Active navigates to the Contact Statuses page, landing on the record "Active."

Drop-downs and Pick-Lists

When editing a record, drop-downs and pick-lists represent Foreign Keys. When you select an item, you are storing the Primary Key value of a related table in the Foreign Key Column of the page table.