News for hackers. Stuff that matters.
Re:You'll regret using natural keys by ray_v on Tuesday June 04, 2024 @10:47PM (#40580921)
Feels like this could have used a few more solid examples up-front. I think another good example would be PlayStation Network using the natural key of "gamer tags" as the primary key to identify players would be a good example. Since this effectively locks players into having to keep a gamertag in order to uniquely identify them in the service -- instead of having a synthetic key that carries no meaning or data other than "uniqueness"
Re:You'll regret using natural keys by mths on Tuesday June 04, 2024 @11:13PM (#40581027)
Last I checked, Steam still has me logging in with my two decade old hotmail address as my account name. At least it's not something that shows publicly, I think.
Re:You'll regret using natural keys by petepete on Wednesday June 05, 2024 @12:37AM (#40581447)
Mine too, but with a British ISP that hasn't existed for fifteen years.
Re:You'll regret using natural keys by t90fan on Wednesday June 05, 2024 @01:04AM (#40581553)
ntl?

me too!

Re:You'll regret using natural keys by petepete on Wednesday June 05, 2024 @03:28AM (#40582300)
That's the one! [email protected]

And NTL merged with Virgin in 2006, making it 18 years. Oh dear.

Re:You'll regret using natural keys by nottorp on Wednesday June 05, 2024 @07:30AM (#40583666)
I wouldn't swear it, but I think when I changed my Steam email the process didn't require access to the old email, just knowing the user and pass.
Re:You'll regret using natural keys by zamadatix on Wednesday June 05, 2024 @05:00PM (#40590552)
I'm able to log out and back into Steam using my plain username rather than email. The box actually says"enter account name" and wouldn't log me in if I tried to enter my email instead. I'm not sure if there are conditions to this e.g. my account was only created in 2009 and I'm not sure if I've ever toggled anything that "flipped it over" along the way either.

On the API side I know Steam has something like 3 different forms of auto generated alphanumerical account ID and I imagine that's what everything is really keyed off of on the back end.

Re:You'll regret using natural keys by robomc on Tuesday June 04, 2024 @11:06PM (#40580991)
yeah the way he described it it's like... well who would ever do that. but foreign keying to emails or usernames is much easier to "accidentally" do and is a classic source of long-term headaches.
Re:You'll regret using natural keys by jaggederest on Wednesday June 05, 2024 @12:36AM (#40581442)
As a great example: My steam account name is the email I was using in 2003. I have largely not used it since then. The email on the account has been updated, but the account name? Stuck.
Re:You'll regret using natural keys by jimbobthrowawy on Wednesday June 05, 2024 @04:53AM (#40582807)
I was about to ask how you got past steamguard without email access. Makes sense if you were able to navigate off it.
Re:You'll regret using natural keys by jaggederest on Wednesday June 05, 2024 @11:51AM (#40586449)
Email was changed about 5 years before steamguard release :)
Re:You'll regret using natural keys by bruce511 on Wednesday June 05, 2024 @01:48AM (#40581750)
This is one of those cases where examples of natural keys failing are so ubiquitous that they are almost redundant.

For the group who have forged a career with natural keys, and never regretted it, more power to you. Great.

However to the rest of us, myself included, where ill-considered natural keys have caused endless opinions and suffering, my commiserations.

If I could send back one piece of advice to junior-me it would be to avoid natural primary keys. (Ideally with the corollary to avoid sequences, but that's another thread for another day.)

Re:You'll regret using natural keys by saghm on Wednesday June 05, 2024 @02:46AM (#40582055)
On the other hand, Discord used to allow arbitrary usernames and would add a suffix for when you needed to disambiguate (e.g. if you used the username JohnDoe, your "id" would be something like JohnDoe#12345) but over the past year or so forced everyone to pick a fully unique username. In this case, the decision seemed to potentially be financially motivated, given that people with subscriptions were given priority for claiming usernames, and historically there really hasn't been much reason to pay for it in the first place.
Re:You'll regret using natural keys by bux93 on Wednesday June 05, 2024 @07:46AM (#40583763)
A phone company I was a customer of used my phone number as the customer Id. Which doesn't work great for people, or companies, with more than one phone number. They could also only provision one SIM per phone number, and not use a phone number tied to a SIM as a virtual number, and also the primary (customer Id) phone number had to be tied to a SIM.

I ported my phone number away from them, but what if I ever go back? Will my old data be there? Including my old address? What if my phone number gets recycled, and some-one else gets that phone number and ports it to them? So many questions.