Wednesday, March 6, 2024

Types of Fact tables

 At its core, a fact table consists of the following components:

1. Primary Keys: These are unique identifiers that uniquely identify each row or record in the fact table.

2. Foreign Keys: These are references to dimension tables that provide context and additional information about the measures in the fact table.

3. Measures: These are the numerical values that we want to analyze. e.g., it can represent sales revenue, customer visits, inventory levels, or any other quantifiable data.

The combination of primary keys, foreign keys, and measures forms the foundation of a fact table, enabling powerful data analysis. In fact, we have three types: Transaction Fact Tables, Periodic Snapshot Tables, and Accumulating Snapshot Tables.

Transactional Fact Tables

Transactional fact tables are designed to capture individual business events or transactions. These tables are particularly useful for analyzing customer behavior, sales patterns, and operational efficiency. Let’s take a closer look at a sample transactional fact table to better understand its structure:

[Transactional Fact Table]

In this example, each row represents a unique transaction, with the transaction ID serving as the primary key. The customer ID and product ID columns are foreign keys that reference the respective dimension tables. The quantity sold and sales amount are the measures that quantify the transaction details.

Transactional fact tables enable us to perform various data analyses:

1. Analyzing Customer Behavior: By grouping transactions by customer ID, we can gain insights into individual customer preferences, buying patterns, and customer lifetime value.

2. Identifying Popular Products: By aggregating sales quantity or sales amount by product ID, we can determine the popularity of different products, identify best-sellers, and optimize inventory management.

3. Tracking Sales Trends: By examining the transactional data over time, we can identify sales trends and seasonal fluctuations and make informed decisions about pricing, promotions, and marketing strategies.

Note: Transactional fact tables provide granular details that allow for in-depth analysis and actionable insights.

Periodic Snapshot Fact Tables

Periodic snapshot fact tables provide a summarized view of metrics over regular time intervals. These tables are particularly useful for monitoring performance, identifying trends, and measuring progress. Let’s explore a sample periodic snapshot fact table:

[Periodic Snapshot Fact Table]

In this example, each row represents a specific time period, such as a month ID, with the Month ID column serving as the primary key. The total sales, revenue, and number of customers are the measures that provide an overview of the performance during each month.

Periodic snapshot fact tables gives different analytical use cases:

1. Monitoring Performance: By analyzing the total sales and revenue over different time periods, we can evaluate the overall performance of the business and track progress towards goals.

2. Identifying Trends: By comparing metrics across months or quarters, we can identify growth trends, seasonality patterns, and fluctuations in customer demand.

3. Decision-making: Based on the insights derived from periodic snapshot fact tables, businesses can make data-driven decisions regarding marketing campaigns, resource allocation, and inventory management.

Note: Periodic snapshot fact tables offer a high-level view of performance and allow for easy comparisons and trend analysis.

Accumulating Snapshot Fact Tables

Accumulating snapshot fact tables are designed to track the stages of a business process or workflow. These tables provide valuable insights into process efficiency, identifying bottlenecks, and optimizing operations. Let’s examine a sample accumulating snapshot fact table:

[Accumulating Snapshot Fact Table]

In this example, each row represents a specific order, with the order ID serving as the primary key. The order date, received date, stocked date, and sold date represent the different stages of the order fulfillment process.

This fact tables enable various practical applications, including:

1. Monitoring Order Fulfillment: By tracking the time it takes for orders to move through each stage, businesses can identify bottlenecks in the fulfillment process and streamline operations.

2. Tracking Inventory: By analyzing the time it takes for products to move from receiving to stocking to selling, businesses can optimize inventory management and ensure timely replenishment.

3. Evaluating Supply Chain Performance: By examining the accumulation of time across different stages, businesses can assess the overall efficiency of their supply chain and identify areas for improvement.

Note: Accumulating snapshot fact tables provide a comprehensive view of the entire process, facilitating process optimization and operational efficiency.

Factless Fact Tables

A “factless fact table” is a type of table in a data warehouse or database that captures relationships and events without containing any numerical or measurable facts. Unlike traditional fact tables that store quantitative data, a factless fact table focuses solely on the associations or occurrences between different dimensions or entities.

The purpose of a factless fact table is to track and analyze the presence or absence of certain events or combinations of events. It enables the identification of patterns, trends, and relationships based on the occurrences or non-occurrences of specific events across different dimensions.

Typically, a factless fact table consists of foreign keys referencing various dimension tables as well as any additional descriptive attributes that provide context to the relationships being captured. The absence of numerical measures distinguishes it from other types of fact tables.

