Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Reducing the Primary keys

Former Member
0 Likes
707

Hello,

I created the custom database table - ZPACK, and I created this table with five primary keys. Now, the requirement is to reduce the primary keys from five to three.

And I have the data of 5000 entries in this table. If I uncheck the two primary keys and set them as non primary keys, what will be the impact with the data.

Regards,

dinesh ...........

Hello,

I created the custom database table - ZPACK, and I created this table with five primary keys. Now, the requirement is to reduce the primary keys from five to three.

And I have the data of 5000 entries in this table. If I uncheck the two primary keys and set them as non primary keys, what will be the impact with the data.

Regards,

dinesh ...........

4 REPLIES 4
Read only

Former Member
0 Likes
666

Hi

The problem is you risk to lose several records, because now many hits could have the same key.

Only if the field key to be deleted are not used (i.e. they are empty) u shouldn't have any impact.

Max

Read only

Former Member
0 Likes
666

Hi Dinesh,

it can cause a loss of data, because no duplicate entries with the same key can occur in a table. And for the entries which differs just in key fields which you are going to mark as non-key, it is not possible to keep all such lines.

Regards,

Adrian

Read only

Former Member
0 Likes
666

If you change a field property from Primary key to non-primary key field, there will not be any problem in data wise.but before that you have to check the usage ,functionality etc.. of that field through out all the places where ever it is used.If you feel it does not affect the functionality ,then proceed with change a field property from Primary key to non-primary key field.

Read only

Former Member
0 Likes
666

Hi,

It is not at all adviceable to change the primay key, as you do not able to know the dependancy on it, Changing the primay key may crate , data inconsistancy and also you may lost multiple data.

Rani