barcode vb.net 2010 Double-Counting in Software

Creator QR Code JIS X 0510 in Software Double-Counting

Double-Counting
Read QR Code JIS X 0510 In None
Using Barcode Control SDK for Software Control to generate, create, read, scan barcode image in Software applications.
Painting QR Code 2d Barcode In None
Using Barcode generation for Software Control to generate, create QR Code ISO/IEC18004 image in Software applications.
When a query joins a dimension table to a bridged outrigger as well as a fact table, facts may be double-counted. This situation is sometimes called for but is also dangerous. Anyone who does not take care when aggregating the facts may produce erroneous results. To understand this possibility, think about Company C once more. Through the bridge, it is linked to two rows in the industry table. You can see this quite clearly in Figure 9-10. If you were to join these tables together, the SQL would look like this:
Recognizing Denso QR Bar Code In None
Using Barcode scanner for Software Control to read, scan read, scan image in Software applications.
QR Code JIS X 0510 Printer In Visual C#.NET
Using Barcode maker for .NET framework Control to generate, create QR Code ISO/IEC18004 image in .NET applications.
SELECT customer.customer_name, industry.industry_name FROM customer, industry_group, industry WHERE customer.industry_group_key = industry_group.industry_group_key AND industry_group.industry_key = industry.industry_key;
QR Code JIS X 0510 Maker In Visual Studio .NET
Using Barcode encoder for ASP.NET Control to generate, create QR Code ISO/IEC18004 image in ASP.NET applications.
QR Code ISO/IEC18004 Printer In .NET
Using Barcode creator for .NET Control to generate, create QR image in .NET applications.
When this query is executed, the result set will contain two rows for Company C:
QR-Code Encoder In Visual Basic .NET
Using Barcode maker for Visual Studio .NET Control to generate, create QR Code JIS X 0510 image in .NET framework applications.
Encoding Barcode In None
Using Barcode drawer for Software Control to generate, create barcode image in Software applications.
CUSTOMER_NAME ============= Company C Company C INDUSTRY_NAME ============== Manufacturing Services
Bar Code Generator In None
Using Barcode maker for Software Control to generate, create bar code image in Software applications.
Print Code-128 In None
Using Barcode generator for Software Control to generate, create Code128 image in Software applications.
2 rows selected.
Drawing ECC200 In None
Using Barcode creator for Software Control to generate, create Data Matrix 2d barcode image in Software applications.
Print Code 3 Of 9 In None
Using Barcode encoder for Software Control to generate, create Code 3/9 image in Software applications.
Part III
Paint USD8 In None
Using Barcode creator for Software Control to generate, create Code11 image in Software applications.
Painting EAN13 In .NET
Using Barcode creator for Reporting Service Control to generate, create UPC - 13 image in Reporting Service applications.
PART III
Print USS-128 In Java
Using Barcode encoder for Java Control to generate, create EAN 128 image in Java applications.
Bar Code Creator In None
Using Barcode maker for Office Word Control to generate, create bar code image in Microsoft Word applications.
Dimension Design
Recognize Data Matrix ECC200 In Visual Basic .NET
Using Barcode reader for Visual Studio .NET Control to read, scan read, scan image in VS .NET applications.
Drawing Bar Code In .NET Framework
Using Barcode printer for Reporting Service Control to generate, create bar code image in Reporting Service applications.
This occurs because the join conditions result in two industry matches for Company C; the RDBMS dutifully repeats company row once for each match. Now consider what happens if a fact table is added to this query. Suppose Company C placed a $10,000 order that appears in the order_facts table. Adding the fact table to the query looks like this:
ECC200 Printer In None
Using Barcode creation for Office Word Control to generate, create Data Matrix 2d barcode image in Office Word applications.
Draw EAN / UCC - 13 In Java
Using Barcode generator for Java Control to generate, create GTIN - 13 image in Java applications.
SELECT customer.customer_name, industry.industry_name, sum( order_dollars ) FROM order_facts, customer, industry_group, industry WHERE order_facts.customer_key = customer.customer_key AND customer.industry_group_key = industry_group.industry_group_key AND industry_group.industry_key = industry.industry_key GROUP BY customer_name, industry_name
In order to process this query, the RDBMS will repeat the $10,000 order for each related industry.
CUSTOMER_NAME ============= Company C Company C INDUSTRY_NAME ============== Manufacturing Services SUM(ORDER_DOLLARS) ================== 10,000 10,000
2 rows selected.
In some cases, this double-counting is just what is needed. For example, it is easy to produce a report that totals order dollars by industry. Once again, however, there is the danger that someone will misuse this information, constructing a grand total.
Primary Member and Hiding the Bridge
If it is possible to identify a single, primary member of each group, the bridge can be hidden from inexperienced users, while still providing limited access to the bridged attribute. This is achieved by adding a flag to the group table indicating the primary member of the group. A view or similar mechanism is used to hide all but the primary member from inexperienced users. Only trained developers will receive full access to the bridged solution. The example from Figure 9-10 already bears the features necessary to implement such a scheme. Notice that the bridge table industry_group contains a column called primary_ industry. For each group, only one row will have this flag set to the value Primary. When the industry_group bridge is used to link the customer and industry tables, filtering for the value Primary will guarantee a single match. Every customer has exactly one primary industry. The same effect can be achieved by placing a primary_industry column in the customer table.
9 Multi-Valued Dimensions and Bridges 213
TIP When an attribute bridge is employed, any query involving the outrigger risks the possibility of double-counting. This risk can be minimized by using a flag to isolate a single member for each group; this can be used to constrain the view of the schema presented to inexperienced users. When a report is required that factors in the variety of industries in which a company participates, trained developers will be called on to do the work. With unfettered access to the bridged solution, only they will be able to produce these impact reports. Measures may also be required to ensure that an end user who receives such a report will not have the ability to press a button for a grand total. NOTE Business intelligence products that generate SQL queries can be hampered by designs in which there are more than one way to relate tables. Advice for handling this complication is provided in 16, Design and Business Intelligence.
The Impact of Changes
The Impact of Changes to the Outrigger As you learned in 7, snowflake designs require extra vigilance on the part of ETL developers. If an outrigger undergoes a type 2 slow change, it will most likely be appropriate for any associated dimension rows to do the same. In addition, it may be necessary to contemplate changes in group membership. For example, a change to an industry classification may be handled by using the standard methods. A type 1 change causes little concern; the outrigger is simply updated. If, however, the change is handled as type 2, then every company referring to the changed industry is affected, as are the associated groups. For example, if Services is redesignated as the more descriptive Financial Services, and this is handled as a type 2 change, a new row will be generated in the outrigger table. To associate this value with Company C for future facts, while leaving prior facts associated with the old value, it will be necessary to create a new version of Company C. This new version of Company C will be associated with a new set of rows in the group table for financial services and manufacturing. If a new version of Company C is not created in this manner, then the type 2 change to the industry will not be properly reflected when studying facts. For example, taking a shortcut by simply updating group 100 with the new key for the financial services industry effectively wipes out the old designation s association with previously recorded facts. Usually, if a type 2 change occurs in an outrigger, this is not the desired behavior.
TIP Type 2 changes in an outrigger will require type 2 changes in the dimension and new groups in the bridge table. These can also be supplemented with time stamps, if desired. As with the dimension bridge, the story does not end here. Changes to group membership may also require attention. In this case, a simple change to one member may have a ripple effect that impacts multiple rows in the dimension table and the bridge.
Copyright © OnBarcode.com . All rights reserved.