LoslegenKostenlos loslegen

Working with users and groups

Sandra's project at the SBA is turning into a great success. Loan processing is now much faster than before the rollout of the online loan platform. This results in the growth of the team responsible for the loan management platform. Sandra is now leading the team and recently hired 3 new developers. Before the new developers begin their first days on the job, Sandra would like to create database accounts for each user and give each account the same access privileges.

Diese Übung ist Teil des Kurses

Creating PostgreSQL Databases

Kurs anzeigen

Anleitung zur Übung

  • Create new user accounts for Ronald Jones (rjones), Kim Lopez (klopez), and Jessica Chen (jchen).
  • Create a new group named dev_team.
  • Grant the dev_team INSERT, UPDATE, DELETE, and SELECT privileges on the loan table.
  • Add the 3 new user accounts to the dev_team group.

Interaktive Übung

Versuche dich an dieser Übung, indem du diesen Beispielcode vervollständigst.

-- Create a user account for Ronald Jones
CREATE ___ rjones WITH ___ 'changeme';

-- Create a user account for Kim Lopez
___ ___ klopez ___ ___ 'changeme';

-- Create a user account for Jessica Chen
___ ___ ___ ___ ___ ___;

-- Create the dev_team group
___ ___ ___;

-- Grant privileges to dev_team group on loan table
GRANT ___, ___, ___, ___ ON ___ TO ___;

-- Add the new user accounts to the dev_team group
ALTER GROUP ___ ADD USER ___, ___, ___;
Code bearbeiten und ausführen