FACT TABLE updated

Coco Beans
Coco Beans used Ask the Experts™
on
Hi,

I have an issue with my FACTS. I'm not sure what I should do with it.  

I have an registration fact table.  A student is registered in a College in January.  At the time of registration, the College is a public College.  Every February the colleges can be given a private status, and any registration after February will be at a 'Private College'.

When I try to analyse the number of students in a private college.  Anyone registered in January is public but after January is Private.  Once the college turns private, I would like to the registration to be classed as private.

I was thinking of adding a flag to my FACT private/Public.  And updating the Flag retrospectively if the College changes status.


Any thoughts?


Thanks for any help!
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
"Batchelor", Developer and EE Topic Advisor
Top Expert 2015
Commented:
Since the status will not change often, you can do that. Usually you should refrain from retrospective changes, but here it is ok.
A different approach is to store public/private time periods in a different table, and compare the registration date against this table. You would do that only if there are several switches of status, or you do not want to change FACTS entries.
May be this flag shoud be in table with College properties?
Qlemo"Batchelor", Developer and EE Topic Advisor
Top Expert 2015

Commented:
Simce you have to check against FACTS, no. If the flag had effect on all registrations, that would work, but here you need more than just a single global flag.
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

ste5anSenior Developer

Commented:
hmm, the registration is the fact table as you said. Then the college is a dimension. According to your description a SCD-2 (slowly chaninging dimension, type 2).
Qlemo"Batchelor", Developer and EE Topic Advisor
Top Expert 2015

Commented:
That's oversized, ste5an, and against KISS. You do not have to document in each record why the status has been changed, because there is a single and simple event changing a lot of records.
ste5anSenior Developer
Commented:
?? SCD2 is

SurrogateKey, NaturalKey, Name, Status, ValidFrom, ValidTo
1, MIT, Massachusetts Institute of Technolgy, public, 2000-01-01, 2017-1031
2, MIT, Massachusetts Institute of Technolgy, private, 2000-01-01, 2017-1031

Thus registration is

CollegeKey, StudentKey, RegistrationDate, FurtherFacts
1, 1, 2017-01-01,..
2, 2, 2017-01-01,..

As we have a strong time dependence, the question to be answered is not

When I try to analyse the number of students in a private college.

but

When I try to analyse the number of students in a private college at a given point in time.

Which can only be answered with a SCD2. The only shortcut - in the sense of KISS - is, when in the requirements is stated, that the given point in time is always now. Possible, but many years of experience tell me, that this is not true.
Coco BeansDesigner

Author

Commented:
Thank you

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial