Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Advise on storing inspection results in fact and dimensions


Advise on storing inspection results in fact and dimensions

Author
Message
Hawkeye_DBA
Hawkeye_DBA
SSC Veteran
SSC Veteran (248 reputation)SSC Veteran (248 reputation)SSC Veteran (248 reputation)SSC Veteran (248 reputation)SSC Veteran (248 reputation)SSC Veteran (248 reputation)SSC Veteran (248 reputation)SSC Veteran (248 reputation)

Group: General Forum Members
Points: 248 Visits: 565
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
aaron.reese
aaron.reese
Mr or Mrs. 500
Mr or Mrs. 500 (591 reputation)Mr or Mrs. 500 (591 reputation)Mr or Mrs. 500 (591 reputation)Mr or Mrs. 500 (591 reputation)Mr or Mrs. 500 (591 reputation)Mr or Mrs. 500 (591 reputation)Mr or Mrs. 500 (591 reputation)Mr or Mrs. 500 (591 reputation)

Group: General Forum Members
Points: 591 Visits: 898
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
Hawkeye_DBA
Hawkeye_DBA
SSC Veteran
SSC Veteran (248 reputation)SSC Veteran (248 reputation)SSC Veteran (248 reputation)SSC Veteran (248 reputation)SSC Veteran (248 reputation)SSC Veteran (248 reputation)SSC Veteran (248 reputation)SSC Veteran (248 reputation)

Group: General Forum Members
Points: 248 Visits: 565
thanks for your reply, that is exactly what I decided to do :-)
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