Skip to content

Commit

Permalink
MONDRIAN: Document defaultMember attribute of Hierarchy element.
Browse files Browse the repository at this point in the history
[git-p4: depot-paths = "//open/mondrian/": change = 7347]
  • Loading branch information
julianhyde committed Aug 7, 2006
1 parent 0d75e01 commit 611b403
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 38 deletions.
28 changes: 27 additions & 1 deletion doc/schema.html
Expand Up @@ -21,7 +21,7 @@
</head>
<body>
<h1>How to Design a Mondrian Schema</h1>
<p>By Julian Hyde and others; last updated May, 2006.</p>
<p>By Julian Hyde and others; last updated August, 2006.</p>
<hr color="#000000" noshade="noshade" size="1">
<h2>Contents</h2>
<ol>
Expand All @@ -37,6 +37,7 @@ <h2>Contents</h2>
<li><a href="#Mapping_Hierarchies">Mapping dimensions and
hierarchies onto tables</a></li>
<li><a href="#The_all_member">The 'All' member</a></li>
<li><a href="#Default_member">Default member</a></li>
<li><a href="#Time_dimensions">Time dimensions</a></li>
<li><a href="#Level_Order_and_Display">Order and Display of
Levels</a></li>
Expand Down Expand Up @@ -415,6 +416,31 @@ <h4><a name="The_all_member">The 'all' member</a></h4>
the hierarchy. Changing the default member can be confusing, so you
should generally use <code>
hasAll="true"</code>.</p>
<h4><a name="Default_member">Default member</a></h4>
<p>Every hierarchy has a default member. This is the member which is used in the
evaluation context if the hierarchy is not explicitly mentioned in a query. If
the hierarchy has an 'all' member, then this is the default; otherwise, the
default member is the first member of the first level. For example, in the
FoodMart schema, the default member of the <code>[Time]</code> dimension is
<code>[Time].[1997]</code>, because 1997 is the first year for which there is
data in the dimension table.</p>
<p>A different default member can be specified in the hierarchy definition:</p>
<blockquote>
<p><code>&lt;<a href="#XML_Dimension">Dimension</a> name=&quot;Status" foreignKey="issue_status"&gt;<br> &nbsp; &lt;<a
href="#XML_Hierarchy">Hierarchy</a> hasAll="true" primaryKey="id"&gt;<br> &nbsp;&nbsp;&nbsp; &lt;<a
href="#XML_Table">Table</a> name="status_codes" /&gt;<br> &nbsp;&nbsp;&nbsp; &lt;<a
href="#XML_Level">Level</a> name=&quot;Code" column=&quot;id" nameColumn=&quot;name&quot; <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; uniqueMembers="true" defaultMember=&quot;[Status
code].[Open]&quot; /&gt;<br> &nbsp; &lt;/<a
href="#XML_Hierarchy">Hierarchy</a>&gt;<br>&lt;/<a
href="#XML_Dimension">Dimension</a>&gt;</code></p>
</blockquote>
<p>Real-world applications often have a requirement to report on the current
time period. Clearly, one way of doing this is to change the default member of
the time dimension. But a better way is use a <a href="#Schema_parameters">
schema parameter</a> for the current time period; then you can leave the default
time member as <code>[Time].[(All time)]</code> for those reports that want to
look at historical data.</p>
<h4><a name="Time_dimensions">Time dimensions</a></h4>
<p>Time dimensions based on year/month/week/day are coded differently
in the Mondrian schema due to the MDX time related functions such as:</p>
Expand Down
74 changes: 37 additions & 37 deletions doc/stylesheet.css
Expand Up @@ -30,31 +30,31 @@ a.nav:link {
text-decoration: none;
font-size: 12px;
line-height: 14px;
font-family: verdana, arial, helvetica, sans-serif;
font-family: Verdana, arial, helvetica, sans-serif;
}

a.nav:visited {
color: #990000;
text-decoration: none;
font-size: 12px;
line-height: 14px;
font-family: verdana, arial, helvetica, sans-serif;
font-family: Verdana, arial, helvetica, sans-serif;
}

a.body:link {
color: #990000;
text-decoration: none;
font-size: 12px;
line-height: 14px;
font-family: verdana, arial, helvetica, sans-serif;
font-family: Verdana, arial, helvetica, sans-serif;
}

