Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Advise on storing inspection results in fact and dimensions Expand / Collapse
Author
Message
Posted Thursday, March 6, 2014 12:25 PM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Monday, September 15, 2014 7:04 AM
Points: 219, Visits: 458
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

Post #1548432
Posted Friday, March 21, 2014 9:56 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Wednesday, July 30, 2014 10:34 AM
Points: 386, Visits: 624
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

Post #1553572
Posted Tuesday, March 25, 2014 10:20 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Monday, September 15, 2014 7:04 AM
Points: 219, Visits: 458
thanks for your reply, that is exactly what I decided to do
Post #1554574
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse