Skip to content

Cardinality

Namespace: DataWarehouseAutomation.DwaModel
Assembly: DataWarehouseAutomation.dll

This object captures the cardinality and ordinality of a relationship. Cardinality refers to the uniqueness of data values contained in a column (attribute) of a database table. It defines the number of occurrences of one entity that are associated with the number of occurrences of another entity through a relationship.

public class Cardinality

objectCardinality

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()

Free-form and optional classification for the Cardinality for use in generation logic (evaluation).

[JsonPropertyName("classifications")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public List<DataClassification>? Classifications { get; set; }

List<DataClassification>?

The collection of extension Key/Value pairs.

[JsonPropertyName("extensions")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public List<Extension>? Extensions { get; set; }

List<Extension>?

The ‘from’ component in the cardinality, e.g. the ‘1’ in 1 to many.

[JsonPropertyName("fromRange")]
public CardinalityRange? FromRange { get; set; }

CardinalityRange?

Optional identifier as a string value to allow various identifier approaches.

[JsonPropertyName("id")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string? Id { get; set; }

string?

Optional information to name a certain cardinality construct. For example one-to-one, one-to-many, or many-to-many. E.g. one-to-one could be defined as {“fromRange”: {“min”: “1”, “max”: “1”}, “toRange”: {“min”: “1”, “max”: “1”}}.

[JsonPropertyName("name")]
public string? Name { get; set; }

string?

Free-format notes.

[JsonPropertyName("notes")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string? Notes { get; set; }

string?

The ‘to’ component in the cardinality, e.g. the ‘many’ in 1 to many.

[JsonPropertyName("toRange")]
public CardinalityRange? ToRange { get; set; }

CardinalityRange?

Use this method to assert if two Cardinalities are the same, based on their Ids.

public override bool Equals(object? obj)

obj object?

bool

True if the Cardinalities are the same, based on their Ids

Override to get a hash value that represents the identifier.

public override int GetHashCode()

int

A 32-bit signed integer hash code

String override so that the object returns its value (‘Name’). When an instance of this class is passed to a method that expects a string, the ToString() method will be called implicitly to convert the object to a string, and the value of the “Name” property will be returned.

public override string ToString()

string

The Name