Kimball Forum
Would you like to react to this message? Create an account in a few clicks or log in to continue.

A fact table for property inspections

2 posters

Go down

A fact table for property inspections Empty A fact table for property inspections

Post  HawkeyeDBA Thu Mar 06, 2014 3:12 pm

I'm building a dw that stores natural disaster data. I'm working on the Inspection piece now and the trouble I'm having is this.

Different kinds of inspections were done on houses, each inspection having its own set of requirements so that not every inspection will look at the same things (i.e. some just look at if the home is occupied, others look at plumbing, electrical, foundation, etc.)

The grain of my fact table should be by the inspection date (it is nearly a factless fact table)

Most of the time people will only want to see there was an inspection done and when it was done.

However, I do need to store the results of the inspections.

I don't know if my current structure is really appropriate considering that other items could come up that need to be added to the inspection requirements.

I welcome all suggestions on improving my current structure (forgive me this is a small sample of my data columns, and I just typed them in short-hand)


I currently have a fact table like this:

FactInspectKey
InspectDateKey
InspectorKey
InspectionTypeKey
DataSourceKey
LoadDateTime

DimDate
DateKey
Month
Year

DimDataSource
DataSourceKey
DataSourceName

DimInspector
InspectorKey

DimInspectionType
InspectionTypeKey

And a "junk dimension" like this with a snow flake schema for comments, condition, and placard (which I don't really like)

DimInspectDetail
InspectDetailKey
NumOfOccupants
SafeToEnterFlag
DemoFlag
ArcheologistFlag
ReinspectionFlag
ViolationFlag
ViolationCommentKey
CommentKey
PercentDamaged
NumOtherStruct
FloorConditionKey
HeatingACConditionKey
GeneralConditionKey
ElectricalConditionKey
WaterDepthInInches
InteriorConditionKey


DimPlacard
PlacardKey
PlacardColor
PlacardDefinition

DimCondition
ConditionKey
Condition
ConditionDefinition

DimComment
CommentKey
Comment

HawkeyeDBA

Posts : 2
Join date : 2014-03-06

Back to top Go down

A fact table for property inspections Empty Re: A fact table for property inspections

Post  ngalemmo Thu Mar 06, 2014 3:35 pm

You may want to consider multiple fact tables. Have one at the inspection level to handle the more common queries, and have one or more fact tables with detailed inspection results. The number of such tables would depend on the nature of the inspections and the disparity between them. The results tables would have the same dimensions as the high level fact along with other dimensions relating to what was inspected and possibly a metric or two that rates the condition of what was inspected.
ngalemmo
ngalemmo

Posts : 3000
Join date : 2009-05-15
Location : Los Angeles

http://aginity.com

Back to top Go down

A fact table for property inspections Empty Re: A fact table for property inspections

Post  HawkeyeDBA Thu Mar 06, 2014 4:03 pm

Thank you so much for your input. I actually was considering that same type of design. I keep forgetting it is OK to have the same bits of data in multiple locations throughout my design. I still fight the oltp side of me :-)

HawkeyeDBA

Posts : 2
Join date : 2014-03-06

Back to top Go down

A fact table for property inspections Empty Re: A fact table for property inspections

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum