@startuml
left to right direction
'top to bottom direction
hide circle
'avoide "." issues:
set namespaceSeparator none


skinparam class {
  BackgroundColor White
  BackgroundColor<<FN>> Yellow
  BackgroundColor<<FS>> Yellow
  BackgroundColor<<FT>> LightGray
  BackgroundColor<<IF>> Yellow
  BackgroundColor<<IS>> Yellow
  BackgroundColor<<P>> Aqua
  BackgroundColor<<PC>> Aqua
  BackgroundColor<<SN>> Yellow
  BackgroundColor<<SO>> SlateBlue
  BackgroundColor<<TF>> LightGray
  BackgroundColor<<TR>> Tomato
  BackgroundColor<<U>> White
  BackgroundColor<<V>> WhiteSmoke
  BackgroundColor<<X>> Aqua
  BackgroundColor<<external>> AliceBlue
}


entity "puml-link:dhw:sqldb:repo.repoobject.adoc[]" as repo.RepoObject << U >> {
  - **RepoObject_guid** : (uniqueidentifier)
  external_AntoraComponent : (nvarchar(128))
  external_AntoraModule : (nvarchar(128))
  has_execution_plan_issue : (bit)
  has_get_referenced_issue : (bit)
  Inheritance_Source_fullname : (nvarchar(261))
  Inheritance_StringAggSeparatorSql : (nvarchar(4000))
  InheritanceDefinition : (nvarchar(4000))
  InheritanceType : (tinyint)
  - is_DocsExclude : (bit)
  - is_external : (bit)
  is_repo_managed : (bit)
  is_required_ObjectMerge : (bit)
  - is_ssas : (bit)
  is_SysObject_missing : (bit)
  - modify_dt : (datetime)
  pk_index_guid : (uniqueidentifier)
  pk_IndexPatternColumnName_new : (nvarchar(4000))
  Repo_history_table_guid : (uniqueidentifier)
  Repo_temporal_type : (tinyint)
  - RepoObject_name : (nvarchar(128))
  RepoObject_Referencing_Count : (int)
  - RepoObject_schema_name : (nvarchar(128))
  - RepoObject_type : (char(2))
  SysObject_id : (int)
  SysObject_modify_date : (datetime)
  - SysObject_name : (nvarchar(128))
  - SysObject_parent_object_id : (int)
  - SysObject_schema_name : (nvarchar(128))
  SysObject_type : (char(2))
  ~ has_different_sys_names : (bit)
  # is_RepoObject_name_uniqueidentifier : (int)
  # is_SysObject_name_uniqueidentifier : (int)
  ~ node_id : (bigint)
  # RepoObject_fullname : (nvarchar(261))
  # RepoObject_fullname2 : (nvarchar(257))
  # SysObject_fullname : (nvarchar(261))
  # SysObject_fullname2 : (nvarchar(257))
  ~ SysObject_query_sql : (nvarchar(406))
  # usp_persistence_fullname2 : (nvarchar(269))
  # usp_persistence_name : (nvarchar(140))
  --
}

entity "puml-link:dhw:sqldb:repo.repoobjectcolumn.adoc[]" as repo.RepoObjectColumn << U >> {
  - **RepoObjectColumn_guid** : (uniqueidentifier)
  Inheritance_StringAggSeparatorSql : (nvarchar(4000))
  InheritanceDefinition : (nvarchar(4000))
  InheritanceType : (tinyint)
  is_persistence_no_check : (bit)
  is_persistence_no_include : (bit)
  is_persistence_no_update : (bit)
  is_query_plan_expression : (bit)
  is_required_ColumnMerge : (bit)
  is_SysObjectColumn_missing : (bit)
  persistence_source_RepoObjectColumn_guid : (uniqueidentifier)
  Referencing_Count : (int)
  Repo_default_definition : (nvarchar(max))
  Repo_default_is_system_named : (bit)
  Repo_default_name : (nvarchar(128))
  Repo_definition : (nvarchar(max))
  - Repo_generated_always_type : (tinyint)
  Repo_graph_type : (int)
  Repo_increment_value : (sql_variant)
  - Repo_is_computed : (bit)
  - Repo_is_identity : (bit)
  Repo_is_nullable : (bit)
  Repo_is_persisted : (bit)
  Repo_seed_value : (sql_variant)
  Repo_user_type_fullname : (nvarchar(128))
  Repo_user_type_name : (nvarchar(128))
  Repo_uses_database_collation : (bit)
  - RepoObject_guid : (uniqueidentifier)
  RepoObjectColumn_column_id : (int)
  - RepoObjectColumn_name : (nvarchar(128))
  SysObjectColumn_column_id : (int)
  - SysObjectColumn_name : (nvarchar(128))
  # Column_name : (nvarchar(128))
  ~ has_different_sys_names : (bit)
  # is_RepoObjectColumn_name_uniqueidentifier : (int)
  # is_SysObjectColumn_name_uniqueidentifier : (int)
  --
}

