On Aug 1, 2014, at 6:57 AM, Wolfgang Keller <felip...@gmx.net> wrote:

>> Celko's books are great but surrogate integer PKs are an unavoidable
>> practice within relational databases, they are a requirement of most
>> DBAs I've dealt with 
> 
> Those guys don't even have a faint clue how clueless they are.
> 
> In fact this very issue is *THE* "litmus test" question I ask people who
> claim to be software developers or database admins.
> 
>> as they perform predictably in terms of indexing and space
>> requirements, 
> 
> Surrogate keys will inevitably produce inconsistent data garbage.
> 
> And data garbage can kill people, among others.

I've never had that problem.

> 
> Won't work.
> 
> Check the index of any decent database design handbook for "overlapping
> foreign keys".


Postgresql at least allows you to create foreign keys that target columns that 
are only within a unique constraint and not the primary key.   SQLAlchemy as of 
0.8 can fully handle those wacky overlapping foreign key models, but in 
practice even the users that actually need those still seem to be  dealing with 
schemas that ultimately use at least partially surrogate PKs, the overlapping 
FK would be on a PK that consists of something like "id, version_id", still not 
quite a fully natural primary key.


-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to