Javier
The option to empty a table every 5 min, is that you create a task that runs every 5 min at the operating system level, for example if you are in Linux you create a crontab that runs every 5 min where you give the command
run on a terminal as root user crontab -e
and will open the cron editor where you could something like this:
* / 5 * * * * psql dbname -c "TRUNCATE TABLE table_name;" -p 5432 -U postgres
in case of using Postgresql
if mysql would be like this:
* / 5 * * * * mysql dbname -e "TRUNCATE TABLE table_name;" -P3306 -u root -p your_password
with this you would erase the table every 5 min
although if you do not have to reset the id autoincrementales or serial instead of truncate would use the delete statement