URN
technology.internet.urnUniform Resource Name — a persistent, location-independent identifier in the format urn:nid:nss. Used for namespaced identifiers like ISBN URNs, OIDs, and UUID URNs.
Worked samples
DuckDB 1.5.5 · finetype 0.6.64
| Value | As VARCHAR | nid | nss |
|---|---|---|---|
| urn:isbn:0451450523 | urn:isbn:0451450523 | isbn | 0451450523 |
| urn:ietf:rfc:2648 | urn:ietf:rfc:2648 | ietf | rfc:2648 |
| urn:uuid:6e8bc430-9c3a-11d9-9669-0800200c9a66 | urn:uuid:6e8bc430-9c3a-11d9-9669-0800200c9a66 | uuid | 6e8bc430-9c3a-11d9-9669-0800200c9a66 |
| urn:oid:2.16.840 | urn:oid:2.16.840 | oid | 2.16.840 |
Shape
^urn:[a-z0-9][a-z0-9\-]{0,31}:.+$| Value | Length | Shape |
|---|---|---|
| urn:isbn:0451450523 | 19 | matches |
| urn:ietf:rfc:2648 | 17 | matches |
| urn:uuid:6e8bc430-9c3a-11d9-9669-0800200c9a66 | 45 | matches |
| urn:oid:2.16.840 | 16 | matches |
| urn.isbn:0451450523 | 19 | rejected: separator swapped |
Background
Origin
RFC 2141 describes URNs as intended to serve as persistent, location-independent resource identifiers.[1] RFC 2141 says URNs are designed to make it easy to map other namespaces into URN-space.[1]
RFC 8141, Uniform Resource Names (URNs), was written by P. Saint-Andre and J. Klensin and published in April 2017.[2] RFC 8141 obsoletes both RFC 2141 and RFC 3406.[2] RFC 8141 defines a URN as a URI that is assigned under the urn URI scheme and a particular URN namespace.[2] RFC 8141 states that all URN namespaces and URNs that were valid under the earlier specifications remain valid.[2] Under RFC 8141, a URN's assigned name is the string urn, a colon, a namespace identifier (NID), a colon and a namespace specific string (NSS).[2] RFC 8141 says the syntactical correctness of a name starting with urn: is not sufficient to make it a URN, because the NID must also be registered.[2]
IANA's Uniform Resource Names (URN) Namespaces page calls itself the official IANA registry of URN namespaces.[3] The IANA registry lists formal URN namespaces as registered by expert review, per Section 6 of RFC 8141.[3] RFC 8141 reserves NIDs made of urn- followed by digits, such as urn-7, for informal URN namespaces, whose NIDs IANA assigns.[2]
RFC 3061, A URN Namespace of Object Identifiers, gives urn:oid:1.3.6.1 among its examples.[4] RFC 9562 gives urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6 as an example of the URN namespace for UUIDs.[5] RFC 3187 discusses how International Standard Book Numbers can be supported within the URN framework.[6] The IANA registry lists the isbn namespace against the International ISBN Agency.[3]
Use
RFC 8141 notes that some URN namespaces assign URNs based on names already created in non-URN identifier systems, such as ISBNs, ISSNs or RFCs.[2] RFC 7946, The GeoJSON Format, says its coordinate reference system is equivalent to the one identified by the OGC URN urn:ogc:def:crs:OGC::CRS84.[7] Treat a URN column as an identifier to join on and look up, not as a link to fetch. (Meridian's view)
RFC 8141 says any r-component, q-component or f-component in a URN must be ignored when determining URN-equivalence.[2] RFC 8141 allows a URN namespace definition to add its own equivalence rules, such as case insensitivity of the NSS.[2] RFC 3187 quotes RFC 2288 as saying that, before two ISBN URNs are compared, it is appropriate to remove all hyphens and convert any letter X to upper case.[6] Before joining two tables on URNs, apply the namespace's own equivalence rules rather than matching raw strings. (Meridian's view)
RFC 8141 allows the / character in the NSS, which earlier specifications did not permit.[2] Split a URN at its first two colons only, and keep everything after the second colon together as the namespace specific string. (Meridian's view)
Where you'll meet it
The German National Library administrates and assigns URNs from the namespace urn:nbn:de.[8] The German National Library offers a URN resolving service for Germany and Switzerland.[8] According to the German National Library, other European national libraries also use urn:nbn.[8] The German National Library's resolver at nbn-resolving.org makes a URN operable as a link when the URN is added to the resolver address.[8]
Sources
- [1]URN Syntaxstandard
- [2]Uniform Resource Names (URNs)standard
- [3]Uniform Resource Names (URN) Namespacesdocumentation
- [4]A URN Namespace of Object Identifiersstandard
- [5]Universally Unique IDentifiers (UUIDs)standard
- [6]Using International Standard Book Numbers as Uniform Resource Namesstandard
- [7]The GeoJSON Formatstandard
- [8]DNB - URN serviceorganisation
Detection notes
NID (Namespace ID) is 1-32 lowercase alphanumeric or hyphen chars. NSS (Namespace Specific String) is the remainder.
Use it
$ finetype infer -i "urn:isbn:0451450523" --mode column
→ technology.internet.urn
SELECT ft_infer('urn:isbn:0451450523');
-- → 'technology.internet.urn'CAST({col} AS VARCHAR)Schema
https://meridian.online/schemas/technology.internet.urn · Frictionless type string · uri
finetype taxonomy technology.internet.urn -o json-schema