General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
>So, the next question is..... Why bother? Just leave the PK alone, and generate an entirely new one for the new record. What's the problem with that???? Or did I miss something here. :/
I would then have to update all the child tables with the new PK and all the tables in any associated apps with the new PK across a very slow WAN.
Thats the problem that got me started on this thread in the first place.
My problem kinda got lost in a debate about Surrogate v Intelligent keys.
I prefer surrogate keys for most apps now. Its just that not being able to do a delete/append was getting to be a problem. I ended up writing lots of seperate update routines just to get a few records into one of my tables. I think this approach will work pretty well for me now.
Unless folks here can tell me otherwise:)
>>Thanks Fred:)
>>
>>>SET Devil's Advocate ON
>>>So now what happens if someone deletes the new positive value DK record again?
>>>SET Devil's Advocate OFF
>>
>>
>>Well the system crashes causing thousands of pounds worth down time of course.
>>
>>DOH!
>>
>>Lol...I spotted that one seconds after I pressed the send button.
>>
>>Ok then....how about we stick with minus values for deleted records but have a new minus generated PK for each deleted record.
>>
>>So in my nextkey table I have a key called PK_DELETED and it returns a unique minus PK for any record I delete.
>
>So, the next question is..... Why bother? Just leave the PK alone, and generate an entirely new one for the new record. What's the problem with that???? Or did I miss something here. :/
>
>>BTW what hourly rate is the Devil offering these days:)
>
>< B evil G >
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only