IRI Coining Reference Guide
The application employs the Internationalized Resource Identifier (IRI) standard for identifying and managing resources. This document outlines the IRI coining process and provides implementation examples to guide users in creating and understanding IRIs.
Steps for coining an IRI
The following steps are involved in coining an IRI for resources:
Connecting a list of unique hierarchical identifiers, such as, Organization name, Database server host and port, Database name, Schema name, Table name.
Creating an MD5 hash from the concatenated string using the format.
Adding a prefix before the hash to indicate the resource type.
Incorporating a base namespace to generate a URL. We use a standardized namespace base URLs format based on the organization name. For example: https://[agent/organization].linked.data.world/d/ddw-catalogs/
Let us understand this using an example. Let us say we have:
Organization: mycorp
Location of database: postgresql.mycorp.com:5432
Database: mydb
Schema: s
Table: t
This results in the following IRI for the table:
https://mycorp.linked.data.world/d/ddw-catalogs/tbl.5b1db321bb66ec93ef3a3c417c1d0520
Where
Namespace Base URL:
https://mycorp.linked.data.world/d/ddw-catalogs/
Resource Type Prefix:
tbl
MD5 Hash:
md5("tbl$mycorp$$postgresql.mycorp.com:5432$mydb$s$t") coverts to "5b1db321bb66ec93ef3a3c417c1d0520"
5b1db321bb66ec93ef3a3c417c1d0520
Note
The third identifier component is an unused empty string.
The default database port is included in the IRI string to maintain the uniqueness of the resource.
Terms and abbreviations used in IRI coining
This section explains the terms and abbreviations that will be used in the IRI coining tables in the rest of this document.
Terms | Definition |
---|---|
base | The namespace part of the URL (up to and including the final forward-slash, for example, https://mycorp.linked.data.world/d/ddw-catalogs/). |
organization | The ID for the data.world account/organization (also called agent). |
location | Database server host and port, formatted as host:port. |
ID | A unique identifier for the database, defaulting to the database name if not specified. |
name | The name of the database. |
schema | The name of the database schema. |
table | The name of the table. |
column | The name of the column. |
Database entity type | Abbreviation |
---|---|
dwec:Database | db |
dwec:DatabaseTable | tbl |
dwec:DatabaseColumn | col |
dwec:DatabaseSchema | sch |
dwec:DatabaseView | tbl |
dwec:DatabaseStoredProcedure | spr |
IRI coining in general
Database entity type | Construction of input string for coining IRI | Terms used to coin IRI |
---|---|---|
dwec:Database | base + "db" + "." + md5("db" + "$" + organization + "$" + "" + $ + location + "$" + ID or name if ID is null) | base, organization, location, ID (or name if no ID) |
dwec:DatabaseTable | base + "tbl" + "." + md5("tbl" + "$" + organization + "$" + "" + $ + location + "$" + ID or name if ID is null + "$" + schema or "" if schema is null + "$" + table) | base, organization, location, ID (or name if no ID), schema if not null, table |
dwec:DatabaseColumn | base + "col" + "." + md5("col" + "$" + organization + "$" + "" + $ + location + "$" + ID or name if ID is null + "$" + schema or "" if schema is null + "$" + table + "$" + column) | base, organization, location, ID (or name if no ID), schema if not null, table, column |
dwec:DatabaseSchema | base + "sch" + "." + md5( "sch" + "$" + organization + "$" + "" + $ + location + "$" + ID or name if ID is null + "$" + schema) | base, organization, location, ID (or name if no ID), schema |
dwec:DatabaseView | base + "tbl" + "." + md5("tbl" + "$" + organization + "$" + "" + $ + location + "$" + ID or name if ID is null + "$" + schema or "" if schema is null + "$" + table) | base, organization, location, ID (or name if no ID), schema if not null, table |
dwec:DatabaseStoredProcedure | base + "spr" + "." + md5("spr" + "$" + organization + "$" + "" + $ + location + "$" + ID or name if ID is null + "$" + schema or "" if schema is null + "$" + stored procedure) | base, organization, location, ID (or name if no ID), schema if not null, stored procedure |
Microsoft SQL Server IRI coining
Database entity type | Construction of input string for coining IRI | Terms used to coin IRI |
---|---|---|
dwec:Database | base + "db" + "." + md5("db" + "$" + organization + "$" + "" + $ + location + "$" + ID) | base, organization, location, ID |
dwec:DatabaseTable | base + "tbl" + "." + md5("tbl" + "$" + organization + "$" + "" + $ + location + "$" + ID + "$" + schema + "$" + table) | base, organization, location, ID, schema, table |
dwec:DatabaseColumn | base + "col" + "." + md5("col" + "$" + organization + "$" + "" + $ + location + "$" + ID + "$" + schema + "$" + table + "$" + column) | base, organization, location, ID, schema, table, column |
dwec:DatabaseSchema | base + "sch" + "." + md5("sch" + "$" + organization + "$" + "" + $ + location + "$" + ID + "$" + schema) | base, organization, location, ID, schema |
dwec:DatabaseView | base + "tbl" + "." + md5("tbl" + "$" + organization + "$" + "" + $ + location + "$" + ID + "$" + schema + "$" + table) | base, organization, location, ID, schema, table |
Oracle IRI coining
Database entity type | Construction of input string for coining IRI | Terms used to coin IRI |
---|---|---|
dwec:Database | base + "db" + "." + md5("db" + "$" + organization + "$" + "" + $ + location + "$" + ID or name if ID is null | base, organization, location, ID (or name if no ID) |
dwec:DatabaseTable | base + "tbl" + "." + md5("tbl" + "$" + organization + "$" + "" + $ + location + "$" + ID or name if ID is null + "$" + schema or "" if schema is null + "$" + table) | base, organization, location, ID (or name if no ID), schema if not null, table |
dwec:DatabaseColumn | base + "col" + "." + md5("col" + "$" + organization + "$" + "" + $ + location + "$" + ID or name if ID is null + "$" + schema or "" if schema is null + "$" + table + "$" + column) | base, organization, location, ID (or name if no ID), schema if not null, table, column |
dwec:DatabaseSchema | base + "sch" + "." + md5("sch" + "$" + organization + "$" + "" + $ + location + "$" + ID or name if ID is null + "$" + schema) | base, organization, location, ID (or name if no ID), schema |
dwec:DatabaseView | base + "tbl" + "." + md5("tbl" + "$" + organization + "$" + "" + $ + location + "$" + ID or name if ID is null + "$" + schema or "" if schema is null + "$" + table) | base, organization, location, ID (or name if no ID), schema if not null, table |
dwec:DatabaseStoredProcedure | base + "spr" + "." + md5("spr" + "$" + organization + "$" + "" + $ + location + "$" + ID or name if ID is null + "$" + schema or "" if schema is null + "$" + stored procedure) | base, organization, location, ID (or name if no ID), schema if not null, stored procedure |
Manta IRI coining
Database entity type | Construction of input string for coining IRI | Terms used to coin IRI |
---|---|---|
dwec:Database | base + "db" + "." + md5("db" + "$" + organization + "$" + "" + $ + location + "$" + ID or name if ID is null | base, organization, location, ID (or name if no ID) |
dwec:DatabaseTable | base + "tbl" + "." + md5("tbl" + "$" + organization + "$" + "" + $ + location + "$" + ID or name if ID is null + "$" + schema or "" if schema is null + "$" + table) | base, organization, location, ID (or name if no ID), schema if not null, table |
dwec:DatabaseColumn | base + "col" + "." + md5("col" + "$" + organization + "$" + "" + $ + location + "$" + ID or name if ID is null + "$" + schema or "" if schema is null + "$" + table + "$" + column) | base, organization, location, ID (or name if no ID), schema if not null, table, column |
dwec:DatabaseSchema | base + "sch" + "." + md5("db" + "$" + organization + "$" + "" + $ + location + "$" + ID or name if ID is null + "$" + schema) | base, organization, location, ID (or name if no ID), schema |
dwec:DatabaseView | base + "tbl" + "." + md5("tbl" + "$" + organization + "$" + "" + $ + location + "$" + ID or name if ID is null + "$" + schema or "" if schema is null + "$" + table) | base, organization, location, ID (or name if no ID), schema if not null, table |
dwec:DatabaseStoredProcedure | base + "spr" + "." + md5("spr" + "$" + organization + "$" + "" + $ + location + "$" + ID or name if ID is null + "$" + schema or "" if schema is null + "$" + stored procedure) | base, organization, location, ID (or name if no ID), schema if not null, stored procedure |