[openstack-dev] [nova] FKs in the DB

Alexis Lee lxsli at hpe.com
Fri Nov 20 16:19:22 UTC 2015


We just had a fun discussion in IRC about whether foreign keys are evil.
Initially I thought this was crazy but mordred made some good points. To
paraphrase, that if you have a scale-out app already it's easier to
manage integrity in your app than scale-out your persistence layer.

Currently the Nova DB has quite a lot of FKs but not on every relation.
One example of a missing FK is between Instance.uuid and
BandwidthUsageCache.uuid.

Should we drive one way or the other, or just put up with mixed-mode?

What should be the policy for new relations?

Do the answers to these questions depend on having a sane and
comprehensive archive/purge system in place?


Alexis (lxsli)
-- 
Nova developer, Hewlett-Packard Limited.
Registered Office: Cain Road, Bracknell, Berkshire RG12 1HN.
Registered Number: 00690597 England
VAT number: GB 314 1496 79



More information about the OpenStack-dev mailing list