There are ways and means to enforce such a thing on a static structure using triggers, check constraints or indexed views but it's more problematic on a changing structure.
Consider what happens when you add a new entry, for example. The Fum row has a FK constraint to the Foo row, so the Foo row needs to be inserted first. However, if you could enforce your data constraint, inserting that row would violate your data model since it wouldn't have a corresponding Fum row.
The "best" solutions for this kind of situation are somewhat subjective. Sometimes it's best just to enforce it via application rules. If the data is only updated periodically, it may be possible to temporarily disable constraints during update. Other times a report that highlights "invalid" records can suffice.