问题描述:

While designing, I encountered a problem for my VB.NET based Winforms Application.

I am storing some master data in my database as a first step of my software cycle.

That master data will be used to make Purchase and Sale entry in my software's Voucher section.

Suppose user selects an item in Purchase section, I retrieve all the item's information from database and then on save, Purchase voucher is saved with that information.

Now suppose, user changes master item details, i.e. price, weight.

It works fine for new entry. When I open old entry, it will show the new price and weight though it should show old price and weight as this entry is old.

How can I avoid this design/workflow problem in my application?

网友答案:

You should normalize your data. Do not store copies of data in your database. Create entities and store only relations between them.

Read some tutorials on database normalization

相关阅读:
Top