I am designing a live demo version of a software I wrote. The database is modeled using MySQL, and comes with dummy data ready to use. What I would like to do is to have it generated the time a user signs in to try the demo, and have it be removed after he/she logs off or closes the system. What would be the best approach to solve such problem?
when a user login you can open a transaction in the database and never do the commit, then when he log out you just do a rollback or wait for database session expires.
This solution is easy to implement and the changes will be not visible for other users.