Is there more efficient way to keep a track of all requests made by each user with timestamp? And then filter the requests every fortnight to invoice the users?
Example DB schema
Table: user; Attributes: UserID (PK)
Table: item; Attributes: ItemID (PK)
Table: user_request; Attributes: UserID, ItemID, Timestamp
where UserId and RequestID is composite key
How should one invoice requests made by users. Is the only way to filter the stored requests based on invoice period and count the records within that period? Is there a more efficient/suitable way to invoice the requests?
What DB design are other services that charge users made on usage rather than subscription that charge on a set num of requests. Please note I'm referring to requests for data. The service would be charging users based on number of requests made for data.