Consider following table structure, for the backend of a website:
[Article]
ArticleId
Text
TotalViews
AuditModifiedOn
AuditModifiedByUserId
[User]
UserId
An anonymous/not authenticated user visits an article, and this causes the TotalViews counter to increase. What should the AuditModifiedByUserId become when updating the record?
- NULL (because we have no UserId)
- The UserId of an "Anonymous" user specifically made to handle these situations.
TotalViews
) side by side with business-critical data (ArticleId
)? Any user obviously should be able to change the view count but not the ID.