Planning Center Calendar Data Model
This document provides complete documentation of the Planning Center Calendar data model in Parable, including all tables, fields, and relationships.Overview
The Calendar module contains 22 entity tables and 7 relationship tables supporting event management, resource booking, scheduling, and calendar synchronization.Visual Data Model
Core Entity Relationships
Key Relationships Explained
Event Hierarchy:EVENTis the master event (e.g., “Sunday Service”)EVENT_INSTANCEis a specific occurrence (e.g., “Sunday Service on Jan 15, 2024”)EVENT_TIMEbreaks instances into periods (Setup 8am-9am, Event 9am-11am, Teardown 11am-12pm)
RESOURCEs are bookable items (rooms, equipment, vehicles)RESOURCE_FOLDERs organize resources hierarchicallyRESOURCE_BOOKINGlinks resources to event instancesROOM_SETUPdefines different configurations for room resources
EVENT_RESOURCE_REQUESTinitiates booking requestREQUIRED_APPROVALspecifies which groups must approveRESOURCE_APPROVAL_GROUPcontains approversRESOURCE_QUESTIONcollects additional information during booking
CONFLICTtracks resource double-bookings- Links winner (approved booking) and loser (rejected booking)
- Resolved when winner is selected
EVENT_CONNECTIONlinks calendar events to other Planning Center modules- Connected to Services (worship plans), Groups (group events), etc.
- Enables unified scheduling across the platform
- Event metadata via
calendar_events_relationships
Query Requirements
Schema Prefix
IMPORTANT: All tables in the Planning Center Calendar module are in theplanning_center schema. You MUST prefix all table names with planning_center. in your queries.
✅ CORRECT: SELECT * FROM planning_center.calendar_events
❌ INCORRECT: SELECT * FROM calendar_events
Row Level Security (RLS)
This database uses Row Level Security (RLS) to automatically filter data based on:- tenant_organization_id: You only see data for your current organization
- system_status: You only see ‘active’ records by default
- ❌
WHERE tenant_organization_id = 1(unnecessary) - ❌
WHERE system_status = 'active'(unnecessary)
Core Tables Overview
Primary Entity Tables
calendar_events- Master event definitionscalendar_event_instances- Specific occurrences of eventscalendar_resources- Bookable resources (rooms, equipment)calendar_resource_bookings- Resource reservationscalendar_conflicts- Scheduling conflictscalendar_tags- Event categorizationcalendar_tag_groups- Tag groupings
Supporting Entity Tables
calendar_attachments- File attachments for eventscalendar_event_connections- Links to other PCO modulescalendar_event_resource_requests- Resource booking requestscalendar_event_resource_answers- Answers to booking questionscalendar_event_times- Time blocks within eventscalendar_feeds- Calendar feed configurationscalendar_organizations- Organization settingscalendar_people- People associated with eventscalendar_report_templates- Report templatescalendar_required_approvals- Approval requirementscalendar_resource_approval_groups- Approval groupscalendar_resource_folders- Resource organizationcalendar_resource_questions- Booking questionscalendar_resource_suggestions- Suggested resourcescalendar_room_setups- Room configurations
Relationship Tables
calendar_event_resource_answer_relationships- Links answers to related entitiescalendar_eventinstances_relationships- Links instances to related entitiescalendar_eventresourcerequests_relationships- Links requests to related entitiescalendar_events_relationships- Links events to related entitiescalendar_resourcebookings_relationships- Links bookings to related entitiescalendar_resources_relationships- Links resources to related entitiescalendar_tag_groups_relationships- Links tag groups to related entities
Table Definitions
calendar_events
Master event definitions containing the core event information.calendar_event_instances
Specific occurrences of events, handling both one-time and recurring events.calendar_resources
Bookable resources including rooms, equipment, and other facilities.calendar_resource_bookings
Reservations linking resources to specific events and times.calendar_conflicts
Detected scheduling conflicts between events or resources.calendar_tags
Event categorization labels for organizing and filtering.calendar_tag_groups
Groupings for tags to organize them by ministry, event type, etc.calendar_attachments
File attachments associated with events.calendar_event_connections
Links between calendar events and other Planning Center modules.calendar_event_times
Specific time blocks within event instances (e.g., “Doors Open”, “Main Service”).calendar_room_setups
Predefined room configurations with layout diagrams.calendar_event_resource_requests
Resource requests for events, tracking booking requirements.calendar_event_resource_answers
Answers to resource booking questions.
Note: Relationships (created_by, updated_by, resource_question, event_resource_request) are stored in the
calendar_event_resource_answer_relationships table following the golden rule pattern.
calendar_feeds
Calendar feed configurations for importing and syncing events.calendar_organizations
Organization-wide calendar settings.calendar_people
People with calendar permissions and access.calendar_report_templates
Report templates for calendar data.calendar_required_approvals
Approval requirements for resource bookings.calendar_resource_approval_groups
Groups responsible for approving resource bookings.calendar_resource_folders
Hierarchical organization of resources.calendar_resource_questions
Booking questions for specific resources.calendar_resource_suggestions
Suggested resources for room setups.Relationship Tables
calendar_event_resource_answer_relationships
Links event resource answers to related entities (created_by, updated_by, resource_question, event_resource_request).
Common relationship types:
Person(created_by) - Links to calendar_people (who created the answer)Person(updated_by) - Links to calendar_people (who last updated the answer)ResourceQuestion- Links to calendar_resource_questionsEventResourceRequest- Links to calendar_event_resource_requests
calendar_eventresourcerequests_relationships
Links resource requests to answers and bookings.
Common relationship types:
ResourceBooking- Links to calendar_resource_bookingsEventResourceAnswer- Links to calendar_event_resource_answers
calendar_events_relationships
Links events to tags, attachments, and other related entities.
Common relationship types:
Tag- Links to calendar_tagsAttachment- Links to calendar_attachmentsOwner- Links to calendar_people
calendar_eventinstances_relationships
Links event instances to event times, resource bookings, and tags.
Common relationship types:
EventTime- Links to calendar_event_timesResourceBooking- Links to calendar_resource_bookingsTag- Links to calendar_tags
calendar_resources_relationships
Links resources to approval groups, questions, and room setups.
Common relationship types:
ResourceApprovalGroup- Links to calendar_resource_approval_groupsResourceQuestion- Links to calendar_resource_questionsRoomSetup- Links to calendar_room_setups
System Fields
All tables include these system fields for data management:tenant_organization_id- Multi-tenant organization identifiersystem_status- Data lifecycle status:transferring- Being imported from Planning Centeractive- Current active datastale- Marked for removal
system_created_at- When record was created in Parablesystem_updated_at- When record was last updated in Parable
Common Query Patterns
Getting Events with Tags
Finding Available Resources
Detecting Booking Conflicts
Today’s Schedule
Data Integrity Rules
- Schema Qualification: Always use
planning_center.prefix for all table references - Row Level Security: RLS automatically handles multi-tenancy and status filtering - do not add manual filters
- Monetary Values: Resource fee and cost columns are stored in cents - divide by 100.0 for display
- Time Windows: Use
starts_at/ends_atcomparisons and theall_day_eventflag rather than relying onsystem_status - Direct ID Columns:
calendar_resource_bookingsand related tables expose direct IDs for performance-sensitive joins
Common Mistakes to Avoid
-
Missing Schema Prefix
- ❌
FROM calendar_events - ✅
FROM planning_center.calendar_events
- ❌
-
Adding Redundant RLS Filters
- ❌
WHERE tenant_organization_id = 1 AND system_status = 'active' - ✅ Trust RLS to handle this automatically
- ❌
-
Joining Without Schema
- ❌
JOIN calendar_resource_bookings rb ON ... - ✅
JOIN planning_center.calendar_resource_bookings rb ON ...
- ❌
-
Misreporting Fees
- ❌
SELECT resource_fee_cents as resource_fee - ✅
SELECT resource_fee_cents / 100.0 as resource_fee
- ❌
Performance Considerations
-
Indexes: All tables have optimized indexes on:
- Primary keys and entity IDs
- Join columns and foreign keys
- Date columns for time-based queries
-
Query Optimization:
- Always use the
planning_center.schema prefix - RLS handles tenant and status filtering automatically
- Filter by approval or conflict flags when relevant
- Consider CTEs for complex hierarchical queries
- Use direct ID columns when available instead of relationship tables
- Always use the
Data Types and Conventions
Approval Statuses
A- ApprovedP- Pending approvalR- RejectedNULL- No approval required
Resource Types (kind)
Room- Physical spacesEquipment- Movable itemsResource- Other bookable items
All-Day Events
all_day_event = trueindicates full-day events- Check date portions of
starts_atandends_at - May span multiple days
Recurrence Patterns
- Stored in iCal RRULE format in
recurrencefield - Human-readable in
recurrence_description - Each occurrence is a separate event_instance
Next Steps
- Start with Basic Queries for simple examples
- Progress to Advanced Queries for complex analysis
- Use Reporting Examples for production reports
- Return to Overview for overview