August 1, 2012 at 6:46 pm
I am monitoring the performance of several buildings across the country. Each building contains a datalogger that records hourly data from a variety of sensors. Although 50-100 measurements of 10-15 different types are actually being made in each building, let's assume that the same 6 measurements are made in each building and that the only measurement types are volume, electrical energy, temperature, and pressure. Just to be clear, the "1 hour" volume and electrical energy measurements represent the total volume/energy "flow" over the past hour. On the other hand, the "1 hour" temperature and pressure measurements represent the average temp/pressure over the past hour.
To summarize, let's assume the following 6 "measures" are being recorded every hour in each building:
1) total cold water volume (liters) through a pipe over the past hour
2) total air volume (liters) through a duct over the past hour
3) total electrical energy consumed (watt hours) by the lighting circuit over the past hour
4) total electrical energy consumed (watt hours) by the appliance circuit over the past hour
5) average basement temperature (Celcius) over the past hour
6) average A/C duct pressure (pascals) over the past hour
I'm trying to bring all the data from all the buildings together in a SQL Server relational data warehouse and a SSAS OLAP database for further analysis in Excel and SSRS. However, I'm having difficulty identifying the proper grain and therefore, the proper fact table design. I've tried to draw analogies to financials since all book examples are given in terms of financials, but that seems to have confused me further. While the temperature and pressure examples seem to be period snapshots, it isn't clear to me whether the energy and flow examples are transactions, periodic snapshot, accumulating snapshots, or something else.
Here are some design options that I've explored, although each seems to have its own apparent pitfalls:
Option 1: Create one fact table that includes all measurements that CAN be summed [e.g., volume (liters) and energy (watt hours)] and a second fact table for all measurements that CANNOT be summed [e.g., temperature (Celcius) and pressure (pascals)].
Option 2: Create a different fact table for each distince unit of measure. In other words, one fact table for volume, a second for energy, a third for temperature, and a fourth for pressure.
Option 3: Create a single fact table that includes all measurements of all units, whether or not they can be summed.
Option 4: Before creating the fact table, convert all measurements that can be summed to units that cannot be summed. For example, if the measurement frequency is one hour, convert volume to liters per hour and convert energy to watt hours per hour (or watts).
I'd very much appreciate someone's advice or suggestions. Thank you.
August 1, 2012 at 8:59 pm
Wow, where to start. Before getting into the specifics of the table design, lets talk about monitoring in general. I highly recommend you check out some of the webcasts from the Groundwork folks. I know this is a RedGate sponsired forum but Groundwork recently did a webcast on the pitfalls to avoid when monitoring environments large and small. Specifically these: 1[/url] 2[/url]
One thing that jumps out at me is you've defined measures (liters of water per hour, for example) but no metrics. How many is too much? Too little? What is the dependency? For instance, what if the sensor fails? How do you stop your solution from spewing useless alerts when the sensor dies or the connection is down?
Before you start gathering facts and storing them in a table, answer those questions and watch the videos. That will make your tables come easier.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply