Home » Developer & Programmer » Designer » Composite key Problem
Composite key Problem [message #241159] Mon, 28 May 2007 09:23 Go to next message
mcavishal
Messages: 3
Registered: May 2007
Junior Member
I have four columns in a table.the set of the values in the columns will be unique.I thought of keeping the four columns as composite keys.

Now I also want to update any of the columns if it is required.
Everyone is saying that it is against the ethics to update composite or primary keys.

Can anyone help me in designing the table so that i can easily update any of the columns as well as the four columns should be unique.

Thanks in advance...
Re: Composite key Problem [message #329835 is a reply to message #241159] Thu, 26 June 2008 12:39 Go to previous message
hhelgen
Messages: 12
Registered: April 2007
Location: Duluth MN
Junior Member
Create a new column as a primary key. It would contain a numeric value from an Oracle sequence. Then create a unique index over your four columns that are unique. This gives you the ability to maintain uniqueness of the four composite columns, yet also have the ability to update them without updating the primary key.
Previous Topic: Generalization relationship
Next Topic: Non-relational database model
Goto Forum:
  


Current Time: Fri Mar 29 01:40:57 CDT 2024