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 7578555
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T17:27:37+00:00 2026-05-30T17:27:37+00:00

Possible Duplicate: User Activity Profile and Statistics I want to record users activity in

  • 0

Possible Duplicate:
User Activity Profile and Statistics

I want to record users activity in my web application.I am talking about only following tables

Table 1:User<br>
Table 2:Sports<br>
Table 3:UserActivity

Option 1:
If user login/logout/Invalid login or sports inserted/updated/deleted. I log
activity from C# code in activity table against activity type.

Option 2:
I can use triggers in database to record user activity.

Which option is bettor and why eor you suggest any other option

There are many tables in database,I am just taking about two tables(user and sports)

  • 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-30T17:27:38+00:00Added an answer on May 30, 2026 at 5:27 pm

    There are pros and cons to both solutions

    Implementing the activity logging in the application layer will generally be easier to implement and more flexible than database triggers, but will not be as robust, and there is no guarantee in the database that all activities are logged.

    On the other hand, implementing the activity logging in the database layer is useful when you want to guarantee robustness, but is less flexible, and might not be portable across SQL implementations.

    Your decision should be based on what your needs are.

    Use application layer level logging if:

    • Logging the activities requires complex logic
    • You want the code to be portable across database implementations
    • It is not the end of the world if you miss some things

    Use database layer level logging if:

    • The data in the activity log is simple and doesn’t require a lot of logic to create
    • If database portability isn’t a concern
    • You want to guarantee that all activities are logged
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: jQuery scroll To Element Basically, I want my user to be instantly
Possible Duplicate: License for C# desktop application I want to make my program lock
Possible Duplicate: How can i get the path of the current user's “Application Data”
Possible Duplicate: Creating online help in Java Swing application - using pdf user docs
Possible Duplicate: User control javascript I defined a JavaScript function inside a user control.
Possible Duplicate: Get CVS history for a particular user Is it possible to list
Possible Duplicate: JavaScript Function Definition in ASP User Control Hi, I have a generic
Possible Duplicate: What is the best way to store user settings for a .NET
Possible Duplicate: Can I protect against SQL Injection by escaping single-quote and surrounding user
Possible Duplicate: Merging: hg/git vs. svn Hi, I'm a long time SVN user and

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.