Why is the rejection of composite keys in favor of all tables using a single primary key named id. Cause generally all ORM follow this..???
EDIT
I just started learning ruby on rails and in the book of agile develepment by pragmatic there is a line:--- Rails really doesn’t work too well unless each table has a numeric primary key. It is less fussy about the name of the column. Same kind of line i read when i was learning Doctrine.
EDIT2 please chk link too.. I m getting more and more confused about this thing:--- http://stackoverflow.com/questions/159087/composite-primary-keys-versus-unique-object-id-field
From the above link:--
*the primary key should be constant and meaningless; non-surrogate keys usually fail one or both requirements, eventually
if the key is not constant, you have a future update issue that can get quite complicated if the key is not meaningless, then it is more likely to change, i.e. not be constant; see above
take a simple, common example: a table of Inventory items. It may be tempting to make the item number (sku number, barcode, part code, or whatever) the primary key, but then a year later all the item numbers change and you're left with a very messy update-the-whole-database problem...
EDIT: there's an additional issue that is more practical than philosophical. In many cases you're going to find a particular row somehow, then later update it or find it again (or both). With composite keys there is more data to keep track of and more contraints in the WHERE clause for the re-find or update (or delete). It is also possible that one of the key segments may have changed in the meantime!. With a surrogate key, there is always only one value to retain (the surrogate ID) and by definition it cannot change, which simplifies the situation significantly.*