MAN2 Designer
MAN2 Designer
Designer
TERMINOLOGY
SQL GENERATION
Very basic BusObj select statement generated using the universe meta data:
Select OBJECTs From TABLEs Where JOINs
CONNECTION PARAMETERS
Unless a connection to the desired data source has been created, click the New
button to create a new connection. Select the appropriate middleware layer
(must be setup on the client machine), and create a name for the new
connection. If the database requires a username/password, either enter the
designer’s information for all users, or be sure to check the
option so that each individual’s information is
inserted into the connection string when they run queries. This may be useful if
the organization wants to leverage existing database security or audit specific
user activity. Connection information may be customized per user/group using
Supervisor.
CONNECTION TYPES
INSERTING TABLES
Use the Table Browser ( ) to insert any necessary tables into the Structure
Window (depending on data/user analysis and design)
CLASSES (SUB-CLASSES)
Classes are used to organize objects by subject. Some classes may contain
subclasses. Every object must be in at least one class. (Objects may be in more
than one class, but this may entail additional maintenance.)
Although formatting can always be modified by end users, the designer can set
default formatting on each object by right-clicking on the object and selecting
Object Format.
An inner join is defined as one in which a row of data is returned when ids are
matched in both of the joined tables – this is the join created by default.
An outer join is defined as one in which a row of data is returned whether or not
there is matching data in one of the tables – this may be defined by editing the
join and checking the option on either the left or right side, depending
on which table may not have matching data (a full outer join will be supported in
6.5 Designer).
A theta join is defined as one in which one column in one table is joined with
more than one column in another table, such as for ranges.
MEASURE OBJECTS
In addition to server aggregation, the user may also perform local aggregation
after data has been returned, specifically during multidimensional analysis
(adding/removing dimensions).
For this reason, when creating a measure object it is recommended to also
define a local aggregate function (sum, ave, min, max, etc.) on the Properties tab
of the object.
DEFAULT/CUSTOM HIERARCHIES
The universe designer defines hierarchies of dimension objects which the end
user sees under Scope of Analysis and uses during drill analysis to move up,
down and across hierarchies and dimensions.
Default hierarchies are automatically created based on the order of dimension
objects in each class, but custom hierarchies consisting of any dimension objects
However, date objects created using the automatic time hierarchy are not
editable.
CONDITIOIN OBJECTS
PROMPTS
LOOP RESOLUTION
A loop occurs when there is a continuous path of joins in the universe structure.
This poses a problem for SQL generation engine (‘Error during SQL generation:
Incompatible combination of objects.’), as there exists some ambiguity
surrounding how exactly to generate the proper sequence of joins in order to
retrieve query results.
Depending on the nature of the loop, there are typically two different types of
resolutions: aliases and contexts – both are used to avoid or remove the
inherent ambiguity during SQL generation.
Select the problem table to alias, use Insert Alias ( ) to create a copy of the
orginal table, name the alias slightly differently from the original, redefine the
joins to break the loop, and create unique objects from each table. These two
tables will now be treated as separate for SQL generation purposes only,
although technically they both refer back to the same physical table in the
database.
Another example of when an alias may be needed to resolve a loop, also when
two different tables share/lookup (join) to a common dimension table, is when the
database contains a flexible/shared lookup table with several different types of
codes/descriptions – this may occur in highly normalized database schemas. like
The example above, select the problem table to alias, use Insert Alias ( ) to
create a copy of the original table, name the alias table slightly differently from
the original, redefine the joins to break the loop, and create unique objects from
each table. these two tables will now be treated as separate for SQL generation
purposes only, although technically they both refer back to the same physical
table in the database.
However, since this particular table contains several different types of
codes/descriptions, a restriction on each table is necessary so that each provides
only relevant rows when used as a lookup.
Use Insert Join ( ) and edit the join Expression to attach the necessary
restriction (“self join”) to each table (ex: WHERE type = ‘<value>’), which will then
be invoked every time a particular table is used in the query.
Like the example above, select the problem table to alias, use Insert Alias ( )
to create a copy of the original table, name the alias table slightly differently from
the original, redefine the joins to break the loop, and create unique objects from
each table. These two tables will now be treated as separate for SQL generation
purposes only, although technically they both refer back to the same physical
table in the database.
A context is a distinct path of joins within a universe structure, used to fool the
SLQ generation engine into thinking that some of the joined tables in the
structure do not exist, thereby effectively breaking the loop. An example of when
a context may be needed to resolve a loop is when multiple fact/transaction
tables are linked to common dimension tables – they may also be necessary in
other denormalized database schemas.
Use Insert Context ( ) to create a new context, give the context a
name/description (for help text), and select all the joins which should be part of
the query context of the particular fact/transaction table. Repeat as many times
as necessary to define all of the different q uery contexts in the structure.
Note that this process does not actually break the loop (like aliases), however the
SQL generation engine now has enough additional information about the
different query contexts and distinct join paths in the structure.
If the user query includes an object along any one of the contexts, the SQL
generation engine can now infer the conte xt of the query. if the user query
includes objects which are shared between contexts, the SLQ generation engine
will prompt with a list of applicable contexts and ask which join path to use to
generate the SQL. If the user query includes objects along multiple contexts,
the SQL generation engine will generate multiple SQL statements. Such queries
would not have been possible prior to creating contexts.
AGGREGATE AWARENESS
1. insert the aggregate table and any necessary joins to the rest of the structure
3. build aggregate awareness into any objects for which may be found in more
than one table (for example, measures in the aggregate table were probably
aggregated from measures in the transaction table, and dimensions may have
been denormalized and redundant in the aggregate table) by using the
@AggAware function, structuring the syntax such that tables are listed from
smallest to largest (for example, @AggAware(highaggregate.measure,
lowaggregate.measure, transactiontable.measure)
AUTOMATIC DETECTION
and Detect Contexts ( ). Essentially, when any of these buttons are used, a
special algorithm builds a table tree internally using information about the joins
and join relationships (Cardinalities) to detect shared lookup tables for which it
proposes an Alias solution, and/or multiple fact tables for which it proposes a
Context solution.
Loops can be easily detected whenever there is a continuous path of joins in the
universe structure. However, it is critical to remember that the reliability of these
detections and their suggested resolutions depends on the accuracy of the
cardinalities – these must be defined completely and correctly (see below).
CARDINALITIES (AUTOMATIC/MANUAL)
Although Cardinalities are not needed for SQL generation, they may be useful
to simply clarify the universe structure, particularly for use with other detection
mechanisms (above).
When Detect Cardinalities ( ) is used, three queries run: 1. for the number of
rows in the first table, 2. for the number of rows in the second table, and 3. for the
number of rows in common. For this reason, this detection may be undesirable
to use, for example if there are many rows in each table (will take too long) or if
there are few rows in each table and the data is not a representative sample (will
be unable to detect).
However, cardinalities can always be set manually by double-clicking on the join
and using the appropriate radio buttons.
INTEGRITY CHECK
EXTERNAL STRATEGIES
LISTS OF VALUES
Lists of values are used when building custom conditions and when responding
to query prompts. The designer can make different lists of values available, can
set the refresh frequency, and can define what query runs to retrieve the list of
values as well as how to best display the data
TABLES BUTTON
SHORTCUT JOINS
It is possible to influence the order of tables in the FROM if the Query Panel
knows the relative size of the tables in the universe structure. By right-clicking on
tables and selecting the Number of Rows in Table option, row counts can either
be automatically refreshed or manually modified.
LINKED UNIVERSES
@SELECT/WHERE CLAUSES
There are some additional designer options under Tools | Options, including
graphics and print options. Although there is not inherent version control of
universes, if universe components and descriptions are periodically
printed/saved, this can serve as a historical record of universe status and
changes.
WORKGROUP/ENTERPRISE DISTRIBUTION
There are essentially two different ways to distribute a universe, either by sharing
the UNV file (appropriate when working with a small workgroup of other
designers in a development/test environment) or by exporting to the repository
Connection:
eFashion (personal)
Tables:
Article_lookup, Calendar_year_lookup, Outlet_lookup, Shop_facts
Joins:
Shop_facts.Shop_code=Outlet_lookup.Shop_code
Article_lookup.Article_code=Shop_facts.Article_code
Shop_facts.Week_key=Calendar_year_lookup.Week_key
Classes/Objects:
Time: Year, Quarter, Month
Store: State, City, Store Name, Zip Code, (detail), Address (detail)
Products: Lines (Family_name), Category, Description (Article_label)
Measures: Sales Revenue, Quantity Sold (both from Shop_facts)
Conditions:
Last Year (1999), This Year (2000), Which City? (prompt)
Hierarchies:
Time: Year, Quarter, Month
Store: State, City, Store Name
Products: Lines, Category, Description
Custom: Store Name, Lines, Year, Month