A common example of a factless fact table is a “sales pipeline” table in sales analytics. It captures the stages of a sales opportunity (e.g., prospecting, qualification, and negotiation) and the associated timeframes but does not include any monetary values or quantities. This allows analysts to analyze the sales process, track conversion rates, identify bottlenecks, and measure the effectiveness of different sales strategies without focusing on specific sales figures.

A factless fact table serves as a bridge between dimensions, capturing events or associations without numerical measures. It provides valuable insights into relationships, patterns, and occurrences, helping analysts understand the context and behavior of data across different dimensions.

Monday, March 4, 2024

What is granularity? and granule

 

What is granularity?

Granularity in data refers to the level of detail or precision of the data. For example, data that has a high level of granularity would have a large number of individual pieces of information, such as individual records or measurements. Data that has a low level of granularity would have a small number of individual pieces of information, such as summary data or aggregated data. Data granularity can affect how it is used and analyzed, and can impact the accuracy and usefulness of the results.

Sunday, March 3, 2024

Most common KPI list

 Below are the 100 important business KPI examples to track & measure.





In this list of key performance indicators examples, we’re going to look into four different categories of business metrics:

  • Sales
  • Financial
  • Project Management
  • Marketing

REMEMBER: Only measure the KPIs that are relevant to YOUR company and business goals. You’ll probably only need 20 KPIs out of this entire list.

Examples of sales key performance indicators:

1. Monthly sales growth

2. Monthly sales/new customers

3. Monthly new leads/prospects

4. Number of qualified leads

5. Resources spent on one non-paying client

6. Resources spent on one paying client

7. Customer lifetime value/customer profitability

8. Lead-to-sale conversion rate

9. Cost per lead by each channel

10. Cost of a new client by each channel

11. Hourly, daily, weekly, monthly, quarterly, and annual sales

12. Average conversion time

13. Lead-to-close rate: all channels

14. Customer turnover rate

15. Number of monthly sales demos

16. Customer engagement level

17. Number of abandoned shopping carts

18. Shopping cart abandonment rate

19. Number of monthly quotes/orders

20. Average purchase value

21. Average order value

22. Sales per representative

23. Sales by lead source

24. Inbound calls handled per representative

25. Outbound calls handled per representative

26. Average annual sales volume per customer

27. Average monthly sales volume per customer

28. Relative market share

29. Product/service usage every day

30. Value of returned goods and warranties

31. Asset turnover ratio (sales to assets)

32. Percentage of total sales from existing customers

33. Sales reps per $100k in revenue

34. Monthly sales quota attainment

35. Sales quota attainment by the sales representative

36. Number of client accounts per account manager

37. Days sales outstanding

Examples of financial key performance indicators:

38. Net profit margin

39. Operating cash flow (OCF)

40. Current ratio

41. Quick ratio / Acid test

42. Net profit margin

43. Working capital

44. Current accounts receivable

45. Current accounts payable

46. Accounts payable turnover

47. Accounts receivable turnover

48. Accounts payable process cost

49. Accounts receivable turnover

50. Budget variance

51. Budget creation cycle time

52. Line items in the budget

53. Number of budget iterations

54. Payroll headcount ratio

55. Vendor expenses

56. Payment error rate

57. Internal audit cycle time

58. Finance error report

59. Debt to equity ratio

60. Return on equity

61. Cost of managing business

62. Resource utilization

63. Total cost of the finance function

Read more about each financial KPI

Examples of project management key performance indicators:

64. Planned value (PV)

65. Actual cost (AC)

66. Earned value (EV)

67. Cost variance (CV) (planned budget vs. actual budget)

68. Schedule variance (SV)

69. Schedule performance index (SPI)

70. Cost performance index (CPI)

71. Planned hours of work vs. actual situation

72. Overdue project tasks / crossed deadlines

73. % of overdue project tasks

74. Missed milestones

75. Percentage of projects completed on time

76. Percentage of cancelled projects

77. Percentage of projects on budget

78. Number of budget iterations

79. Percentage of tasks completed

80. Project resource utilization

81. Cost of managing processes

82. Return on investment (ROI)

Here’s a guide that explains 16 project KPIs

Examples of marketing key performance indicators:

83. Monthly new leads/prospects

84. Qualified leads per month

85. Marketing qualified leads (MQL)

86. Sales-accepted leads (SAL)

87. Sales qualified leads (SQL)

88. Cost per lead generated

89. Net promoter score

90. Cost per conversion

91. Cost per conversion by channel

92. Average time of conversion

93. Retention rate

94. Attrition rate

