star-schemastar-schema-datawarehouse

Star schema for tables with overlap periods


I need to design a star schema, which responds to my future indicators and which will be later implemented in a datawarehouse, but my knowledge is very basic and I am having serious difficulties in developing the model

I am unsure of whether I should be creating separate star schemas, or if I can use bridge tables.

enter image description here

Each session is done on a single channel, but according to its time interval, more than 1 program may or may not be viewed

Each program has its own categorization (set of 12 possible categorizations)

-TuneTime >> Start DateTime Session (e.g 2020-12-02 00:35:00)

-TuneDuration >> Session Duration in seconds

-StartDate >> Start DateTime Program (e.g 2020-12-01 23:35:00)

-EndDate >> End DateTime Program (e.g 2020-12-01 00:23:00)

Min Time granularity = 15 min

I will have to analyze a series of indicators, related to device access in general, to each channel, categorization, ranks of the most watched programs, share of each channel, etc. The idea is to be able to obtain this data for predefined date ranges by the user and to be able to change the time scale, e.g.:

it seems obvious to me that I will have to create:

But how can I evaluate the duration in each program in the fact table

I made a little schematic to visualize, it probably won't do for anything :)

enter image description here

I'm not confident about my reasoning and would very much appreciate some help


Solution

  • Your starting point for a star schema should be the measures that you wish to aggregate and the attributes you wish to use to slice, dice and aggregate those measures.

    The complexity of what you are trying to achieve should be handled in the ETL processes used load your star schema, so that querying your star schema to produce the information you need is simple