Is it common practice in a star schema to prefix table names as a dimension or fact table? Is it also common practice to have column names prefixed with the table name?
In my normal OLTP databases, I don't do this, but I'm seeing examples of this type of naming in star schemas.
Does it make sense to have a different set of naming standards for data warehouse schemas vs OLTP schemas?
Thanks Dwight
Table Names:
Column Names:
Warehouse vs OLTP Naming:
It is common in DWs to name columns with "long names" because those columns end up as column headers in reports (query results) and are supposed to be business-user friendly. So instead of having Product.Name
and Customer.Name
which would both show up as "Name" (unless alias is used) it is common to use Product.ProductName
and Customer.CustomerName
so they show up as "ProductName" and "CustomerName" in top row of a report (query) once the star is flattened via joins. Underscores are frequently used instead of camel-case and blanks, if allowed by the DB. Prefixes dim and fact are recommended in large DWs when table's role in the schema may not be obvious; I actually like them.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With