etistudent
Technical User
Hi!
Let's say we have two dimensions: customer and vendor, and one fact table with columns: customer_id, vendor_id and value.
In one row in fact table we can have reference to customer dim or vendor dim (never to both of them).
Is it better to put in customer and vendor dim row with NULLs in all columns and put into facts foregin key indicates to it
or
put into fact table NULL or "0" (foregin key indicates to nothing) as vendor or customer foregin key??
Is one of theese solutions better for ETL project performance or maybe better for future queries to warehouse??
Let's say we have two dimensions: customer and vendor, and one fact table with columns: customer_id, vendor_id and value.
In one row in fact table we can have reference to customer dim or vendor dim (never to both of them).
Is it better to put in customer and vendor dim row with NULLs in all columns and put into facts foregin key indicates to it
or
put into fact table NULL or "0" (foregin key indicates to nothing) as vendor or customer foregin key??
Is one of theese solutions better for ETL project performance or maybe better for future queries to warehouse??