From the course: Learning Relational Databases

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Work with historical values

Work with historical values

From the course: Learning Relational Databases

Start my 1-month free trial

Work with historical values

- [Instructor] Through the interview process, we learned what data items were relevant to the current business needs. One additional perspective that we need to take is to understand how the organization will treat historical data. Often this will require a separate data item to store the historical values separate from the current value. Here's two examples of what this means for the Two Trees Olive Oil Company. The first deals with storing prices. Typically we would keep track of the current price of a product in the record for each product. But when a customer purchases a product, we might also want to keep track of the purchase price at the time of the transaction. We can do this by copying the current price into the line items table. Now if our pricing changes in the product's table, it won't affect the total price on our old invoices. Solving the problem created a new data item that we need to add to our growing list. In this case, I've called it purchase price and we'll put in…

Contents