[Rt-devel] About data integrity rules
Jesse Vincent
jesse at bestpractical.com
Mon Feb 11 10:04:42 EST 2008
On Feb 11, 2008, at 7:29 AM, Rafael Martinez wrote:
> Jesse Vincent wrote:
>>> The schema is really due for a good hard overhaul to allow the DB
>>> engine to enforce data integrity as a second layer of protection
>>> which
>>> the application tries to enforce.
>>
>> How would you model something like the "ObjectType/ObjectId"
>> foriegn key
>> on the Transactions or ACL table?
>
> Hei
>
> With postgresql I would use inheritance [1]. It would be possible to
> use
> a view to get the combined result you get now with Transactions or
> ACLthat's bee
> tables.
>
> A minus for this method is that you have to have a table per
> ObjectType
> that inherits from the main table.
So, we'd need a table per object type per thing we want this arbitrary
keying into. CustomFields, ACLs, Transactions, Links (and links do it
twice).
And it only works on Postgres. This is just about the only option
that we ever came up with when we explored the possibilities. And it
really just doesn't feel like a good tradeoff to me.
-j
More information about the Rt-devel
mailing list