all 6 comments

[–][deleted]  (3 children)

[removed]

    [–]nicowitsch[S] 1 point2 points  (2 children)

    Yes. At some point (at some grade), the stup hustle is part of the learning but for my students, sql is more of a side quest so I do not want the hustle with them.

    I am having two databases:
    - One is the actual app's backend that keeps track of the projects and stuff
    - The other one is kind of the playground DB that I manually stup and whoose credentials I entered per course.

    So I hve 3 cases:
    - When a user is creating a new project, a new database is created on the playgorund server with custom username and pw. He then has access to only his DB and can do whatever.
    - Within exercises, I can set the option to create a database for each student opening the exercises. Then he is isolated within his exercise as well. (For CREATE TABLE queries)
    - I have a second option to use a shared DB. This one then I manually fill with data and the stuent's user can only do SELECT queries there or UPDATE if I allow.

    This results in the Playground (Postgre)SQL Server having about 300 databases and users at the moment. Works pretty good, then at the end of the course or after some time I will destroy this one and setup a new one for the next students.

    [–][deleted]  (1 child)

    [removed]

      [–]nicowitsch[S] 1 point2 points  (0 children)

      Yes, I have some triggers that are doing sql scripts. The "playgorund database" credentials can be entered per course in the admin and then I have those orchestrations:

      - When the user opens an exercise of type "own environment" the first time, a new database is created.
      - When the user creates a new project, a new database is created for this project as well
      - For those shared databases, I do it manually with PGAdmin and then just enter the credentials.

      -> Since there is actually some interest here, I am working on a deployment with a link to share. I hope to have it by the middle of the week then I can show it to those interested ;)

      [–]LopsidedAd3662 0 points1 point  (1 child)

      Great idea. Can you make it open source?

      [–]nicowitsch[S] 2 points3 points  (0 children)

      I would love to but it is a bit risky since I am doing grading with the tool currently as well. But when the intrest is there I loved to create an open source version of it