Error messages with [Database] leaders don't actually refer to anything that is being done to the actual gameplay database, they refer to stuff such as adding icons to the game. Errors coming from attempts to add stuff to the ingame localization text will have headers of [Localization].
A foreign key constraint error means that someone (Firaxis or a modder) attempted to refer to something that was never defined anywhere within the same system. So for a [Database] foreign key constraint the usual culprit is that a modder added for example an atlas of images they called "ALTAS_CHEESEBURGERS" but then when assigning the images in the atlas to units and the like, they refered to it as "ATLAS_CHEESEBURGERS". Or they just never defined the atlas for example and merely attempted to use it. Or (and this is also a pretty common cause) their code has syntax errors which are not allowing everything from the mod's xml or sql files to load, and the missing pieces are the things the foreign key constraint errors are referring to.
This sort of error could be the source of the crash since at some point the game's User Interface files are going to try to find the needed image texture and they'd likely come up "empty" on that image. Usually though the game just randomly displays an icon image rather than crashing, or else shows an empty image or a question-mark.