Creating multiple instances of a generic database
- by sagekilla
Hi all, currently I'm trying to have a setup where a generic database is distributed to students. They would develop an application using this database (Say a shopping cart application), submit their project onto our server, and then it would be graded automatically.
These databases are being run in Microsoft SQL Server 2005.
We're using user instances to instantiate each database, and multiple requests could be serviced at once. But, the problem is when more than one student submitted a project to be graded, the first database to be instantiated would be the only one and would overwrite all other copies that were currently open.
So if stu1 modified his database and stu2 and stu3 had their projects being graded concurrently, at the end of the grading stu1, stu2, and stu3 would have identical DB's at the end.
Is there any way I can have multiple independent copies of a generic database, each of which I can load concurrently and modify without having any changes made to any one affecting the others?
I did a little reading, and thought it might be possible to do something along the lines of:
Student submits project
Attach the database with unique db
name (specified by student)
Do all necessary operations
Detach the database
I'm unsure if this would fix our problem or be possible, so any help would be much appreciated!