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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T10:37:31+00:00 2026-05-18T10:37:31+00:00

A daemon returns every minute a list of users that are currently checked into

  • 0

A daemon returns every minute a list of users that are currently checked into a facility. To enter or leaver one has to use a smart card.

The final solution should allow to see which user had been checked in for how long and when.

My question is: Is it better to
a) log the raw output of the daemon into one table of a sql database, and do all the logic if needed based on the raw data, or
b) Programm some logic into the daemon, so that sql entries are only generated when something changes?

In the second case (which I am tending toward at the moment) how should I build the sql tables?

a) One table for every unique user (it should be possible to add user in case they appear) that lists
Check in Time || Check out Time || Duration

b) Only one table
User || Check in Time || Check out Time || Duration

c) A user table and linked time logging table
User || Boolean(checkedin)

User ID || Check in Time || Check out Time || Duration

Does anyone have experience how to design such a scenario to avoid future caveats

  • 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-18T10:37:32+00:00Added an answer on May 18, 2026 at 10:37 am

    Based on the information available, option b) gets my vote.

    If your RDBMS allows, consider making Duration a computed column. For Microsoft SQL Server, that would look like:

    create table SecurityLogging (
        UserId int,
        CheckInTime datetime,
        CheckOutTime datetime,
        Duration as datediff(minute, CheckInTime, CheckOutTime)
    )
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am going to have a daemon that will run on a FreeBSD server,
I'm writing a daemon in Java that takes in requests from multiple providers in
I'm trying to get a list of all users and all groups on Mac
I'm writing a high-loaded daemon that should be run on the FreeBSD 8.0 and
I have a class that goes and grabs some data and returns it as
I want to program a daemon-manager that takes care that all daemons are running,
I have written a linux daemon that will be (and must be) running as
So I have a daemon running on a Linux system, and I want to
I have a Solaris daemon written in Java6. Clients can connect to it using
I am working on creating a daemon in Ruby using the daemons gem. I

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.