95. Monthly website traffic

96. Traffic from organic search

97. Returning vs. new visitors

98. Visits per channel

99. Average time on page

100. Click-through rate on web pages

101. Pages per visit

102. Conversion rate for call-to-action content

103. Inbound links to website

104. Traffic from organic search

105. New leads from organic search

106. New leads from organic search

107. Number of unique keywords that drive traffic

108. Keywords in top 10 SERP

109. Rank increase of target keywords

110. Conversion rate per keyword

111. Page authority

112. Google PageRank

113. Volume of traffic from video content

114. Leads & conversions from paid advertising

115. Number of monthly PPC campaigns

116. Cost per acquisition (CPA) & cost per conversion (CPC)

117. Click-through rate on PPC advertising

118. Traffic from social media

119. Number of leads from social media

120. Number of conversions from social media

121. Conversion rate for social media leads

122. Managed audience size

123. Engagement rate

124. Social media mentions

125. Social media ROI

126. Content quality on blog

127. Number of monthly blog visits

128. Blog articles published this month

129. E-books published this month

130. Infographics published this month

131. ROI per content type

132. Web traffic from PR campaigns

133. Number of clippings

134. Calls from PR campaigns

135. Media impressions from PR campaigns

Star schema and Snowflake schema - Differences ?

 

S.NOStar SchemaSnowflake Schema
1.In star schema, The fact tables and the dimension tables are contained.While in snowflake schema, The fact tables, dimension tables as well as sub dimension tables are contained.
2.Star schema is a top-down model.While it is a bottom-up model.
3.Star schema uses more space.While it uses less space.
4.It takes less time for the execution of queries.While it takes more time than star schema for the execution of queries.
5.In star schema, Normalization is not used.While in this, Both normalization and denormalization are used.
6.It’s design is very simple.While it’s design is complex.
7.The query complexity of star schema is low.While the query complexity of snowflake schema is higher than star schema.
8.It’s understanding is very simple.While it’s understanding is difficult.
9.It has less number of foreign keys.While it has more number of foreign keys.
10.It has high data redundancy.While it has low data redundancy.

Data modeling interview FAQs list

 

  1. what are 3 levels of Data modeling 
    1. Conceptual 
    2. logical
    3. physical model
  2. Types of Fact tables 

  3. Logical and physical model - Differences ?
  4. Star schema & Snowflake schema - Differences ?
  5. Granularity and Granule
  6. Types of Dimension tables
  7. What is factless fact table
  8. What is Data Mart
  9. Steps in Datawarehouse life cycle steps

  10. ERWIN qsns
    1. Erwin - Data modeler workspace
    2. Erwin - Domains
    3. Erwin - types of relationships
    4. Erwin - indexes how
    5. Erwin - Forward and reverse engineering steps
    6. Erwin - Complete compare feature
    7. Erwin - Naming standards
    8. Erwin - Name hardening
    9. Erwin - querying tool
    10. Erwin - subject areas
    11. Erwin - identifying and non identifying relationships differences
  11. Fact and dimension table - differences
  12. What is Datawarehouse
  13. what is ODS( operational data store)
  14.  OLTP & OLAP- differences (pg 17) 53
  15. What are SQL performance tuning measures & tips
  16. what are bottlenecks which effects database performance
  17. how do you tune a query using explain plan
  18. what is summary advisor
  19. what is most likely reason that sql query may run slowly
  20. what is latch free event
  21. what is proactive tuning and reactive tuning
  22. what is Rule based optimiser and cost based optimizer
  23. list Perf tuning enhancements in oracle
  24. how do you confirm that table has disproportionate fragmentation
  25. what can you do to optimize %xyz" queries 
  26. where does input output statistics of table exist in oracle
  27. when is right time to rebuiled index
  28. what information does STATSPACK report give 
  29.  redo,rollback , undo- differences
  30. Aggregate and summarized tables  - differences
  31. what operations can be done on OLAP cube
  32. data quality checks -pg 28
  33. types of indexes 53
  34. types of fact tables 51
  35. types of dimension tables(30, 46,48)
  36. surrogate key (33)
  37. Normalization (34)
  38. sql query : find nth highest salary - 54
  39. sql query : find and delete duplicate rows
  40. What are roles of data modeler 61
  41. Most common KPI list 
  42. Which Data profiling tools did you use
    1. Informatica data profiling
    2. Open source data quality profiling

23feb26 - cab service project -data modeling project

  The Full Data Modeling Implementation Steps Phase Description & Methodology Primary Tools Phase 1: Discovery Ask the 10-Section Questi...