Practice PostgreSQL user creation and permission management by creating a trainee role, granting database access, testing table permissions, and using GRANT and REVOKE in a realistic lab exercise.
A database administrator wants to provide a new trainee, named trainee, with controlled access to the PostgreSQL dvdrental database.
The administrator must create a new database user, allow the user to connect to the database, and test the user’s permissions. Initially, the trainee should not have permission to read data from the film table. The administrator will then grant SELECT permission on that table and verify that the trainee can retrieve records successfully.
trainee with a password.dvdrental database.trainee account.film table before granting SELECT permission.SELECT permission on the film table to trainee.trainee and retrieve the first 10 film records.