Cardinality of qb:AttributeProperties

16 views
Skip to first unread message

Jindřich Mynarz

unread,
Sep 22, 2015, 10:23:22 AM9/22/15
to publishing-st...@googlegroups.com
Hi,

does the Data Cube Vocabulary specify cardinality of qb:AttributeProperties? I reviewed the specification and googled around, but I haven't found an answer. I assume it is 0..1 (depending on qb:componentRequired), but I'm wondering if having more than one object per attribute property (i.e. 0..n) would be invalid.

By the way, I assume that qb:DimensionProperties and qb:MeasureProperties have a expect a strict 1..1 cardinality, but I also haven't found that documented.

Best,

Jindřich

-- 
Jindřich Mynarz

Dave Reynolds

unread,
Sep 22, 2015, 6:16:28 PM9/22/15
to publishing-st...@googlegroups.com
Hi Jindřich,

There's no formal constraint on cardinalities in either the vocabulary
or the spec for attributes, so multi-valued attributes are fine.

You are required to have at least one value for every dimension and
every measure [1] on an observation but there's actually no formal
constraint stopping you having multiple values.

I'm not sure this is a good thing. No semantics is given for cases where
there are multiple values for a dimension or measure on an observation.
I would also bet that most cube visualization software is expecting
single values. I suspect there ought to be integrity constraints to
enforce max cardinality 1, but there aren't (unless I'm missing something).

Dave

[1] OK, that's slightly simplified. There's all the messing about with
measure dimension cubes - in that case every observation is limited to
having a single value for the measure dimension and all the measures
have to be present on observations across the cube for a given dimension
value set.
> --
> You received this message because you are subscribed to the Google
> Groups "Publishing Statistical Data" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to publishing-statisti...@googlegroups.com
> <mailto:publishing-statisti...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.

Jindřich Mynarz

unread,
Sep 23, 2015, 3:49:23 AM9/23/15
to publishing-st...@googlegroups.com
Hi Dave,

thanks for providing your insight. I'll try to sum up how I understood you and you can correct me if I got it wrong.

- Cardinality of qb:AttributeProperties is 0..n (or 1..n, depending of qb:componentRequired) and it's fine to provide multiple values.
- Cardinality of qb:DimensionProperties and qb:MeasureProperties is 1..n, but it's strongly recommended to use them as if their cardinality was 1..1.

- Jindřich

-- 
Jindřich Mynarz
To unsubscribe from this group and stop receiving emails from it, send an email to publishing-statisti...@googlegroups.com.

Sarven Capadisli

unread,
Sep 23, 2015, 4:03:00 AM9/23/15
to publishing-st...@googlegroups.com
> --
> You received this message because you are subscribed to the Google
> Groups "Publishing Statistical Data" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to publishing-statisti...@googlegroups.com
> <mailto:publishing-statisti...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.

I think the cardinality of qb:AttributeProperty in QB ("version 1")
comes up occasionally. (You last touched on it in your 2015-05-17 email.
Reminder my reply:
https://groups.google.com/d/msg/publishing-statistical-data/0ITUraicgtw/G9YgJUIuwYgJ
).

The current QB qb:AttributeProperty works like in SDMX 2.0. Multiple
attributes are allowed, however it creates a mess since (AFAIK!) there
is no clear way to problematically figure out which measure(s) the
attribute(s) should go with.

SDMX 2.1 resolves this by making that association explicit. QB "version
2" needs to mimic that.

Aside: SDMX data publishers are slowly transitioning to SDMX 2.1.

-Sarven
http://csarven.ca/#i

Dave Reynolds

unread,
Sep 23, 2015, 4:15:17 AM9/23/15
to publishing-st...@googlegroups.com
Hi Jindřich,

Yes that's an accurate summary of my understanding.

As Sarven indicates, the interpretation of multiple attribute values is
undefined. If they are intended to refer to different measures then, at
present, there's no way to disentangle which attribute refers to which
measure. However, if you have an attribute for which multiple values
does make sense then there's nothing stopping you using it.

Dave
> <mailto:publishing-statistical-data%2Bunsu...@googlegroups.com>
> <mailto:publishing-statisti...@googlegroups.com
> <mailto:publishing-statistical-data%2Bunsu...@googlegroups.com>>.
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Publishing Statistical Data" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to
> publishing-statisti...@googlegroups.com
> <mailto:publishing-statistical-data%2Bunsu...@googlegroups.com>.

Jindřich Mynarz

unread,
Sep 23, 2015, 5:00:03 AM9/23/15
to publishing-st...@googlegroups.com
I think that the default interpretation is the following: if you have a multi-valued qb:AttributeProperty and multiple measures, then all the values qualify all the measures.

If there is a need to link attribute values to measures explicitly, then I think it's better not to use the multi-measure approach and instead split the measures into multiple qb:Observations.

- Jindřich

To unsubscribe from this group and stop receiving emails from it, send an email to publishing-statisti...@googlegroups.com.

Dave Reynolds

unread,
Sep 23, 2015, 5:09:37 AM9/23/15
to publishing-st...@googlegroups.com
n 23/09/15 09:59, Jindřich Mynarz wrote:
> I think that the default interpretation is the following: if you have a
> multi-valued qb:AttributeProperty and multiple measures, then all the
> values qualify all the measures.
>
> If there is a need to link attribute values to measures explicitly, then
> I think it's better not to use the multi-measure approach and instead
> split the measures into multiple qb:Observations.

Agreed.

Dave

> - Jindřich
>
> On Wed, Sep 23, 2015 at 10:15 AM, Dave Reynolds
> <mailto:dave.e....@gmail.com
> <mailto:publishing-statistical-data%2Bunsu...@googlegroups.com
> <mailto:publishing-statistical-data%252Buns...@googlegroups.com>>
>
> <mailto:publishing-statisti...@googlegroups.com
> <mailto:publishing-statistical-data%2Bunsu...@googlegroups.com>
>
> <mailto:publishing-statistical-data%2Bunsu...@googlegroups.com
> <mailto:publishing-statistical-data%252Buns...@googlegroups.com>>>.
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to the
> Google
> Groups "Publishing Statistical Data" group.
> To unsubscribe from this group and stop receiving emails
> from it,
> send an email to
> publishing-statisti...@googlegroups.com
> <mailto:publishing-statistical-data%2Bunsu...@googlegroups.com>
>
> <mailto:publishing-statistical-data%2Bunsu...@googlegroups.com
> <mailto:publishing-statistical-data%252Buns...@googlegroups.com>>.
Reply all
Reply to author
Forward
0 new messages