openstack team mailing list archive
-
openstack team
-
Mailing list archive
-
Message #10291
Re: Using Foreign Keys
Hi,
On Apr 12, 2012, at 21:35, J. Daniel Schmidt wrote:
> One reviewer commented:
>> i don't approve of adding foreign keys, and we should probably remove the
>> existing ones (in UserTenantMembership and in Endpoint)
>
> and on
>> we shouldn't be using foreign keys at all, they are a crutch that are not
>> available everywhere
>
what the … !?
I'm not actively participating in OpenStack development yet, so my opinion may carry no weight - but this is ridiculous. IMHO OpenStack is not some "who needs data integrity anyway"-web2.0 project, it's meant to provide a stable, robust platform where people run mission-critical production stuff. Calling our test cluster in the office "BrokenStack" is fun for a while and the "0 days since last exception" sign wasn't bad either, but the fun stops when you actually need to depend on this software running. We should implement as many checks for integrity and validity of data as possible and if a foreign key actually catches something, that means that your last line of defense just stopped the worst and you should have failed much earlier. And someone is actually thinking about *removing* that?
I'm all for a switch to the "add as much foreign keys as we can" policy. Actually, why are they not created automatically? If one uses an ORM correctly, there should be no way to actually *not* create them.
--
Philipp Wollermann
Infrastructure Engineer
CyberAgent, Inc. (Tokyo)
https://github.com/philwo
Follow ups
References