a.body:visited {
color: #990000;
text-decoration: none;
font-size: 12px;
line-height: 14px;
font-family: verdana, arial, helvetica, sans-serif;
font-family: Verdana, arial, helvetica, sans-serif;
}

a.purple:link {
Expand All @@ -64,7 +64,7 @@ a.purple:link {
font-size: x-small;
font-style: normal;
font-weight: normal;
font-family: verdana, arial, helvetica, sans-serif;
font-family: Verdana, arial, helvetica, sans-serif;
}

a.purple:visited {
Expand All @@ -74,23 +74,23 @@ a.purple:visited {
font-size: x-small;
font-style: normal;
font-weight: normal;
font-family: verdana, arial, helvetica, sans-serif;
font-family: Verdana, arial, helvetica, sans-serif;
}

a.td:link {
color: #990000;
text-decoration: none;
font-size: 10px;
line-height: 12px;
font-family: verdana, arial, helvetica, sans-serif;
font-family: Verdana, arial, helvetica, sans-serif;
}

a.td:visited {
color: #990000;
text-decoration: none;
font-size: 10px;
line-height: 12px;
font-family: verdana, arial, helvetica, sans-serif;
font-family: Verdana, arial, helvetica, sans-serif;
}

a.subnav:link {
Expand All @@ -99,7 +99,7 @@ a.subnav:link {
font-size: 12px;
font-weight: bold;
line-height: 14px;
font-family: verdana, arial, helvetica, sans-serif;
font-family: Verdana, arial, helvetica, sans-serif;
}

a.subnav:visited {
Expand All @@ -108,31 +108,31 @@ a.subnav:visited {
font-size: 12px;
font-weight: bold;
line-height: 14px;
font-family: verdana, arial, helvetica, sans-serif;
font-family: Verdana, arial, helvetica, sans-serif;
}

dl {
color: #333333;
text-decoration: none;
font-size: 12px;
line-height: 14px;
font-family: verdana, arial, helvetica, sans-serif;
font-family: Verdana, arial, helvetica, sans-serif;
}

dt {
color: #333333;
text-decoration: none;
font-size: 12px;
line-height: 14px;
font-family: verdana, arial, helvetica, sans-serif;
font-family: Verdana, arial, helvetica, sans-serif;
}

dd {
color: #333333;
text-decoration: none;
font-size: 12px;
line-height: 14px;
font-family: verdana, arial, helvetica, sans-serif;
font-family: Verdana, arial, helvetica, sans-serif;
}

table.clsStd {
Expand All @@ -149,15 +149,15 @@ td.content {
text-decoration: none;
font-size: 12px;
line-height: 14px;
font-family: verdana, arial, helvetica, sans-serif;
font-family: Verdana, arial, helvetica, sans-serif;
}

td.collcontent {
color: #000000;
text-decoration: none;
font-size: 10px;
line-height: 12px;
font-family: verdana, arial, helvetica, sans-serif;
font-family: Verdana, arial, helvetica, sans-serif;
}

span.subtitle1 {
Expand All @@ -166,7 +166,7 @@ span.subtitle1 {
font-size: 16px;
font-weight: bold;
line-height: 18px;
font-family: verdana, arial, helvetica, sans-serif;
font-family: Verdana, arial, helvetica, sans-serif;
}

span.subtitle2 {
Expand All @@ -175,7 +175,7 @@ span.subtitle2 {
font-size: 16px;
font-weight: bold;
line-height: 18px;
font-family: verdana, arial, helvetica, sans-serif;
font-family: Verdana, arial, helvetica, sans-serif;
}

span.subtitle3 {
Expand All @@ -184,7 +184,7 @@ span.subtitle3 {
font-size: 12px;
font-weight: bold;
line-height: 14px;
font-family: verdana, arial, helvetica, sans-serif;
font-family: Verdana, arial, helvetica, sans-serif;
}

span.subtitle4 {
Expand All @@ -193,7 +193,7 @@ span.subtitle4 {
font-size: 10px;
font-weight: bold;
line-height: 12px;
font-family: verdana, arial, helvetica, sans-serif;
font-family: Verdana, arial, helvetica, sans-serif;
}

span.subtitle5 {
Expand All @@ -202,7 +202,7 @@ span.subtitle5 {
font-size: 12px;
font-weight: bold;
line-height: 14px;
font-family: verdana, arial, helvetica, sans-serif;
font-family: Verdana, arial, helvetica, sans-serif;
}

span.colldate {
Expand All @@ -211,7 +211,7 @@ span.colldate {
font-size: 10px;
font-style: oblique;
line-height: 12px;
font-family: verdana, arial, helvetica, sans-serif;
font-family: Verdana, arial, helvetica, sans-serif;
}

span.highlight {
Expand All @@ -223,119 +223,119 @@ textarea {
text-decoration: none;
font-size: 12px;
line-height: 14px;
font-family: verdana, arial, helvetica, sans-serif;
font-family: Verdana, arial, helvetica, sans-serif;
}

p, td, th {
color: #333333;
text-decoration: none;
font-size: 12px;
line-height: 14px;
font-family: verdana, arial, helvetica, sans-serif;
font-family: Verdana, arial, helvetica, sans-serif;
}

p.award {
color: #333333;
text-decoration: none;
font-size: 10px;
line-height: 12px;
font-family: verdana, arial, helvetica, sans-serif;
font-family: Verdana, arial, helvetica, sans-serif;
}

p.coll {
color: #333333;
text-decoration: none;
font-size: 10px;
line-height: 12px;
font-family: verdana, arial, helvetica, sans-serif;
font-family: Verdana, arial, helvetica, sans-serif;
}

h1 {
color: #990000;
text-decoration: bold;
font-size: 24px;
line-height: 18px;
font-family: verdana, arial, helvetica, sans-serif;
font-family: Verdana, arial, helvetica, sans-serif;
}

h2 {
color: #990000;
text-decoration: none;
font-size: 18px;
line-height: 18px;
font-family: verdana, arial, helvetica, sans-serif;
font-family: Verdana, arial, helvetica, sans-serif;
}

h3 {
color: #333333;
text-decoration: none;
font-size: 12px;
line-height: 14px;
font-family: verdana, arial, helvetica, sans-serif;
font-family: Verdana, arial, helvetica, sans-serif;
}

h4 {
color: #333333;
text-decoration: none;
font-size: 10px;
line-height: 10px;
font-family: verdana, arial, helvetica, sans-serif;
font-family: Verdana, arial, helvetica, sans-serif;
}

h5 {
color: #990000;
text-decoration: none;
font-size: 10px;
line-height: 10px;
font-family: verdana, arial, helvetica, sans-serif;
font-family: Verdana, arial, helvetica, sans-serif;
}

ul {
color: #333333;
text-decoration: none;
font-size: 12px;
line-height: 14px;
font-family: verdana, helvetica, arial, sans-serif;
font-family: Verdana, helvetica, arial, sans-serif;
}

ul.coll {
color: #333333;
text-decoration: none;
font-size: 10px;
line-height: 12px;
font-family: verdana, helvetica, arial, sans-serif;
font-family: Verdana, helvetica, arial, sans-serif;
}

li {
color: #333333;
text-decoration: none;
font-size: 12px;
line-height: 14px;
font-family: verdana, helvetica, arial, sans-serif;
font-family: Verdana, helvetica, arial, sans-serif;
}

ol {
color: #333333;
text-decoration: none;
font-size: 12px;
line-height: 14px;
font-family: verdana, helvetica, arial, sans-serif;
font-family: Verdana, helvetica, arial, sans-serif;
}

ol.coll {
color: #333333;
text-decoration: none;
font-size: 10px;
line-height: 12px;
font-family: verdana, helvetica, arial, sans-serif;
font-family: Verdana, helvetica, arial, sans-serif;
}

.footer {
color: #990000;
text-decoration: none;
font-size: 10px;
line-height: 10px;
font-family: verdana, arial, helvetica, sans-serif;
font-family: Verdana, arial, helvetica, sans-serif;
}

PRE {
Expand All @@ -350,6 +350,6 @@ PRE.clsCode, CODE.clsText {
font-size:130%;
}

PRE.clsSyntax { font-family:verdana,arial,helvetica,sans-serif; font-size:120%; }
PRE.clsSyntax { font-family:Verdana,arial,helvetica,sans-serif; font-size:120%; }

/* End stylesheet.css */

0 comments on commit 611b403

Please sign in to comment.