@startuml

title Indicative Database Layout

!define table(x) class x << (T,#FFAAAA) >>
!define primary_key(x) <u>x</u>
hide methods
hide stereotypes

table(PDP_SUBGROUP) {
  primary_key(PDP_SUBGROUP_ID)
  PDP_SUBGROUP_NAME
  PDP_SUBGROUP_VERSION
  PDP_TYPE
  PDP_SERVICE_ENDPOINT
  POLICY_SET_ID
  PDP_SUBGROUP_STATE
}

table(PDP) {
  primary_key(PDP_ID)
  PDP_NAME
  PDP_VERSION
  PDP_TYPE
  PDP_ENDPOINT
  PDP_SUBGROUP_ID
  POLICY_SET_ID PDP_STATE
}

table(POLICY_SET) {
  primary_key(POLICY_SET_ID)
  POLICY_SET_NAME
  POLICY_SET_VERSION
}

table(POLICY_TYPE_IMPL) {
  primary_key(POLICY_TYPE_IMPL_ID)
  POLICY_NAME
  POLICY_VERSION
  PDP_TYPE POLICY_ARTIFACT
}

table(POLICY_SET_TO_POLICY_TYPE_IMPL) {
  POLICY_SET_ID
  POLICY_TYPE_IMPL_ID
}

PDP_SUBGROUP::POLICY_SET_ID --> POLICY_SET::POLICY_SET_ID
PDP::PDP_SUBGROUP_ID --> PDP_SUBGROUP::PDP_SUBGROUP_ID
PDP::POLICY_SET_ID --> POLICY_SET::POLICY_SET_ID
POLICY_SET_TO_POLICY_TYPE_IMPL::POLICY_SET_ID --> POLICY_SET::POLICY_SET_ID
POLICY_SET_TO_POLICY_TYPE_IMPL::POLICY_TYPE_IMPL_ID --> POLICY_TYPE_IMPL::POLICY_TYPE_IMPL_ID

@enduml