Is it possible to send message in users on database? Like a messenger but Using only database. I'm not using any network components btw .
Firebird has a feature called "Events", which is not available in other database management systems. Events are notification messages sent asynchronously from server to clients. If you're not a firebird user, just create a table("Messages" for example), with the following fields:
ID(integer) -->unique id
FROM_ID(integer) --> sender's id *
TO_ID(integer) --> receiver's id *
DATETIME(timestamp) --> when the message was sent
TEXT(varchar or blob)-->message text
STATUS(integer)-->message status(0 -> not received, 1-->received)
* I assume each user has an uniqiue id, if not you should redesing the database
When a user wish to send a message, just insert a new record into the table with the appropriate data.
From time to time, each client will fetch the table, if the client's id and "to_id" are the same, plus the message "status" is zero, display the message to the user, then change status to 1. You can move messages with status 1 to a history table to avoid bloating.