barcode vb.net 2010 Multi-Valued Dimensions and Bridges 207 in Software

Encoder QR Code in Software Multi-Valued Dimensions and Bridges 207

9 Multi-Valued Dimensions and Bridges 207
Denso QR Bar Code Scanner In None
Using Barcode Control SDK for Software Control to generate, create, read, scan barcode image in Software applications.
Denso QR Bar Code Printer In None
Using Barcode generator for Software Control to generate, create Quick Response Code image in Software applications.
ORDER_FACTS day_key product_key customer_key sales_group_key SALES_GROUP sales_group_key
Scanning QR Code 2d Barcode In None
Using Barcode decoder for Software Control to read, scan read, scan image in Software applications.
QR Code Creator In C#
Using Barcode printer for .NET framework Control to generate, create Quick Response Code image in VS .NET applications.
SALESREP salesrep_key salesperson_name region
QR-Code Creation In .NET Framework
Using Barcode generator for ASP.NET Control to generate, create QR-Code image in ASP.NET applications.
QR Code ISO/IEC18004 Creator In .NET Framework
Using Barcode maker for .NET framework Control to generate, create Quick Response Code image in .NET applications.
. . . . . .
QR Code Generation In Visual Basic .NET
Using Barcode generation for Visual Studio .NET Control to generate, create Denso QR Bar Code image in .NET framework applications.
Print Bar Code In None
Using Barcode maker for Software Control to generate, create bar code image in Software applications.
. . .
Painting ANSI/AIM Code 128 In None
Using Barcode creation for Software Control to generate, create Code 128 image in Software applications.
Print USS Code 39 In None
Using Barcode encoder for Software Control to generate, create Code 3 of 9 image in Software applications.
order_dollars
Print DataMatrix In None
Using Barcode generator for Software Control to generate, create Data Matrix 2d barcode image in Software applications.
Generating UCC - 12 In None
Using Barcode drawer for Software Control to generate, create UPC A image in Software applications.
This table has only one column!
UPC-E Supplement 5 Encoder In None
Using Barcode creator for Software Control to generate, create UPC - E1 image in Software applications.
Making GS1 - 12 In Visual Studio .NET
Using Barcode printer for VS .NET Control to generate, create UPC Code image in .NET framework applications.
GROUP_ MEMBERSHIP sales_group_key salesrep_key allocation
Code 128A Encoder In None
Using Barcode generator for Excel Control to generate, create Code-128 image in Excel applications.
Create USS Code 39 In Java
Using Barcode generation for Java Control to generate, create Code 3/9 image in Java applications.
Figure 9-7
Barcode Decoder In Java
Using Barcode scanner for Java Control to read, scan read, scan image in Java applications.
Scanning Bar Code In Java
Using Barcode Control SDK for Eclipse BIRT Control to generate, create, read, scan barcode image in Eclipse BIRT applications.
Resolving the many-to-many relationship
Making Barcode In None
Using Barcode maker for Microsoft Word Control to generate, create barcode image in Word applications.
Creating EAN 128 In Java
Using Barcode drawer for Eclipse BIRT Control to generate, create UCC - 12 image in BIRT reports applications.
The solution to this problem is to do what an entity-relationship modeler would do: construct what they call an intersect table. In the case of the dimensional model, this will have an amusing side effect: it requires you to maintain a group table with only one column, which is a key value. Figure 9-7 provides an example. The many-to-many relationship between groups and salespeople is resolved by creating an intersect table called group_membership. The sales_group table is left with a single column, the group_key. If you issue the query select * from sales_group, the contents of this table would appear as a sequence of numbers. Although this may seem silly, this configuration should satisfy even the most particular of modeling tools. A primary key can be defined for the group table: sales_group_key. This allows the column to be used as a foreign key in the fact table. TIP If you have a software product that will not allow a many-to-many relationship, you can create an intersect table to resolve it. If the sales_group table in this revised solution seems extraneous, that s because it is. All the information is present in the group_membership table. The sales_group table is completely redundant. In fact, if you look closely, you will see that the group_membership table is identical to the original bridge! The necessity of this absurdity stems from software products that enforce entity-relationship modeling conventions on your dimensional design.
Multi-Valued Attributes
When a dimension attribute may take on more than one value for any given row in the table, we face a similar design challenge. How does one model an indefinite number of attribute values for a single row in the dimension This situation is common. Customers have multiple phone numbers. Bank accounts have multiple account holders.
Part III
PART III
Dimension Design
Students have multiple guardians. Patients have multiple medical conditions. In each case, a small subset of the dimension s attributes may take on more than one value for a single natural key value. Attributes that may take on multiple values for a single dimension member are called multi-valued attributes. For example, in a dimension that captures business customers, it may be necessary to capture the company s industry. Each company has a single name, headquarters location, and chief executive. Most companies are in a single industry, as well, but some are in two, three, or any number of industries. Figure 9-8 illustrates this challenge. Company C operates in two industries, and it is possible that other companies may have three, four, or any number. Like the multi-valued dimension, this challenge can be resolved by simplifying the problem or by using a bridge table. Simplifying a multi-valued attribute is often the best approach but sometimes limits analytic possibilities. Implementing a bridge provides increased analytic flexibility but introduces risk. If used, the bridge will be placed between the dimension and an outrigger. As in the multi-valued dimension scenario, bridging a multi-valued attribute will introduce the risk of double-counting. Any given fact may link to more than one value for the bridged attribute, giving rise to the same set of problems encountered earlier. While the entire dimension table is not at risk this time, the repeating attributes are.
ORDER_FACTS
CUSTOMER PRODUCT customer_key customer_id customer_name customer_industry . . SALESREP
Customer Company A Company B Company C Company D
Industry Manufacturing Services Manufacturing Services Finance Some customers have more than one industry.
Figure 9-8 A multi-valued attribute
9 Multi-Valued Dimensions and Bridges 209
Simplifying the Multi-Valued Attribute
When you are faced with multi-valued attributes, the first option to consider is simplification of the problem through a technique that is sometimes referred to as flattening. Instead of designing a single column to capture the attribute, you can include two or more columns. For example, multiple phone numbers for a customer can be captured by designing separate columns for home phone number, office phone number, and mobile phone number. The multi-valued attribute is transposed into a repeating attribute. This approach works best where a limited number of values is acceptable, where each version corresponds to an easily identifiable role, and where it will not be necessary to filter or group transactions in a fact table using values that may occur in any of the columns. In the case of phone numbers, these three conditions may be satisfied. The business is comfortable with carrying a maximum of three phone numbers in their analysis; each of the three numbers has a clearly identifiable role home, office, mobile and there will not be a need to search for or group transactions by a phone number that may appear in any of the three columns.
In the example of company industries, simplifying the multi-valued attribute into a finite number of single-valued attributes is not viable. Illustrated in Figure 9-9, the dimension table is able to store three industry values for each customer. This solution has several shortcomings: The solution is limited to a specific number of values. Later, we may encounter a customer that requires more than three industries. Filtering a query for a particular industry will require defining multiple conditions, since the industry in question may appear in any one of the columns. Grouping facts by industry will be particularly challenging, since a given industry may appear in any of the three columns.
CUSTOMER customer_key customer_id customer_name industry_1 industry_2 industry_3
. . .
The drawbacks to the simplification of a multi-valued attribute may seem familiar; they are similar to those identified when simplifying a many-to-many relationship between dimension table and fact table. The alternative is also similar: introduction of a bridge table.
Copyright © OnBarcode.com . All rights reserved.