Types of IDs
Last Updated

For various reasons, we often use multiple IDs on a single object. Here we'll list and describe them.

ID / Numerical ID / Internal ID

The Numerical ID, or just ID, is the default id type. Everything has a Numerical ID, from games to users to gamelist entries to user friendships. This makes it use to easy internally - if no other solution is available, numerical IDs are always there.

However, since it's just a number, it's hard to know what object it refers to. Moreover, if the object is deleted and recreated later, its numerical ID will change, even though it's supposed to be the same object.

UUID

The UUID is a randomly-generated text string that looks likes this:

f88e697c-3de8-4606-ba7d-0ca80d95a3e7

Given its large size, the chance of the same UUID being generated twice in almost zero. This makes it great for keeping the identity of an object that might be deleted and recreated later consistent.

However, its large size also makes it a pain in the butt to use and remember.

CNAME

CNAMEs are textual IDs containing only letters, numbers and hyphens (-), generated from the object's name.

This makes them easy to remember and thus are mostly used to create friendly, easy-to-navigate URLS.

However, their creation requires a bit more effort, since problems can arise, such as 2 different objects having the same name, or having no name at all. Moreover, if an object's name changes, the CNAME will have to change as well to keep consistency.

Summary

ID / Numerical ID

+ Universal ID / Always available

- Lacks meaning / hard to remember

- Can change if object is recreated

Used mostly for less important objects or ones that have no name, such as release dates, editions, images, etc.

UUID

+ Never changes / keeps identity on recreation

+ Easy to create

- Lacks meaning / hard to remember

Used mostly for user data, such as gamelist entries and playthroughs, or system data that can be updated frequently, such as these help articles.

CNAME

+ Has meaning / easy to remember

- Hard to create

- Can change if the object's name changes

Used mostly for more prominent objects that the users might encounter more often, like games, companies, boards, etc.

Previous
Contributing
Next
About CNames

Related articles

Settings
Developers
Other