I am a leading developer in a commercial Windows application (C #). The new requirement is to track customers who abuse the license.
For example: let's say a customer buys 10 user license agreements, i.e. 10 concurrent users at any given time.
I need to be able to report, looking back at the story, all the time when the client had more than 10 users registered at the same time.
I already have a User table with columns: userid (primary key), pw, lastLogin, lastLogout.
I was thinking of creating a new registration table in which a new row is added every time a user logs out ... columns may include:
LogId, UserId, LoginDateTime, LogoutDateTime
... and then I will have a story every time a user logs in / out of the application ...
but I'm not sure that this table design will provide efficient calculations for reporting ... no matter if I use SQL or C # to do the calculations, it doesn't matter to me if it's fast enough ...
Hoping that someone can have a good idea of how best to develop this table so that I can quickly calculate all / all points in time when the client exceeded the license limit.
Note. I do not want to block user 11t, 12th, etc. from using the application ... The requirement is to display a warning to the user, but so that he continues to work ...
source
share