Can a fact table have no keys at all?
or
if it can, is it a good design? If a fact table do not have any dimensions, on what basis is it analyzed?
What if a fact table has primary key/s only and no foreign key/s?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Speaking inexactly, the foreign keys link you to the tables that break your fact table into categories and sub-categories.
So if the fact table was
Then the kindOfStore would be your dimension- if that was it, then you could argue that a separate table for kindOfStore is overkill (except for the space wasted saying kind of store = “Food” instead of “Kind_id= 8”. If you have sub categories, it make sense to link to a diminsion table like
It would be space inefficient space wise to store the Variety, Specialization and Subspecialization in the fact table.
The resulting schema is star schema and data warehouses are optimized to deal with those schemas, although newer and faster data warehouse engines seem to be so fast that even a non-star schema is pretty fast.
Datawarehouses denormalize (use fewer tables) the fact tables as compared to a OLTP database, but by no means does that mean that you should strive for a single table solution.