Is a temporary table a good solution for importing temporary data into a database i am facing the following scenario. I have a student database in which exam results are stored. Every now and then i get a list with the names of certain students for which i need to find out how well they performed in an exam. After i have finished with my queries i don't need the temporary student data anymore. I am trying to think of an elegant way of how to store this temporary student data in my database.  The only thing i found out  that in my opinion could be a solution to my problem is a temporary table, however i am not sure. My tables have the following structure.

Student
id(PK), matriculation_number, first_name, last_name, course_of_study, email

Exam
id(PK), student_id(FK), grade

Temporary student list
matriculation_number, first_name, last_name


All in all what i am trying to achieve here is import the temporary student list into a table, then compare it with the student table, using the matriculation number, in order to get the id of the student and finally use the student id to access all the  exam results for that particular student. 

What do you think is a temporary table a good solution for the above problem? If not how would you go about it?

I am using MySQL as RDBMS.
I see 2 ways to do this, your temporary table idea or running them through one at a time.  Which way to go depends on how many records we are talking about.  If its 3 or 4 names at a time then running them individually may be faster but if we are talking larger than 20 or so a temp table would be the way to go.

Overall the best way depends on your requirements.  I use temporary tables for things like this all the time, they are quick and easy and definitely not a "Wrong" choice.

My personal choice would be to write a program to have some one else do it but if that is not an option we see where we go.