Changes for page 8 Constraints
Last modified by Artur on 2025/09/10 11:19
Summary
-
Page properties (3 modified, 0 added, 0 removed)
Details
- Page properties
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -xwiki:XWiki. helena1 +xwiki:XWiki.elenasemanticproorg - Tags
-
... ... @@ -1,0 +1,1 @@ 1 +Age|Artefact|Attribute|Code|Code list|Component|Constraint|Data provider|Data set|Data structure definition|Dataflow|Dimension|Maintainable artefact|Measure|Member selection|Metadata set|Metadata structure definition|Metadataflow|Provision agreement|Reference metadata|Release policy - release calendar|Series key|Statistical data and metadata exchange - Content
-
... ... @@ -4,7 +4,7 @@ 4 4 5 5 == 8.1 Introduction == 6 6 7 -In this (% style="color:#e74c3c" %)version(%%)of [[SDMX>>doc:sdmx:Glossary.Statistical data and metadata exchange.WebHome]] the(%style="color:#e74c3c" %)Constraints(%%)is a [[Maintainable Artefact>>doc:sdmx:Glossary.Maintainable artefact.WebHome]] can be associated to one or more of:7 +In this version of [[SDMX>>doc:sdmx:Glossary.Statistical data and metadata exchange.WebHome]] the [[Constraints>>doc:Glossary.Constraint.WebHome]] is a [[Maintainable Artefact>>doc:sdmx:Glossary.Maintainable artefact.WebHome]] can be associated to one or more of: 8 8 9 9 * Data Structure Definition 10 10 * [[Metadata Structure Definition>>doc:sdmx:Glossary.Metadata structure definition.WebHome]] ... ... @@ -11,31 +11,31 @@ 11 11 * [[Dataflow>>doc:sdmx:Glossary.Dataflow.WebHome]] 12 12 * [[Metadataflow>>doc:sdmx:Glossary.Metadataflow.WebHome]] 13 13 * [[Provision Agreement>>doc:sdmx:Glossary.Provision agreement.WebHome]] 14 -* [[Data Provider>>doc:sdmx:Glossary.Data provider.WebHome]] (this is restricted to a [[Release Calendar>>doc:sdmx:Glossary.Release policy - release calendar.WebHome]] (%style="color:#e74c3c" %)Constraint(%%))14 +* [[Data Provider>>doc:sdmx:Glossary.Data provider.WebHome]] (this is restricted to a [[Release Calendar>>doc:sdmx:Glossary.Release policy - release calendar.WebHome]] [[Constraint>>doc:Glossary.Constraint.WebHome]]) 15 15 * Simple or Queryable Datasources 16 16 17 -Note that regardless of the artifact to which the (%style="color:#e74c3c" %)Constraint(%%)is associated, it is constraining the contents of [[code lists>>doc:sdmx:Glossary.Code list.WebHome]] in the [[DSD>>doc:sdmx:Glossary.Data structure definition.WebHome]] to which the constrained object is related. This does not apply, of course, to a [[Data Provider>>doc:sdmx:Glossary.Data provider.WebHome]] as the [[Data Provider>>doc:sdmx:Glossary.Data provider.WebHome]] can be associated, via the [[Provision Agreement>>doc:sdmx:Glossary.Provision agreement.WebHome]], to many DSDs. Hence the reason for the restriction on the type of(%style="color:#e74c3c" %)Constraint(%%)that can be attached to a [[Data Provider>>doc:sdmx:Glossary.Data provider.WebHome]].17 +Note that regardless of the artifact to which the [[Constraint>>doc:Glossary.Constraint.WebHome]] is associated, it is constraining the contents of [[code lists>>doc:sdmx:Glossary.Code list.WebHome]] in the [[DSD>>doc:sdmx:Glossary.Data structure definition.WebHome]] to which the constrained object is related. This does not apply, of course, to a [[Data Provider>>doc:sdmx:Glossary.Data provider.WebHome]] as the [[Data Provider>>doc:sdmx:Glossary.Data provider.WebHome]] can be associated, via the [[Provision Agreement>>doc:sdmx:Glossary.Provision agreement.WebHome]], to many DSDs. Hence the reason for the restriction on the type of [[Constraint>>doc:Glossary.Constraint.WebHome]] that can be attached to a [[Data Provider>>doc:sdmx:Glossary.Data provider.WebHome]]. 18 18 19 19 == 8.2 Types of Constraint == 20 20 21 -The (%style="color:#e74c3c" %)Constraint(%%)can be of one of two types:21 +The [[Constraint>>doc:Glossary.Constraint.WebHome]] can be of one of two types: 22 22 23 -* Content (%style="color:#e74c3c" %)constraint24 -* Attachable (%style="color:#e74c3c" %)constraint23 +* Content [[constraint>>doc:Glossary.Constraint.WebHome]] 24 +* Attachable [[constraint>>doc:Glossary.Constraint.WebHome]] 25 25 26 -The attachable (%style="color:#e74c3c" %)constraint(%%)is used to define “cube slices” which identify sub sets of data in terms of [[series keys>>doc:sdmx:Glossary.Series key.WebHome]] or [[dimension>>doc:sdmx:Glossary.Dimension.WebHome]] values. The purpose of this is to enable metadata to be attached to the(%style="color:#e74c3c" %)constraint(%%), and thereby to the cube slices defined in the(%style="color:#e74c3c" %)Constraint(%%). The metadata can be attached via the “[[reference metadata>>doc:sdmx:Glossary.Reference metadata.WebHome]]” mechanism – [[MSD>>doc:sdmx:Glossary.Metadata structure definition.WebHome]] and [[Metadata Set>>doc:sdmx:Glossary.Metadata set.WebHome]] – or via a Group in the [[DSD>>doc:sdmx:Glossary.Data structure definition.WebHome]]. Below is snippet of the schema for a [[DSD>>doc:sdmx:Glossary.Data structure definition.WebHome]] that shows the constructs that enable the(%style="color:#e74c3c" %)Constraint(%%)to referenced from a Group in a [[DSD>>doc:sdmx:Glossary.Data structure definition.WebHome]].26 +The attachable [[constraint>>doc:Glossary.Constraint.WebHome]] is used to define “cube slices” which identify sub sets of data in terms of [[series keys>>doc:sdmx:Glossary.Series key.WebHome]] or [[dimension>>doc:sdmx:Glossary.Dimension.WebHome]] values. The purpose of this is to enable metadata to be attached to the [[constraint>>doc:Glossary.Constraint.WebHome]], and thereby to the cube slices defined in the [[Constraint>>doc:Glossary.Constraint.WebHome]]. The metadata can be attached via the “[[reference metadata>>doc:sdmx:Glossary.Reference metadata.WebHome]]” mechanism – [[MSD>>doc:sdmx:Glossary.Metadata structure definition.WebHome]] and [[Metadata Set>>doc:sdmx:Glossary.Metadata set.WebHome]] – or via a Group in the [[DSD>>doc:sdmx:Glossary.Data structure definition.WebHome]]. Below is snippet of the schema for a [[DSD>>doc:sdmx:Glossary.Data structure definition.WebHome]] that shows the constructs that enable the [[Constraint>>doc:Glossary.Constraint.WebHome]] to referenced from a Group in a [[DSD>>doc:sdmx:Glossary.Data structure definition.WebHome]]. 27 27 28 28 [[image:1748248970469-631.png]] 29 29 30 30 **Figure 9: Extract from the SDMX-ML Schema showing reference to Attachment Constraint** 31 31 32 -For the Content (%style="color:#e74c3c" %)Constraint(%%)specific “inheritance” rules apply and these are detailed below.32 +For the Content [[Constraint>>doc:Glossary.Constraint.WebHome]] specific “inheritance” rules apply and these are detailed below. 33 33 34 34 == 8.3 Rules for a Content Constraint == 35 35 36 36 === 8.3.1 Scope of a Content Constraint === 37 37 38 -A Content (%style="color:#e74c3c" %)Constraint(%%)is used specify the content of a data or metadata source in terms of the [[component>>doc:sdmx:Glossary.Component.WebHome]] values or the keys.38 +A Content [[Constraint>>doc:Glossary.Constraint.WebHome]] is used specify the content of a data or metadata source in terms of the [[component>>doc:sdmx:Glossary.Component.WebHome]] values or the keys. 39 39 40 40 In terms of data the [[components>>doc:sdmx:Glossary.Component.WebHome]] are: 41 41 ... ... @@ -56,82 +56,82 @@ 56 56 57 57 The “key” is therefore the combination of the Target Objects that are defined for the Metadata Target. 58 58 59 -For a (%style="color:#e74c3c" %)Constraint(%%)based on a [[DSD>>doc:sdmx:Glossary.Data structure definition.WebHome]] the Content(%style="color:#e74c3c" %)Constraint(%%)can reference one or more of:59 +For a [[Constraint>>doc:Glossary.Constraint.WebHome]] based on a [[DSD>>doc:sdmx:Glossary.Data structure definition.WebHome]] the Content [[Constraint>>doc:Glossary.Constraint.WebHome]] can reference one or more of: 60 60 61 61 * Data Structure Definition 62 62 * [[Dataflow>>doc:sdmx:Glossary.Dataflow.WebHome]] 63 63 * [[Provision Agreement>>doc:sdmx:Glossary.Provision agreement.WebHome]] 64 64 65 -For a (%style="color:#e74c3c" %)Constraint(%%)based on an [[MSD>>doc:sdmx:Glossary.Metadata structure definition.WebHome]] the Content(%style="color:#e74c3c" %)Constraint(%%)can reference one or more of:65 +For a [[Constraint>>doc:Glossary.Constraint.WebHome]] based on an [[MSD>>doc:sdmx:Glossary.Metadata structure definition.WebHome]] the Content [[Constraint>>doc:Glossary.Constraint.WebHome]] can reference one or more of: 66 66 67 67 * [[Metadata Structure Definition>>doc:sdmx:Glossary.Metadata structure definition.WebHome]] 68 68 * [[Metadataflow>>doc:sdmx:Glossary.Metadataflow.WebHome]] 69 69 * [[Provision Agreement>>doc:sdmx:Glossary.Provision agreement.WebHome]] 70 70 71 -Furthermore, there can be more than one Content (%style="color:#e74c3c" %)Constraint(%%)specified for a specific object e.g. more than one(%style="color:#e74c3c" %)Constraint(%%)for a specific [[DSD>>doc:sdmx:Glossary.Data structure definition.WebHome]].71 +Furthermore, there can be more than one Content [[Constraint>>doc:Glossary.Constraint.WebHome]] specified for a specific object e.g. more than one [[Constraint>>doc:Glossary.Constraint.WebHome]] for a specific [[DSD>>doc:sdmx:Glossary.Data structure definition.WebHome]]. 72 72 73 -In view of the flexibility of (%style="color:#e74c3c" %)constraints(%%)attachment, clear rules on their usage are required. These are elaborated below.73 +In view of the flexibility of [[constraints>>doc:Glossary.Constraint.WebHome]] attachment, clear rules on their usage are required. These are elaborated below. 74 74 75 75 === 8.3.2 Multiple Content Constraints === 76 76 77 -There can be many Content (%style="color:#e74c3c" %)Constraints(%%)for any Constrainable [[Artefact>>doc:sdmx:Glossary.Artefact.WebHome]] (e.g. [[DSD>>doc:sdmx:Glossary.Data structure definition.WebHome]]), subject to the following restrictions:77 +There can be many Content [[Constraint>>doc:Glossary.Constraint.WebHome]] for any Constrainable [[Artefact>>doc:sdmx:Glossary.Artefact.WebHome]] (e.g. [[DSD>>doc:sdmx:Glossary.Data structure definition.WebHome]]), subject to the following restrictions: 78 78 79 79 ==== 8.3.2.1 Cube Region ==== 80 80 81 -1. The (%style="color:#e74c3c" %)constraint(%%)can contain multiple [[Member Selections>>doc:sdmx:Glossary.Member selection.WebHome]] (e.g. [[Dimension>>doc:sdmx:Glossary.Dimension.WebHome]]) but:82 -1. A specific [[Member Selection>>doc:sdmx:Glossary.Member selection.WebHome]] (e.g. [[Dimension>>doc:sdmx:Glossary.Dimension.WebHome]] FREQ) can only be contained in one Content (%style="color:#e74c3c" %)Constraint(%%)for any one attached object (e.g. a specific [[DSD>>doc:sdmx:Glossary.Data structure definition.WebHome]] or specific [[Dataflow>>doc:sdmx:Glossary.Dataflow.WebHome]])81 +1. The [[constraint>>doc:Glossary.Constraint.WebHome]] can contain multiple [[Member Selections>>doc:sdmx:Glossary.Member selection.WebHome]] (e.g. [[Dimension>>doc:sdmx:Glossary.Dimension.WebHome]]) but: 82 +1. A specific [[Member Selection>>doc:sdmx:Glossary.Member selection.WebHome]] (e.g. [[Dimension>>doc:sdmx:Glossary.Dimension.WebHome]] FREQ) can only be contained in one Content [[Constraint>>doc:Glossary.Constraint.WebHome]] for any one attached object (e.g. a specific [[DSD>>doc:sdmx:Glossary.Data structure definition.WebHome]] or specific [[Dataflow>>doc:sdmx:Glossary.Dataflow.WebHome]]) 83 83 84 84 ==== 8.3.2.2 Key Set ==== 85 85 86 -Key Sets will be processed in the order they appear in the (%style="color:#e74c3c" %)Constraint(%%)and wildcards can be used (e.g. any key position not reference explicitly is deemed to be “all values”). As the Key Sets can be “included” or “excluded” it is recommended that Key Sets with wildcards are declared before KeySets with specific [[series keys>>doc:sdmx:Glossary.Series key.WebHome]]. This will minimize the risk that keys are inadvertently included or excluded.86 +Key Sets will be processed in the order they appear in the [[Constraint>>doc:Glossary.Constraint.WebHome]] and wildcards can be used (e.g. any key position not reference explicitly is deemed to be “all values”). As the Key Sets can be “included” or “excluded” it is recommended that Key Sets with wildcards are declared before KeySets with specific [[series keys>>doc:sdmx:Glossary.Series key.WebHome]]. This will minimize the risk that keys are inadvertently included or excluded. 87 87 88 88 === 8.3.3 Inheritance of a Content Constraint === 89 89 90 90 ==== 8.3.3.1 Attachment levels of a Content Constraint ==== 91 91 92 -There are three (% style="color:#e74c3c" %)levels(%%)of(% style="color:#e74c3c" %)constraint(%%)attachment for which these inheritance rules apply:92 +There are three levels of constraint attachment for which these inheritance rules apply: 93 93 94 -* [[DSD>>doc:sdmx:Glossary.Data structure definition.WebHome]]/[[MSD>>doc:sdmx:Glossary.Metadata structure definition.WebHome]] – top (% style="color:#e74c3c" %)level95 -** [[Dataflow>>doc:sdmx:Glossary.Dataflow.WebHome]]/[[Metadataflow>>doc:sdmx:Glossary.Metadataflow.WebHome]] – second (% style="color:#e74c3c" %)level96 -*** [[Provision Agreement>>doc:sdmx:Glossary.Provision agreement.WebHome]] – third (% style="color:#e74c3c" %)level94 +* [[DSD>>doc:sdmx:Glossary.Data structure definition.WebHome]]/[[MSD>>doc:sdmx:Glossary.Metadata structure definition.WebHome]] – top level 95 +** [[Dataflow>>doc:sdmx:Glossary.Dataflow.WebHome]]/[[Metadataflow>>doc:sdmx:Glossary.Metadataflow.WebHome]] – second level 96 +*** [[Provision Agreement>>doc:sdmx:Glossary.Provision agreement.WebHome]] – third level 97 97 98 -Note that these rules do not apply to the Simple Datasoucre or Queryable Datasource: the Content (%style="color:#e74c3c" %)Constraint(%%)(s) attached to these [[artefacts>>doc:sdmx:Glossary.Artefact.WebHome]] are resolved for this [[artefact>>doc:sdmx:Glossary.Artefact.WebHome]] only and do not take into account(%style="color:#e74c3c" %)Constraints(%%)attached to other [[artefacts>>doc:sdmx:Glossary.Artefact.WebHome]] (e.g. [[Provision Agreement>>doc:sdmx:Glossary.Provision agreement.WebHome]]. [[Dataflow>>doc:sdmx:Glossary.Dataflow.WebHome]], [[DSD>>doc:sdmx:Glossary.Data structure definition.WebHome]]).98 +Note that these rules do not apply to the Simple Datasoucre or Queryable Datasource: the Content [[Constraint>>doc:Glossary.Constraint.WebHome]](s) attached to these [[artefacts>>doc:sdmx:Glossary.Artefact.WebHome]] are resolved for this [[artefact>>doc:sdmx:Glossary.Artefact.WebHome]] only and do not take into account [[Constraint>>doc:Glossary.Constraint.WebHome]] attached to other [[artefacts>>doc:sdmx:Glossary.Artefact.WebHome]] (e.g. [[Provision Agreement>>doc:sdmx:Glossary.Provision agreement.WebHome]]. [[Dataflow>>doc:sdmx:Glossary.Dataflow.WebHome]], [[DSD>>doc:sdmx:Glossary.Data structure definition.WebHome]]). 99 99 100 -It is not necessary for a Content (%style="color:#e74c3c" %)Constraint(%%)to be attached to higher(% style="color:#e74c3c" %)level(%%)artifact. e.g. it is valid to have a Content(%style="color:#e74c3c" %)Constraint(%%)for a [[Provision Agreement>>doc:sdmx:Glossary.Provision agreement.WebHome]] where there are no(%style="color:#e74c3c" %)constraints(%%)attached the relevant [[dataflow>>doc:sdmx:Glossary.Dataflow.WebHome]] or [[DSD>>doc:sdmx:Glossary.Data structure definition.WebHome]].100 +It is not necessary for a Content [[Constraint>>doc:Glossary.Constraint.WebHome]] to be attached to higher level artifact. e.g. it is valid to have a Content [[Constraint>>doc:Glossary.Constraint.WebHome]] for a [[Provision Agreement>>doc:sdmx:Glossary.Provision agreement.WebHome]] where there are no [[constraints>>doc:Glossary.Constraint.WebHome]] attached the relevant [[dataflow>>doc:sdmx:Glossary.Dataflow.WebHome]] or [[DSD>>doc:sdmx:Glossary.Data structure definition.WebHome]]. 101 101 102 102 ==== 8.3.3.2 Cascade rules for processing Constraints ==== 103 103 104 -The processing of the (%style="color:#e74c3c" %)constraints(%%)on either [[Dataflow>>doc:sdmx:Glossary.Dataflow.WebHome]]/[[Metadataflow>>doc:sdmx:Glossary.Metadataflow.WebHome]] or [[Provision Agreement>>doc:sdmx:Glossary.Provision agreement.WebHome]] must take into account the(%style="color:#e74c3c" %)constraints(%%)declared at higher(% style="color:#e74c3c" %)levels(%%). The rules for the lower(% style="color:#e74c3c" %)level(%%)(%style="color:#e74c3c" %)constraints(%%)(attached to [[Dataflow>>doc:sdmx:Glossary.Dataflow.WebHome]]/ [[Metadataflow>>doc:sdmx:Glossary.Metadataflow.WebHome]] and [[Provision Agreement>>doc:sdmx:Glossary.Provision agreement.WebHome]]) are detailed below.104 +The processing of the [[constraints>>doc:Glossary.Constraint.WebHome]] on either [[Dataflow>>doc:sdmx:Glossary.Dataflow.WebHome]]/[[Metadataflow>>doc:sdmx:Glossary.Metadataflow.WebHome]] or [[Provision Agreement>>doc:sdmx:Glossary.Provision agreement.WebHome]] must take into account the [[constraints>>doc:Glossary.Constraint.WebHome]] declared at higher levels. The rules for the lower level [[constraints>>doc:Glossary.Constraint.WebHome]] (attached to [[Dataflow>>doc:sdmx:Glossary.Dataflow.WebHome]]/ [[Metadataflow>>doc:sdmx:Glossary.Metadataflow.WebHome]] and [[Provision Agreement>>doc:sdmx:Glossary.Provision agreement.WebHome]]) are detailed below. 105 105 106 -Note that there can be a situation where a (%style="color:#e74c3c" %)constraint(%%)is specified at a lower(% style="color:#e74c3c" %)level(%%)before a(%style="color:#e74c3c" %)constraint(%%)is specified at a higher(% style="color:#e74c3c" %)level(%%). Therefore, it is possible that a higher(% style="color:#e74c3c" %)level(%%)(%style="color:#e74c3c" %)constraint(%%)makes a lower(% style="color:#e74c3c" %)level(%%)(%style="color:#e74c3c" %)constraint(%%)invalid. [[SDMX>>doc:sdmx:Glossary.Statistical data and metadata exchange.WebHome]] makes no rules on how such a conflict should be handled when processing the(%style="color:#e74c3c" %)constraint(%%)for attachment. However, the cascade rules on evaluating(%style="color:#e74c3c" %)constraints(%%)for usage are clear - the higher(% style="color:#e74c3c" %)level(%%)(%style="color:#e74c3c" %)constraint(%%)takes precedence in any conflicts that result in a less restrictive specification at the lower(% style="color:#e74c3c" %)level(%%).106 +Note that there can be a situation where a [[constraint>>doc:Glossary.Constraint.WebHome]] is specified at a lower level before a [[constraint>>doc:Glossary.Constraint.WebHome]] is specified at a higher level. Therefore, it is possible that a higher level [[constraint>>doc:Glossary.Constraint.WebHome]] makes a lower level [[constraint>>doc:Glossary.Constraint.WebHome]] invalid. [[SDMX>>doc:sdmx:Glossary.Statistical data and metadata exchange.WebHome]] makes no rules on how such a conflict should be handled when processing the [[constraint>>doc:Glossary.Constraint.WebHome]] for attachment. However, the cascade rules on evaluating [[constraints>>doc:Glossary.Constraint.WebHome]] for usage are clear - the higher level [[constraint>>doc:Glossary.Constraint.WebHome]] takes precedence in any conflicts that result in a less restrictive specification at the lower level. 107 107 108 108 ==== 8.3.3.3 Cube Region ==== 109 109 110 -1. It is not necessary to have a (%style="color:#e74c3c" %)constraint(%%)on the higher(% style="color:#e74c3c" %)level(%%)artifact (e.g. [[DSD>>doc:sdmx:Glossary.Data structure definition.WebHome]] referenced by the [[Dataflow>>doc:sdmx:Glossary.Dataflow.WebHome]]) but if there is such a(%style="color:#e74c3c" %)constraint(%%)at the higher(% style="color:#e74c3c" %)level(%%)(s) then:111 -a. The lower (% style="color:#e74c3c" %)level(%%)(%style="color:#e74c3c" %)constraint(%%)cannot be less restrictive than the(%style="color:#e74c3c" %)constraint(%%)specified for the same [[Member Selection>>doc:sdmx:Glossary.Member selection.WebHome]] (e.g. [[Dimension>>doc:sdmx:Glossary.Dimension.WebHome]]) at the next higher(% style="color:#e74c3c" %)level(%%)which(%style="color:#e74c3c" %)constraints(%%)that [[Member Selection>>doc:sdmx:Glossary.Member selection.WebHome]] (e.g. if the [[Dimension>>doc:sdmx:Glossary.Dimension.WebHome]] FREQ is constrained to A, Q in a [[DSD>>doc:sdmx:Glossary.Data structure definition.WebHome]] then the(%style="color:#e74c3c" %)constraint(%%)at the [[Dataflow>>doc:sdmx:Glossary.Dataflow.WebHome]] or [[Provision Agreement>>doc:sdmx:Glossary.Provision agreement.WebHome]] cannot be A, Q, M or even just M – it can only further constrain A,Q).112 -b. The (%style="color:#e74c3c" %)constraint(%%)at the lower(% style="color:#e74c3c" %)level(%%)for any one [[Member Selection>>doc:sdmx:Glossary.Member selection.WebHome]] further constrains the content for the same [[Member Selection>>doc:sdmx:Glossary.Member selection.WebHome]] at the higher(% style="color:#e74c3c" %)level(%%)(s).113 -1. Any [[Member Selection>>doc:sdmx:Glossary.Member selection.WebHome]] which is not referenced in a Content (%style="color:#e74c3c" %)Constraint(%%)is deemed to be constrained according to the Content(%style="color:#e74c3c" %)Constraint(%%)specified at the next higher(% style="color:#e74c3c" %)level(%%)which(%style="color:#e74c3c" %)constraints(%%)that [[Member Selection>>doc:sdmx:Glossary.Member selection.WebHome]].114 -1. If there is a conflict when resolving the (%style="color:#e74c3c" %)constraint(%%)in terms of a lower-(% style="color:#e74c3c" %)level(%%)(%style="color:#e74c3c" %)constraint(%%)being less restrictive than a higher-(% style="color:#e74c3c" %)level(%%)(%style="color:#e74c3c" %)constraint(%%)then the(%style="color:#e74c3c" %)constraint(%%)at the higher-(% style="color:#e74c3c" %)level(%%)is used.110 +1. It is not necessary to have a [[constraint>>doc:Glossary.Constraint.WebHome]] on the higher level artifact (e.g. [[DSD>>doc:sdmx:Glossary.Data structure definition.WebHome]] referenced by the [[Dataflow>>doc:sdmx:Glossary.Dataflow.WebHome]]) but if there is such a [[constraint>>doc:Glossary.Constraint.WebHome]] at the higher level(s) then: 111 +a. The lower level [[constraint>>doc:Glossary.Constraint.WebHome]] cannot be less restrictive than the [[constraint>>doc:Glossary.Constraint.WebHome]] specified for the same [[Member Selection>>doc:sdmx:Glossary.Member selection.WebHome]] (e.g. [[Dimension>>doc:sdmx:Glossary.Dimension.WebHome]]) at the next higher level which [[constraint>>doc:Glossary.Constraint.WebHome]] that [[Member Selection>>doc:sdmx:Glossary.Member selection.WebHome]] (e.g. if the [[Dimension>>doc:sdmx:Glossary.Dimension.WebHome]] FREQ is constrained to A, Q in a [[DSD>>doc:sdmx:Glossary.Data structure definition.WebHome]] then the [[constraint>>doc:Glossary.Constraint.WebHome]] at the [[Dataflow>>doc:sdmx:Glossary.Dataflow.WebHome]] or [[Provision Agreement>>doc:sdmx:Glossary.Provision agreement.WebHome]] cannot be A, Q, M or even just M – it can only further constrain A,Q). 112 +b. The [[constraint>>doc:Glossary.Constraint.WebHome]] at the lower level for any one [[Member Selection>>doc:sdmx:Glossary.Member selection.WebHome]] further constrains the content for the same [[Member Selection>>doc:sdmx:Glossary.Member selection.WebHome]] at the higher level(s). 113 +1. Any [[Member Selection>>doc:sdmx:Glossary.Member selection.WebHome]] which is not referenced in a Content [[Constraint>>doc:Glossary.Constraint.WebHome]] is deemed to be constrained according to the Content [[Constraint>>doc:Glossary.Constraint.WebHome]] specified at the next higher level which [[constraint>>doc:Glossary.Constraint.WebHome]] that [[Member Selection>>doc:sdmx:Glossary.Member selection.WebHome]]. 114 +1. If there is a conflict when resolving the [[constraint>>doc:Glossary.Constraint.WebHome]] in terms of a lower-level [[constraint>>doc:Glossary.Constraint.WebHome]] being less restrictive than a higher-level [[constraint>>doc:Glossary.Constraint.WebHome]] then the [[constraint>>doc:Glossary.Constraint.WebHome]] at the higher-level is used. 115 115 116 -Note that it is possible for a Content (%style="color:#e74c3c" %)Constraint(%%)at a higher(% style="color:#e74c3c" %)level(%%)to constrain, say, four [[Dimensions>>doc:sdmx:Glossary.Dimension.WebHome]] in a single(%style="color:#e74c3c" %)constraint(%%), and a Content(%style="color:#e74c3c" %)Constraint(%%)at a lower(% style="color:#e74c3c" %)level(%%)to constrain the same four in two, three, or four Content(%style="color:#e74c3c" %)Constraints(%%).116 +Note that it is possible for a Content [[Constraint>>doc:Glossary.Constraint.WebHome]] at a higher level to constrain, say, four [[Dimensions>>doc:sdmx:Glossary.Dimension.WebHome]] in a single [[constraint>>doc:Glossary.Constraint.WebHome]], and a Content [[Constraint>>doc:Glossary.Constraint.WebHome]] at a lower level to constrain the same four in two, three, or four Content [[Constraint>>doc:Glossary.Constraint.WebHome]]. 117 117 118 118 ==== 8.3.3.4 Key Set ==== 119 119 120 -1. It is not necessary to have a (%style="color:#e74c3c" %)constraint(%%)on the higher(% style="color:#e74c3c" %)level(%%)[[artefact>>doc:sdmx:Glossary.Artefact.WebHome]] (e.g. [[DSD>>doc:sdmx:Glossary.Data structure definition.WebHome]] referenced by the [[Dataflow>>doc:sdmx:Glossary.Dataflow.WebHome]]) but if there is such a(%style="color:#e74c3c" %)constraint(%%)at the higher(% style="color:#e74c3c" %)level(%%)(s) then:121 -a. The lower (% style="color:#e74c3c" %)level(%%)(%style="color:#e74c3c" %)constraint(%%)cannot be less restrictive than the(%style="color:#e74c3c" %)constraint(%%)specified at the higher(% style="color:#e74c3c" %)level(%%).122 -b. The (%style="color:#e74c3c" %)constraint(%%)at the lower(% style="color:#e74c3c" %)level(%%)for any one [[Member Selection>>doc:sdmx:Glossary.Member selection.WebHome]] further constrains the keys specified at the higher(% style="color:#e74c3c" %)level(%%)(s).123 -1. Any [[Member Selection>>doc:sdmx:Glossary.Member selection.WebHome]] which is not referenced in a Content (%style="color:#e74c3c" %)Constraint(%%)is deemed to be constrained according to the Content(%style="color:#e74c3c" %)Constraint(%%)specified at the next higher(% style="color:#e74c3c" %)level(%%)which(%style="color:#e74c3c" %)constraints(%%)that [[Member Selection>>doc:sdmx:Glossary.Member selection.WebHome]].124 -1. If there is a conflict when resolving the keys in the (%style="color:#e74c3c" %)constraint(%%)at two(% style="color:#e74c3c" %)levels(%%), in terms of a lower-(% style="color:#e74c3c" %)level(%%)(%style="color:#e74c3c" %)constraint(%%)being less restrictive than a higher-(% style="color:#e74c3c" %)level(%%)(%style="color:#e74c3c" %)constraint(%%), then the offending keys specified at the lower(% style="color:#e74c3c" %)level(%%)are not deemed part of the(%style="color:#e74c3c" %)constraint(%%).120 +1. It is not necessary to have a [[constraint>>doc:Glossary.Constraint.WebHome]] on the higher level [[artefact>>doc:sdmx:Glossary.Artefact.WebHome]] (e.g. [[DSD>>doc:sdmx:Glossary.Data structure definition.WebHome]] referenced by the [[Dataflow>>doc:sdmx:Glossary.Dataflow.WebHome]]) but if there is such a [[constraint>>doc:Glossary.Constraint.WebHome]] at the higher level(s) then: 121 +a. The lower level [[constraint>>doc:Glossary.Constraint.WebHome]] cannot be less restrictive than the [[constraint>>doc:Glossary.Constraint.WebHome]] specified at the higher level. 122 +b. The [[constraint>>doc:Glossary.Constraint.WebHome]] at the lower level for any one [[Member Selection>>doc:sdmx:Glossary.Member selection.WebHome]] further constrains the keys specified at the higher level(s). 123 +1. Any [[Member Selection>>doc:sdmx:Glossary.Member selection.WebHome]] which is not referenced in a Content [[Constraint>>doc:Glossary.Constraint.WebHome]] is deemed to be constrained according to the Content [[Constraint>>doc:Glossary.Constraint.WebHome]] specified at the next higher level which [[constraints>>doc:Glossary.Constraint.WebHome]] that [[Member Selection>>doc:sdmx:Glossary.Member selection.WebHome]]. 124 +1. If there is a conflict when resolving the keys in the [[constraint>>doc:Glossary.Constraint.WebHome]] at two levels, in terms of a lower-level [[constraint>>doc:Glossary.Constraint.WebHome]] being less restrictive than a higher-level [[constraint>>doc:Glossary.Constraint.WebHome]], then the offending keys specified at the lower level are not deemed part of the [[constraint>>doc:Glossary.Constraint.WebHome]]. 125 125 126 -Note that a Key in a Key Set can have wildcarded [[Components>>doc:sdmx:Glossary.Component.WebHome]]. For instance the (%style="color:#e74c3c" %)constraint(%%)may simply constrain the [[Dimension>>doc:sdmx:Glossary.Dimension.WebHome]] FREQ to “A”, and all keys where the FREQ=A are therefore valid.126 +Note that a Key in a Key Set can have wildcarded [[Components>>doc:sdmx:Glossary.Component.WebHome]]. For instance the [[constraint>>doc:Glossary.Constraint.WebHome]] may simply constrain the [[Dimension>>doc:sdmx:Glossary.Dimension.WebHome]] FREQ to “A”, and all keys where the FREQ=A are therefore valid. 127 127 128 128 The following logic explains how the inheritance mechanism works. Note that this is conceptual logic and actual systems may differ in the way this is implemented. 129 129 130 -1. Determine all possible keys that are valid at the higher (% style="color:#e74c3c" %)level(%%).131 -1. These keys are deemed to be inherited by the lower (% style="color:#e74c3c" %)level(%%)constrained object, subject to the(%style="color:#e74c3c" %)constraints(%%)specified at the lower(% style="color:#e74c3c" %)level(%%).132 -1. Determine all possible keys that are possible using the (%style="color:#e74c3c" %)constraints(%%)specified at the lower(% style="color:#e74c3c" %)level(%%).133 -1. At the lower (% style="color:#e74c3c" %)level(%%)inherit all keys that match with the higher(% style="color:#e74c3c" %)level(%%)(%style="color:#e74c3c" %)constraint(%%).134 -1. If there are keys in the lower (% style="color:#e74c3c" %)level(%%)(%style="color:#e74c3c" %)constraint(%%)that are not inherited then the key is invalid (i.e. it is less restrictive).130 +1. Determine all possible keys that are valid at the higher level. 131 +1. These keys are deemed to be inherited by the lower level constrained object, subject to the [[constraints>>doc:Glossary.Constraint.WebHome]] specified at the lower level. 132 +1. Determine all possible keys that are possible using the [[constraints>>doc:Glossary.Constraint.WebHome]] specified at the lower level. 133 +1. At the lower level inherit all keys that match with the higher level [[constraint>>doc:Glossary.Constraint.WebHome]]. 134 +1. If there are keys in the lower level [[constraint>>doc:Glossary.Constraint.WebHome]] that are not inherited then the key is invalid (i.e. it is less restrictive). 135 135 136 136 === 8.3.4 Constraints Examples === 137 137 ... ... @@ -146,13 +146,13 @@ 146 146 * [[AGE>>doc:sdmx:Glossary.Age.WebHome]] – [[Age>>doc:sdmx:Glossary.Age.WebHome]] 147 147 * CAS – Current Activity Status 148 148 149 -In the [[DSD>>doc:sdmx:Glossary.Data structure definition.WebHome]] common [[code lists>>doc:sdmx:Glossary.Code list.WebHome]] are used and the requirement is to restrict these at various (% style="color:#e74c3c" %)levels(%%)to specify the actual [[code>>doc:sdmx:Glossary.Code.WebHome]] that are valid for the object to which the Content(%style="color:#e74c3c" %)Constraint(%%)is attached.149 +In the [[DSD>>doc:sdmx:Glossary.Data structure definition.WebHome]] common [[code lists>>doc:sdmx:Glossary.Code list.WebHome]] are used and the requirement is to restrict these at various levels to specify the actual [[code>>doc:sdmx:Glossary.Code.WebHome]] that are valid for the object to which the Content [[Constraint>>doc:Glossary.Constraint.WebHome]] is attached. 150 150 151 151 [[image:1748249001970-773.png]] 152 152 153 153 **Figure 10: Example Scenario for Constraints** 154 154 155 - (%style="color:#e74c3c" %)Constraints(%%)are declared as follows:155 +[[Constraints>>doc:Glossary.Constraint.WebHome]] are declared as follows: 156 156 157 157 [[image:1748249024975-276.png]] 158 158 ... ... @@ -161,7 +161,7 @@ 161 161 **Notes:** 162 162 163 163 1. [[AGE>>doc:sdmx:Glossary.Age.WebHome]] is constrained for the [[DSD>>doc:sdmx:Glossary.Data structure definition.WebHome]] and is further restricted for the [[Dataflow>>doc:sdmx:Glossary.Dataflow.WebHome]] CENSUS_CUBE1. 164 -1. The same (%style="color:#e74c3c" %)Constraint(%%)applies to both Provision Agreements.164 +1. The same [[Constraint>>doc:Glossary.Constraint.WebHome]] applies to both Provision Agreements. 165 165 166 166 The cascade rules elaborated above result as follows: 167 167 ... ... @@ -171,26 +171,26 @@ 171 171 172 172 __Dataflow CENSUS_CUBE1__ 173 173 174 -1. Constrained by restricting the [[code list>>doc:sdmx:Glossary.Code list.WebHome]] for the [[AGE>>doc:sdmx:Glossary.Age.WebHome]] [[Dimension>>doc:sdmx:Glossary.Dimension.WebHome]] to [[codes>>doc:sdmx:Glossary.Code.WebHome]] 002 and 003(note that this is a more restrictive (%style="color:#e74c3c" %)constraint(%%)than that declared for the [[DSD>>doc:sdmx:Glossary.Data structure definition.WebHome]] which specifies all [[codes>>doc:sdmx:Glossary.Code.WebHome]] except [[code>>doc:sdmx:Glossary.Code.WebHome]] 001).174 +1. Constrained by restricting the [[code list>>doc:sdmx:Glossary.Code list.WebHome]] for the [[AGE>>doc:sdmx:Glossary.Age.WebHome]] [[Dimension>>doc:sdmx:Glossary.Dimension.WebHome]] to [[codes>>doc:sdmx:Glossary.Code.WebHome]] 002 and 003(note that this is a more restrictive [[constraint>>doc:Glossary.Constraint.WebHome]] than that declared for the [[DSD>>doc:sdmx:Glossary.Data structure definition.WebHome]] which specifies all [[codes>>doc:sdmx:Glossary.Code.WebHome]] except [[code>>doc:sdmx:Glossary.Code.WebHome]] 001). 175 175 1. Restricts the CAS [[codes>>doc:sdmx:Glossary.Code.WebHome]] to 003 and 004. 176 176 177 177 __Dataflow CENSUS_CUBE2__ 178 178 179 179 1. Restricts the [[code list>>doc:sdmx:Glossary.Code list.WebHome]] for the CAS [[Dimension>>doc:sdmx:Glossary.Dimension.WebHome]] to [[codes>>doc:sdmx:Glossary.Code.WebHome]] TOT and NAP. 180 -1. Inherits the [[AGE>>doc:sdmx:Glossary.Age.WebHome]] (%style="color:#e74c3c" %)constraint(%%)applied at the(% style="color:#e74c3c" %)level(%%)of the [[DSD>>doc:sdmx:Glossary.Data structure definition.WebHome]].180 +1. Inherits the [[AGE>>doc:sdmx:Glossary.Age.WebHome]] [[constraint>>doc:Glossary.Constraint.WebHome]] applied at the level of the [[DSD>>doc:sdmx:Glossary.Data structure definition.WebHome]]. 181 181 182 182 __Provision Agreements CENSUS_CUBE1_IT__ 183 183 184 184 1. Restricts the [[codes>>doc:sdmx:Glossary.Code.WebHome]] for the GEO [[Dimension>>doc:sdmx:Glossary.Dimension.WebHome]] to IT and its children. 185 -1. Inherits the (%style="color:#e74c3c" %)constraints(%%)from [[Dataflow>>doc:sdmx:Glossary.Dataflow.WebHome]] CENSUS_CUBE1 for the [[AGE>>doc:sdmx:Glossary.Age.WebHome]] and CAS [[Dimensions>>doc:sdmx:Glossary.Dimension.WebHome]].185 +1. Inherits the [[constraints>>doc:Glossary.Constraint.WebHome]] from [[Dataflow>>doc:sdmx:Glossary.Dataflow.WebHome]] CENSUS_CUBE1 for the [[AGE>>doc:sdmx:Glossary.Age.WebHome]] and CAS [[Dimensions>>doc:sdmx:Glossary.Dimension.WebHome]]. 186 186 187 187 __Provision Agreements CENSUS_CUBE2_IT__ 188 188 189 189 1. Restricts the [[codes>>doc:sdmx:Glossary.Code.WebHome]] for the GEO [[Dimension>>doc:sdmx:Glossary.Dimension.WebHome]] to IT and its children. 190 -1. Inherits the (%style="color:#e74c3c" %)constraints(%%)from [[Dataflow>>doc:sdmx:Glossary.Dataflow.WebHome]] CENSUS_CUBE2 for the CAS [[Dimension>>doc:sdmx:Glossary.Dimension.WebHome]].191 -1. Inherits the [[AGE>>doc:sdmx:Glossary.Age.WebHome]] (%style="color:#e74c3c" %)constraint(%%)applied at the (% style="color:#e74c3c" %)level(%%) of the [[DSD>>doc:sdmx:Glossary.Data structure definition.WebHome]].190 +1. Inherits the [[constraints>>doc:Glossary.Constraint.WebHome]] from [[Dataflow>>doc:sdmx:Glossary.Dataflow.WebHome]] CENSUS_CUBE2 for the CAS [[Dimension>>doc:sdmx:Glossary.Dimension.WebHome]]. 191 +1. Inherits the [[AGE>>doc:sdmx:Glossary.Age.WebHome]] [[constraint>>doc:Glossary.Constraint.WebHome]] applied at the (% style="color:#e74c3c" %)level(%%) of the [[DSD>>doc:sdmx:Glossary.Data structure definition.WebHome]]. 192 192 193 -The (%style="color:#e74c3c" %)constraints(%%)are defined as follows:193 +The [[constraints>>doc:Glossary.Constraint.WebHome]] are defined as follows: 194 194 195 195 __DSD Constraint__ 196 196