Map tables to save access history

Asked

Viewed 37 times

0

I have an application, in which I need to save at least once on the day, the date and time that user accessed the application/ system. Because we charge at the end of the month for the number of days it used the app/software.

How best to map this table?

  • 1

    A Logacess table with User Id, Date / Time and Ip would not be enough? Hence every time the user logs in, you save this information in the Log Access table.

  • I’m thinking about the volume of data, because this would have to be done for every day of the year and in the queries I should separate by month.

  • As for data volume I see no problem as you can work with a Nosql database! Even with a relational database, you’d have to have a lot, but a lot of record to start thinking about performance!

  • You use Webapi to serve your app?

  • @miltoncamara utilizing a backend service similar to firebase.

  • So rest assured, because these services support a good amount of data, in my case I use Azure Document DB and works very well!

  • @miltoncamara Thanks!

Show 2 more comments

1 answer

0

I believe that for this you can create a very simple table with the columns:

  • ID of the user accessing
  • date and time.

In some applications I create I usually separate the date column into two columns, one with only the date and the other with hours and minutes, as it ends up facilitating in some queries.

There is no 'best way" to map a table but a better way that will suit your application.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.