Sign in
Log inSign up

What is the proper way to save audit information in a database

Karan Sharma's photo
Karan Sharma
·Oct 5, 2017

I'm working on an application where I need to save basically :

  1. CreatedBy (FK to the person table)
  2. CreatedDateTime
  3. UpdatedBy (FK to the person table)
  4. UpdatedDateTime

Right now I have these fields in all the tables in my database. But I feel like there should be a better way to do this.

Hassle-free blogging platform that developers and teams love.
  • Docs by Hashnode
    New
  • Blogs
  • AI Markdown Editor
  • GraphQL APIs
  • Open source Starter-kit

© Hashnode 2024 — LinearBytes Inc.

Privacy PolicyTermsCode of Conduct