FACT TABLE updated

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!
Coco BeansDesignerAsked:
Who is Participating?
 
QlemoConnect With a Mentor Batchelor, Developer and EE Topic AdvisorCommented:
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.
0
 
als315Commented:
May be this flag shoud be in table with College properties?
0
 
QlemoBatchelor, Developer and EE Topic AdvisorCommented:
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.
0
Improve Your Query Performance Tuning

In this FREE six-day email course, you'll learn from Janis Griffin, Database Performance Evangelist. She'll teach 12 steps that you can use to optimize your queries as much as possible and see measurable results in your work. Get started today!

 
ste5anSenior DeveloperCommented:
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).
0
 
QlemoBatchelor, Developer and EE Topic AdvisorCommented:
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.
0
 
ste5anConnect With a Mentor Senior DeveloperCommented:
?? 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.
0
 
Coco BeansDesignerAuthor Commented:
Thank you
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.