Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6073423
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T10:16:09+00:00 2026-05-23T10:16:09+00:00

I need to keep track of the CreatedByUserId ModifiedByUserId CreatedDateTime ModifiedDateTime for most of

  • 0

I need to keep track of the

  • CreatedByUserId
  • ModifiedByUserId
  • CreatedDateTime
  • ModifiedDateTime

for most of my entities. Pretty standard.

Do you think it’s better to add these columns to every table…or to just have a CreatedAuditEntryId and ModifiedAuditEntryId FKs on the tables you want audited that point to existing separate auditing tables which are used to keep track of all changes.

AuditEntry looks like:

  • Id
  • UserId
  • DateTime

There’s the obvious performance impact of having to do two joins to get the Created and Modified information…but the benefit is that I’m not maintaining state in two difference places, which is like cardinal rule number one in my design book.

UPDATE:

Just to be clear, the AuditEntry table contains every modification to every table, regardless. The question here is whether to utilize that table for Created and Modified information via FKs…or to just add the four columns above to each table I want the information for, so as to avoid the joins.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T10:16:10+00:00Added an answer on May 23, 2026 at 10:16 am

    My preference would be for a separate audit table with a FK relationship otherwise you can only see the last entry and that’s not much of an audit…

    What are you using to update these entries? If UserID can be implied from the SQL user it can all be done in triggers.

    I’m looking at something similar in MVC and about to implement a filter to record system-wide controller actions in a who, what when and to-what type table.

    EDIT: in view of the updated question where it is clear that the Audits table will be existing anyway, I’d have to choose linking to the audit table. The thought of having non-coherent audit data is just too scary! Unless the app is totally crippled by the relational design, keep it normalized!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a web application where I need to keep track of most popular
I need to keep track of how many items are in a node of
I need to keep track of std::set element by saving the iterator returned by
I need to keep track of number of hits on a particular item in
I need to keep track of which user has visited which page how many
I need to keep track of indexes/rows that are selected. When a row is
I need to keep track of the previously selected segment of a UISegmentControl. Is
If I need to keep track of a key or token that identifies a
In my application I need to keep track of a list of objects that
I've got a list of number that I need to keep track of. The

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.