Lab 4 - More PostgreSQL Administration
Lab 4 - More PostgreSQL Administration
Part of this programming assignment will be presented to the lab instructor during the lab.
It has to be submitted to Moodle by next week.
General Rules:
• Cheating and Copying: Any form of cheating or copying from other students' work will result in a zero
grade for all involved students, regardless of who copied from whom. Each assignment must be entirely
unique.
• The instructor will explain to all students what is required, and give some useful hints.
• You will have assignments to be presented and graded during the lab. In case the student did not finish,
he/she will be graded on the finished part.
• Sometimes the lab will span two weeks, a first part will be presented in the first lab session.
• You can ask questions during the lab, regarding what to do, not how to do.
• You can make use of your notes, and any information online including chatGPT and Google.
• You can use your laptops, or the available desktops.
• Please refer to the Student Code of Conduct, all relevant university policies, and the course syllabus for
further penalties related to academic offenses.
• Students that have accommodation letters should contact us as soon as possible.
• Lab attendance is mandatory, any absentee will have a zero for any missing lab.
• In case you have a valid excuse to miss a lab, please present it before the lab for the instructor approval.
Objectives:
• The purpose of this lab is to provide students with their first practice in understanding PostgreSQL
database administration.
• This lab will also introduce the use of basic SQL statements, like Select, Insert Into, and Update, that you
will learn deeper later on.
• PostgreSQL is a strong RDBMS that support all DBMS features such as concurrency, stored procedures
and functions, triggers and database administration. It is useful in designing from small personal database
to more advanced ones.
• In this lab, we will stress on more advanced roles work and to backup and restore a database.
• The instructor may not ask to show all assignment parts, but only some. Be sure when presenting to have
everything ready.
Page 1 of 2
PART I – More on PostgreSQL Administration, user password
• Open PostgreSQL, connect to the available database postgres, the default password is postgres.
o Use your password if you changed it during installation.
• Right click schema, and select Query Tool.
• Display the current set user.
• Change the password of the read user.
• Set role to the power user with full privileges on database EECE433.
• Can you change the password of the above user?
• Now set the role directly to the user, can you change its password?
• Set role to postgres, create a new user who will expire tomorrow.
Page 2 of 2