Atomic Shrimp
Humanoid lifeform
- Local time
- Today, 08:30
- Joined
- Jun 16, 2000
- Messages
- 1,954
I know how to do this in theory, it's the practical outworking of it that I can't seem to get my head around.
There's a table of incoming transaction data, to which new records are continually being added.
A succession of sales promotion periods takes place. They are of variable duration, but one immediately succeeds the next.
The process generating the raw transaction data knows nothing about the promotion periods and so cannot store the relevant promotion period ID in the transaction record.
So how do we describe the sales promotion periods? If we store a start and finish date for each, we then have to make sure there are no gaps or overlaps
And if we just store the start date of the promotion period, how do we determine which one of the periods any given transaction fell into? (because although the transaction date is greater than the start date of the relevant period, it's also greater than the start of the previous period).
I see scenarios like this quite a lot, when people talk about normalising their data and not storing something like cost prices, which can be calculated later - but how should they be stored, and how is the right one picked out later?
There's a table of incoming transaction data, to which new records are continually being added.
A succession of sales promotion periods takes place. They are of variable duration, but one immediately succeeds the next.
The process generating the raw transaction data knows nothing about the promotion periods and so cannot store the relevant promotion period ID in the transaction record.
So how do we describe the sales promotion periods? If we store a start and finish date for each, we then have to make sure there are no gaps or overlaps
And if we just store the start date of the promotion period, how do we determine which one of the periods any given transaction fell into? (because although the transaction date is greater than the start date of the relevant period, it's also greater than the start of the previous period).
I see scenarios like this quite a lot, when people talk about normalising their data and not storing something like cost prices, which can be calculated later - but how should they be stored, and how is the right one picked out later?