SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Fact table design for building monitoring application


Fact table design for building monitoring application

Author
Message
mwassmer
mwassmer
Forum Newbie
Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)

Group: General Forum Members
Points: 1 Visits: 36
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.
Scott D. Jacobson
Scott D. Jacobson
SSChasing Mays
SSChasing Mays (622 reputation)SSChasing Mays (622 reputation)SSChasing Mays (622 reputation)SSChasing Mays (622 reputation)SSChasing Mays (622 reputation)SSChasing Mays (622 reputation)SSChasing Mays (622 reputation)SSChasing Mays (622 reputation)

Group: General Forum Members
Points: 622 Visits: 1017
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 2

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.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search