In MySQL you can run tables just in memory. These tables are great for temporary data since they are cleared out when MySQL closes, and since they are in memory they are accessed quickly.
When you are creating a table just make sure you set it to use:
ENGINE = Memory
To convert an exisiting table to reside in memory you can use the following sql statement on the database:
ALTER TABLE my_table ENGINE = Memory;