'SQL Live playground for executing queries and displaying output
I have created a playground for executing sql queries on my website wherein user can execute any query on existing tables with some data in it that are provided by me. My intent is to display the output of any query that users puts in. As there would be lots of users visiting my site, how can I achieve this goal using only one database or if I create a new database with some tables already added for each user on their visit to website then it would be very difficult to manage the databases. If I have to do it with one database there would be multiple queries getting executed on the same database by number of unique users and if a new user visits the website he/she will see this modified database when he/she fires a select statement(Let's say one user deletes a record then that record would not be visible to other users). Could anyone help me out by describing what would be the correct approach to achieve this goal. Should I create a unique database for each user and let the user perform its operations and using sql scheduled job delete this database after 2-3 hours of creation or is there any way to achieve it using only one database. Note: I am redirecting all the queries to sql server and fetching and displaying the output to my website.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
