Create database tables and manage activity over time
P粉054616867
P粉054616867 2023-09-14 09:27:53
0
1
556

There are two types of users, one is free users and the other is paid users. As a user with the FreeUser role, I can only have 3 open (time has not yet ended) activities because PayingUser has no limit. How to manage it in database table

P粉054616867
P粉054616867

reply all(1)
P粉155710425
UserType
  usertypeid, PK
  usertype, NN

User
  userid, PK
  username, NN
  usertype, FK UserType.usertypeid

You have several options for events.

  • Store the activity counter in the user session.
  • Store the activity counter in the database. This can be a simple counter in the users table
  • If you have a high availability configuration (more than 1 application server) you will have to share sessions, or store counters in a database to ensure that your counters still function in the event of a server failure.

Regardless, the logic behind activity management is handled by the application.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template