There are different options to do this. I will mention two:
Option 1:
Add a column called IsHistory to your table. You will end up with something like this:
Name | Address | Username | UserType | IsHistory
------------+-----------------+-----------+----------+----------
Christopher | 123 Fake Street | Lover1234 | 1 | 0
Then when you update the record, change the IsHistory value on the old record to 1, and then add a new record with the updated information, with the IsHistory record to 0. You will end up with something like this:
Name | Address | Username | UserType | IsHistory
------------+-----------------+-----------+----------+----------
Christopher | 123 Fake Street | Lover1234 | 1 | 1
Robert | 123 Fake Street | Lover1234 | 1 | 0
Option 2:
Add a log table, where you can have the following:
LogID | Entity | ActionType | Description | OldDataXML
Then, each time that an update occurs, insert a record here.
- LogID is the PK
- Entity is the table that was affected by the update
- Action Type is the action taked on the Entity (INSERT, UPDATE, DELETE)
- Description is a brief text explaining the change
- OldDataXML is the data that was on the record before the changes in XML.
For example:
<User Name="Christopher"
Address="123 Fake Street"
Username="Lover1234"
UserType="1">
</User>
In this option, the record on the Users table will be always the latest one, and on the log table you will have the information of the changes.
Hope this can help you.