Click or drag to resize

Title.id Property

The id uniquely identifies a Title in the collection database. The id is used as the database primary key. The id string has the format T-XXXXXXXXXXXX where the 12 X characters are strongly random and taken from a pool of 34 easily identifiable alphanumeric uppercase characters. There are therefore about 2.4×1018 possible Ids assuming a flat distribution, which is about 61 bits of entropy. The chance of a birthday collision rises to 0.1% at around 68 million, and rises to 1% at around 215 million. Since the total number of titles in the database is around 6700, the probability of a collision is about 10-11 (see Birthday Attack).

Note that the default id value is the special sentinel value UnassignedId so that this class can be passed into the web service and pass validation on the property. The service layer will recognise the special value and convert it into a valid random id before the Title is saved.


Namespace: Orthogonal.Hoarder.StdLib.Entity
Assembly: Orthogonal.Hoarder.StdLib (in Orthogonal.Hoarder.StdLib.dll) Version: 8.0.9
Syntax
C#
public string id { get; set; }

Property Value

String

Implements

IHoarderDocument.id
Remarks
The id property name is lowercase to conform to a requirement of the underlying Cosmos database. The lowercase property name id has special treatment in the database and is used as the primary key. There are no built-in .NET attributes that can map different cased property names, so the class property name is lowercase to allow direct serialization.
See Also