Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8844143
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T11:24:42+00:00 2026-06-14T11:24:42+00:00

Looking for a little help to elucidate a dimensional model. I’m looking at what

  • 0

Looking for a little help to elucidate a dimensional model. I’m looking at what boils down to a web event analysis – given web logs, I want to parse and store the variables present in the URL. The trick is that those variables are not always predefined, and on occasion, a variable may contain more than one value.

Let’s take a look at a hypothetical. If I have a query string like

session_id=SID&key1=value1&key2=value2&key3=value3a&key3=value3b&key3=value3c

My goal is to be able to figure out aggregates by any arbitrary combination of those keys. For instance, I might say “how many page hits had a key3 value of value3a,” or “how many page hits had a key1 value of value1 and a key3 value of value3b”. To add to the complexity, it’s possible that eventually a key4 and key5 and so on will appear, and potentially without enough forewarning to be able to make dimensional model changes before the values appear.

One approach might be to create 3 dimension tables, dim_key1, dim_key2, and dim_key3, each with an id field and a value field.

Then my fact table might look something like

id, session_id, dim_key1, dim_key2, dim_key3, count

The downside with this is that I would then need to create 3 rows in my fact table in order to properly capture the 3 values of key3 from the query string. Additionally, for every dimension that appears, I’d need advance notice, and would need to create my new dimension table.

Another possible approach, more geared for dim_key3, might be to create a dimension table like

id, value3a, value3b, value3c, ...

where rows in that table are made of ones and zeroes representing those combinations of values. So for instance, that query string above would have a row that looks something like 1, 1, 1, 1, 0, 0, ..., and the page hit fact table would have a dim_key3 dimension id of 1.

On the plus side, each page hit would only have one entry in the fact table, and the dimension table can keep a sparse representation, where we only create new rows in it for combinations we’ve actually seen (i.e. we don’t need the power set of all key3 combinations). On the downside, every new value for key3 would still need a new column added to that dim table.

Last idea, for dim_key3 would be to have a table like id, value_list, where value_list stores the comma-separated list of values seen. It’s a similar approach to the “column-for-every-value” approach, but just keeps a more compact representation. In this instance, we might have a dimension row like 1, "value3a,value3b,value3c".

Similarly, this would only require one row in the fact table, and as an added advantage, wouldn’t need new columns as new values show up. The downside would be that it forces some complexity into the query, in having to do full-text matches/regexes. (I can get into more of that if there’s interest, but I feel like I’ve already carried on long enough).

I’ve looked at several references, including Kimball’s “The Data Warehouse Toolkit,” and haven’t found anything that directly answers my question. Most of the click/web/eventstream analysis dimensional model examples have a fixed set of unchanging and singularly-valued variables.

Are any of my three outlined approaches reasonable, and/or does anyone have any suggestions on another model that I’ve missed?

Thanks in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T11:24:44+00:00Added an answer on June 14, 2026 at 11:24 am

    What about a design where the fact table included a row for each association between a page load and a key:

    RowID, SessionID, PageLoadID, KeyValuePairID, DateKey, etc.
    

    The KeyValuePair dimension table would have:

    KeyValuePairID, Key, Value
    

    So for your example, you would create dimension rows

    1 key1 value1
    2 key2 value2
    3 key3 value3a
    4 key3 value3b
    5 key3 value3c
    

    Then you can do Intersect queries to find your answers

    Select Intersect(
        NonEmpty([Session].Members, [KeyValuePair].&[Key1][Value1]),
        NonEmpty([Session].Members, [KeyValuePair].&[Key3][Value3a])) on 0
    From myCube
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm looking for a little help structuring a web form to include PHP validation
I need a little help with navigating a json file. I'm looking to get
I'm looking into the memory model a little more and am struggling with understanding
I was looking for a little help as I'm at my wits end on
I am looking for a little help with designing a query using C#/LINQ to
Looking for a little Wordpress help, I've created prev/next links when viewing a post
I am looking for a little bit help on this situation. I have a
I'm looking A little help on parsing XML from the internet to an Android
New here, looking to get a little help with my XmlDocument. Is it possible
I'm looking for a little help with my jQuery fading sequence. My Code: $('#1').fadeOut('fast');

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.