entity "puml-link:dhw:sqldb:sqlparse.repoobject_sqlmodules_44_from_identifier_quotename.adoc[]" as sqlparse.RepoObject_SqlModules_44_from_Identifier_QuoteName << V >> {
  alias : (nvarchar(max))
  alias_QuoteName : (nvarchar(max))
  class : (nvarchar(500))
  - json_key : (nvarchar(4000))
  lag_normalized_wo_nolock : (nvarchar(max))
  name : (nvarchar(max))
  name_charindex_dot : (bigint)
  name_PostDot : (nvarchar(max))
  name_PostDot_QuoteName : (nvarchar(max))
  name_PreDot : (nvarchar(max))
  name_PreDot_QuoteName : (nvarchar(max))
  - RepoObject_guid : (uniqueidentifier)
  RowNumber_per_Object : (bigint)
  SysObject_fullname : (nvarchar(261))
  T1_identifier_alias : (nvarchar(max))
  --
}

entity "puml-link:dhw:sqldb:sqlparse.repoobject_sqlmodules_61_selectidentifier_union_t.adoc[]" as sqlparse.RepoObject_SqlModules_61_SelectIdentifier_Union_T << U >> {
  alias_QuoteName : (nvarchar(max))
  class : (nvarchar(500))
  normalized : (nvarchar(max))
  - RepoObject_guid : (uniqueidentifier)
  RowNumber_per_Object : (bigint)
  source_column_QuoteName : (nvarchar(max))
  source_table_QuoteName : (nvarchar(max))
  SysObject_fullname : (nvarchar(261))
  --
}

entity "puml-link:dhw:sqldb:sqlparse.repoobject_sqlmodules_71_reference_explicitetablealias.adoc[]" as sqlparse.RepoObject_SqlModules_71_reference_ExpliciteTableAlias << V >> {
  alias_QuoteName : (nvarchar(max))
  normalized : (nvarchar(max))
  - RepoObject_guid : (uniqueidentifier)
  - RepoObjectColumn_guid : (uniqueidentifier)
  - RepoObjectColumn_name : (nvarchar(128))
  source_column_QuoteName : (nvarchar(max))
  - source_RepoObject_guid : (uniqueidentifier)
  - source_RepoObjectColumn_guid : (uniqueidentifier)
  - source_RepoObjectColumn_name : (nvarchar(128))
  - source_SysObject_fullname : (nvarchar(261))
  source_table_QuoteName : (nvarchar(max))
  SysObject_fullname : (nvarchar(261))
  --
}

entity "puml-link:dhw:sqldb:sqlparse.repoobject_sqlmodules_79_reference_union.adoc[]" as sqlparse.RepoObject_SqlModules_79_reference_union << V >> {
  alias_QuoteName : (nvarchar(max))
  normalized : (nvarchar(max))
  - RepoObject_guid : (uniqueidentifier)
  - RepoObjectColumn_guid : (uniqueidentifier)
  - RepoObjectColumn_name : (nvarchar(128))
  source_column_QuoteName : (nvarchar(max))
  - source_RepoObject_guid : (uniqueidentifier)
  - source_RepoObjectColumn_guid : (uniqueidentifier)
  - source_RepoObjectColumn_name : (nvarchar(128))
  - source_SysObject_fullname : (nvarchar(261))
  source_table_QuoteName : (nvarchar(max))
  SysObject_fullname : (nvarchar(261))
  --
}

repo.RepoObject <.. sqlparse.RepoObject_SqlModules_71_reference_ExpliciteTableAlias
repo.RepoObjectColumn <.. sqlparse.RepoObject_SqlModules_71_reference_ExpliciteTableAlias
sqlparse.RepoObject_SqlModules_44_from_Identifier_QuoteName <.. sqlparse.RepoObject_SqlModules_71_reference_ExpliciteTableAlias
sqlparse.RepoObject_SqlModules_61_SelectIdentifier_Union_T <.. sqlparse.RepoObject_SqlModules_71_reference_ExpliciteTableAlias
sqlparse.RepoObject_SqlModules_71_reference_ExpliciteTableAlias <.. sqlparse.RepoObject_SqlModules_79_reference_union
"repo.RepoObject::RepoObject_guid" <-- "sqlparse.RepoObject_SqlModules_71_reference_ExpliciteTableAlias::source_RepoObject_guid"
"repo.RepoObject::SysObject_fullname" <-- "sqlparse.RepoObject_SqlModules_71_reference_ExpliciteTableAlias::source_SysObject_fullname"
"repo.RepoObjectColumn::RepoObjectColumn_guid" <-- "sqlparse.RepoObject_SqlModules_71_reference_ExpliciteTableAlias::source_RepoObjectColumn_guid"
"repo.RepoObjectColumn::RepoObjectColumn_guid" <-- "sqlparse.RepoObject_SqlModules_71_reference_ExpliciteTableAlias::RepoObjectColumn_guid"
"repo.RepoObjectColumn::RepoObjectColumn_name" <-- "sqlparse.RepoObject_SqlModules_71_reference_ExpliciteTableAlias::RepoObjectColumn_name"
"repo.RepoObjectColumn::RepoObjectColumn_name" <-- "sqlparse.RepoObject_SqlModules_71_reference_ExpliciteTableAlias::source_RepoObjectColumn_name"footer The diagram is interactive and contains links.
@enduml

