Page 1 of 1

Re: Dimension Negative surrogate ID created in table

Posted: Tue May 24, 2011 6:18 am
by chulett
devesh_ssingh wrote:please share any long term solution which would not exhuast in span of 10 years.
Not sure how anyone can guarantee a "10 year solution" for you, not knowing your data volumes. Regardless, make sure your ids are "big enough" to hold whatever they need to hold.

However, is there really anything wrong with a negative number for a surrogate? (note I said "negative" not "-ve", an abbreviation that irks the crap out of me) Unless you've assigned special significance to them, then I don't see an issue per se. However, you could "fix" this and leave the existing values in place or "correct" them if they bother you, that's just math and some constraint games.

Posted: Tue May 24, 2011 6:48 am
by devesh_ssingh
Thanks craig for Quick response...

no issuew with negative id but they will again exhausted with in 2-3 years.
our data volume is 12 billion...

need to find out long term solution :)

Re: Dimension Negative surrogate ID created in table

Posted: Tue May 24, 2011 6:54 am
by chulett
devesh_ssingh wrote:change of data type from Integer to Bigint
Would that not do it for you?

Posted: Tue May 24, 2011 7:19 am
by devesh_ssingh
That would do but , for all the -ve values needs to correct..
since restoring last positive value in .sk file and will correct all -ve id with new one.

Posted: Tue May 24, 2011 5:01 pm
by ray.wurlod
There's nothing wrong with negative values for surrogate key.

All a surrogate key has to provide is uniqueness.

If you're really bothered by this, use unsigned integers when viewing them. The binary storage is exactly the same.