Thanks for your insight.

Yes, I am aware of this school of thought. It probably originates from
people being closer to actual relational theory than to SQL. This school of
thought is also why we have JOIN .. USING and NATURAL JOIN in SQL, which is
probably why I wrongfully assumed that mutability of key values has
anything to do with normalisation. Off topic: I've recently learned that
UNION ALL is considered bad practice compared to UNION by C.J. Date, whose
opinion certainly doesn't lack authority. Although, from a practical
standpoint, I can only disagree :-)

I am often surprised by the use of natural candidate keys, as it is more
difficult to correctly manage SQL databases whose tables make use of such
keys. An interesting opinion:
http://stackoverflow.com/a/3838649/521799

but there ARE distinct advantages of not generating a surrogate key when
> you have a good natural candidate key already, even if they can change.


I'm curious about this. What would be those advantages apart from using a
little less storage, of course?

Anyway, you're right, of course. jOOQ does not and shall not prevent
updating of primary keys in general, i.e. in its SQL DSL. But in order to
work, CRUD / ActiveRecords must make some more assumptions about your
database schema than arbitrary DML.


2013/10/8 Eric Schwarzenbach <[email protected]>

> Actually let me strike the part about needing this feature, as I'm not
> using UpdatableRecord. (I assume there's nothing about DSLContext.update()
> that will prevent this...silly of me not have picked up on this before
> getting worried!)
>
> So my objection is only philosophical. :^)
>
>
> ********
>
> --
> You received this message because you are subscribed to the Google Groups
> "jOOQ User Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups "jOOQ 
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to