Advise on storing inspection results in fact and dimensions

  • Howdy!

    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

  • one option would be to have multiple fact tables. this is demonstrated in the AdventureWorks SSAS walkthrough where there is a fact_internetSales and a fact_ShopSales

  • thanks for your reply, that is exactly what I decided to do 🙂

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply