Let's say I have this database
client | id | status | sale | id | client_id | date | sale_item | id | sale_id | *client_id* |
*client_id* column is redundant, because we can JOIN and get
sale_item rows. However, if I'd often need to list sales by client, that JOIN could be expensive.
Is this considered denormalization? Or does it have another technical name?
In my understanding the decision to keep
*client_id* is about space x speed. Consistency problems introduced by common denormalization examples doesn't apply here because
id will never change neither be deleted (if we need to "remove" we can just set status=0).