<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div>Two in one:</div><br><div><div>On 8 May,2014, at 8:25 , Matthias Wessendorf &lt;<a href="mailto:mwessendorf@gmail.com">mwessendorf@gmail.com</a>&gt; wrote:</div><br><blockquote type="cite"><div dir="ltr" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; position: static; z-index: auto;"><div style="word-wrap: break-word;"><div><div><br></div></div><div>This query will give the total number of installations for each variant, but only for android. So what I would like to suggest it to simplify the data model and only have a relation with variants instead of one per type this will also make the data model more extendable (when a new device type is introduced the data model doesn’t have to change). If grouping of these variants is needed clients will need to do it themselves.</div></div></blockquote><div><br></div><div>that would still allow us to say "Android-free variant has 10000 installations; iPad variant has 5000 installations", right ?&nbsp;</div><div><br></div></div></div></div></blockquote><br></div><div>Right, but do it in one query instead of x and have a more flexible data model at the same time.</div><div><br></div><div>On 7 May,2014, Karel Piwko wrote:</div><div><br></div><blockquote type="cite">I think it is a good idea to simplify underlying model. Could we&nbsp;<br>additionally provide SQL views that groups only one variant and expose it<br><div>via REST point?&nbsp;</div></blockquote><br><div>Right I would like to keep the REST endpoint the same as this is our interface. Don’t know if we should base the grouping on views as we should support multiple databases, and like you said don’t know if this can be done for H2, for now let’s keep it simple and just do a `group by` query?</div><div><br></div><div>&nbsp;Cheers,</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>Erik Jan</div></body></html>