Help understanding Campaign Schema/Data Structure?

I’m looking to build a Mautic integration with ERPNext (an open source ERP/CRM).

I’m trying to get help understanding the general structure of how Mautic Campaigns are stored in the database.

Can somebody give me a general breakdown of how this data is stored?

Look at these tables, and you’ll get it right away:
image

Thanks for the input.

Just to make sure I’m understanding this right:
campaigns defines basic info about the campaign
campaign_events is the list of events in a particular campaign
campaign_leads is the junction table - campaign to leads
campaign_leadlist_xref is the junction table - campaigns to leadlist
lead_list is a list of leads (Contacts)
lead_list_leads is the junction table - lead_lists_leads
campaign_lead_event_log is basically the “assignment” of an event to a lead

Assuming my general understanding of this is correct, how is the campaign_lead_event_log kept from growing too large? I’d imagine if you had tens of thousands of leads and several campaigns with lots of actions, then that table would grow very quickly. Are old events purged at any point?

Also, since Campaigns have decisions, actions, and conditions, are all 3 of them stored in campaign_events?

Assuming my general understanding of this is correct, how is the campaign_lead_event_log kept from growing too large? I’d imagine if you had tens of thousands of leads and several campaigns with lots of actions, then that table would grow very quickly. Are old events purged at any point?

Depends on the size of your operation and your definition of ‘large’ and ‘quickly’.

If you run a lot of campaigns for a lot of contacts, then you need a larger db and a faster server. Mautic takes 10x more DB space then Mailwizz for example, and 30x more then Sendy. But it’s 100x more capable, so it’s a good tradeoff.

You can also clean stuff:

Again it depends what you do with Mautic, but it’s not rare to have 3-5GB DB for a smaller install with 1000 contacts and 80-120GB for 250k contacts.

I do very brital cleaning sometimes. Here is a tutorial, where I show you some sql commands and results: