concatenated primary key versus surrogate key
692864May 18 2009 — edited May 18 2009hi i have this scenario...
i have 5 columns in a table(child table) and the primary key is a concatenated key on 3 columns.
now my front end is java and they are using hibernate.
when they trying to insert in this table they say that hibernate first inserts null in the table and then inserts the value in to the columns.
now since primary key cannot accomodate null values . they are asking me to create a separate primary key ( surrogate key ) and remove these 3 columns as a primary key .
which one is better ....? separate primary key or concatenated key of 3 columns
i understand that concatenated key is bad for performance. But concatenated primary key on 3 columns should be fine right...?
plz suggest wat should i do?
regards
raj