Data modeling - sgml/signature GitHub Wiki

Mapping CRM to RDBMS

Platform Parent Object Child Object Grandchild Object Stored Value Relationship Implementation Custom Object Limitations
Salesforce Foo__c Bar__c Baz__c "bop" Lookup fields: Bar__c → Foo__c, Baz__c → Bar__c Limited to 2,000 custom objects per org; lookups can become complex; querying nested hierarchies requires SOQL joins and may hit governor limits
HubSpot Foo (Custom Object) Bar (Custom Object) Baz (Custom Object) "bop" Association API: Bar associated to Foo, Baz associated to Bar Only 10 custom objects per account; associations are flexible but not deeply relational; reporting across multiple levels is limited
CiviCRM Table: foo Table: bar Table: baz "bop" Foreign keys: bar.foo_id → foo.id, baz.bar_id → bar.id No hard cap on tables, but schema changes require database admin; custom groups/fields can become unwieldy; querying serialized data is inefficient
Postgres Table: foo Table: bar Table: baz "bop" Foreign keys: bar.foo_id → foo.id, baz.bar_id → bar.id OR native JSONB column with nested structure No practical limit on tables; JSONB allows direct nested storage and indexing; complexity arises in designing hybrid relational + JSONB queries

Models

Type Systems

Doubly Linked List

Linked List

Hashtable

Map / Hashmap

B Tree

Lazy List