Urgent.News

What's breaking now, across thousands of outlets.

Tech

ID design and primary keys

External IDs serve as unique identifiers for entities in business-oriented systems. They can be used externally, such as in emails or printed documents, and have three defining properties: uniqueness, the possibility of changing over time, and the ability to identify a single entity at any given moment. A common method for assigning external IDs is through the use of integer numbers, starting from 1 and incrementing sequentially.

However, this method has limitations and drawbacks, such as the inability to accommodate non-ISBN books or books with identical titles. Another approach is to generate date-based and random IDs, which can be used for external purposes while the meaningless integer number is stored internally for technical convenience. It is crucial to validate and authenticate external IDs, even if they are generated by the system itself.

Additionally, some external IDs may be generated by outside systems, which can pose challenges such as forgery or inaccuracies. In such cases, it may be more appropriate to treat the external ID as an attribute of a different anchor rather than a standalone entity.

Written by urgent.news from Lobsters's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at anchorsandlinks.com →

More in Tech

More from Wednesday 9 September →