SlideShare a Scribd company logo
use PostgreSQL code
Task 2
a. Create a new database called realdb.
b. Create a new schema in realdb and name it auth.
c. Create the users [Zidane, Ronaldo, Messi, Kaka].
d. Create the roles [coach, player].
e. Grant the permissions necessary to be able to create a table to the role coach.
f. Grant coach to Zidane.
g. Using other DBeaver window; log in as Zidane, also perform actions h, and i as Zidane.
h. Create a table named real_players.
i. Grant the permissions necessary to view and update the table to the role player, with grant
option.
j. Grant player role to Ronaldo and Kaka.
k. Using two other DBeaver windows; log in as Messi and as Ronaldo.
l. Try accessing the table from both connections.
m. Let Ronaldo insert some data and view it from Zidanes connection.
n. Unfortunately, Zidane have decided to leave. Drop his user.
Note: Revoke the role coach form him and reassign real_players table to coach.
o. Try accessing the table real_players from Ronaldos connection. Why is this the case?
Ronaldo did not leave the club. We want him to be able to access the table. What shall we
change in the previous routine so that Ronaldo can still access the table even after Zidane leaves?

More Related Content

More from sales87

Use the Plan X and Plan Y tax schemes to complete the following tabl.pdf
Use the Plan X and Plan Y tax schemes to complete the following tabl.pdfUse the Plan X and Plan Y tax schemes to complete the following tabl.pdf
Use the Plan X and Plan Y tax schemes to complete the following tabl.pdf
sales87
 
Use the pervious question to answer question 4. Suppose that in car.pdf
Use the pervious question to answer question 4.  Suppose that in car.pdfUse the pervious question to answer question 4.  Suppose that in car.pdf
Use the pervious question to answer question 4. Suppose that in car.pdf
sales87
 
Use the information below to Developdraw a Systemigram for enviro.pdf
Use the information below to Developdraw a Systemigram for enviro.pdfUse the information below to Developdraw a Systemigram for enviro.pdf
Use the information below to Developdraw a Systemigram for enviro.pdf
sales87
 
Use the phylogeny below to determine whether each statement is true .pdf
Use the phylogeny below to determine whether each statement is true .pdfUse the phylogeny below to determine whether each statement is true .pdf
Use the phylogeny below to determine whether each statement is true .pdf
sales87
 
Use the input function to ask the user for a positive, whole number..pdf
Use the input function to ask the user for a positive, whole number..pdfUse the input function to ask the user for a positive, whole number..pdf
Use the input function to ask the user for a positive, whole number..pdf
sales87
 
Use the code below from the previous assignment that we need to exte.pdf
Use the code below from the previous assignment that we need to exte.pdfUse the code below from the previous assignment that we need to exte.pdf
Use the code below from the previous assignment that we need to exte.pdf
sales87
 
Use este estudio de caso para responder las siguientes preguntas. .pdf
Use este estudio de caso para responder las siguientes preguntas. .pdfUse este estudio de caso para responder las siguientes preguntas. .pdf
Use este estudio de caso para responder las siguientes preguntas. .pdf
sales87
 
Usar su autoridad y poder formal para resolver un conflicto, mientra.pdf
Usar su autoridad y poder formal para resolver un conflicto, mientra.pdfUsar su autoridad y poder formal para resolver un conflicto, mientra.pdf
Usar su autoridad y poder formal para resolver un conflicto, mientra.pdf
sales87
 
Usando la teor�a de la expectativa de la motivaci�n como marco para .pdf
Usando la teor�a de la expectativa de la motivaci�n como marco para .pdfUsando la teor�a de la expectativa de la motivaci�n como marco para .pdf
Usando la teor�a de la expectativa de la motivaci�n como marco para .pdf
sales87
 
Usando Internet o fuentes de bibliotecas, seleccione cuatro organiza.pdf
Usando Internet o fuentes de bibliotecas, seleccione cuatro organiza.pdfUsando Internet o fuentes de bibliotecas, seleccione cuatro organiza.pdf
Usando Internet o fuentes de bibliotecas, seleccione cuatro organiza.pdf
sales87
 
URGENTAssignment 3 - Software DesginPauline is considering how.pdf
URGENTAssignment 3 - Software DesginPauline is considering how.pdfURGENTAssignment 3 - Software DesginPauline is considering how.pdf
URGENTAssignment 3 - Software DesginPauline is considering how.pdf
sales87
 
Uscinski and his co-authors describe how belief in political conspir.pdf
Uscinski and his co-authors describe how belief in political conspir.pdfUscinski and his co-authors describe how belief in political conspir.pdf
Uscinski and his co-authors describe how belief in political conspir.pdf
sales87
 
Uno de los beneficios del estado de flujos de efectivo es que ayuda .pdf
Uno de los beneficios del estado de flujos de efectivo es que ayuda .pdfUno de los beneficios del estado de flujos de efectivo es que ayuda .pdf
Uno de los beneficios del estado de flujos de efectivo es que ayuda .pdf
sales87
 
Uno de los m�dicos no se present� a trabajar sin llamar Los pacien.pdf
Uno de los m�dicos no se present� a trabajar sin llamar Los pacien.pdfUno de los m�dicos no se present� a trabajar sin llamar Los pacien.pdf
Uno de los m�dicos no se present� a trabajar sin llamar Los pacien.pdf
sales87
 
Unisa has invited labour unions, staff members and students to discu.pdf
Unisa has invited labour unions, staff members and students to discu.pdfUnisa has invited labour unions, staff members and students to discu.pdf
Unisa has invited labour unions, staff members and students to discu.pdf
sales87
 
Unit VII Case StudyThe employees at your organization have formed .pdf
Unit VII Case StudyThe employees at your organization have formed .pdfUnit VII Case StudyThe employees at your organization have formed .pdf
Unit VII Case StudyThe employees at your organization have formed .pdf
sales87
 
UQ�s Got Talent is a new talent show that is being launched in 2023 .pdf
UQ�s Got Talent is a new talent show that is being launched in 2023 .pdfUQ�s Got Talent is a new talent show that is being launched in 2023 .pdf
UQ�s Got Talent is a new talent show that is being launched in 2023 .pdf
sales87
 
Use python to answer Done on google colabortory. Dataset used Ol.pdf
Use python to answer Done on google colabortory. Dataset used Ol.pdfUse python to answer Done on google colabortory. Dataset used Ol.pdf
Use python to answer Done on google colabortory. Dataset used Ol.pdf
sales87
 
use partial fraction expansion and the inverse z-transform to find u.pdf
use partial fraction expansion and the inverse z-transform to find u.pdfuse partial fraction expansion and the inverse z-transform to find u.pdf
use partial fraction expansion and the inverse z-transform to find u.pdf
sales87
 
use malloc function and pointer Write a C program to calculate.pdf
use malloc function and pointer Write a  C  program to calculate.pdfuse malloc function and pointer Write a  C  program to calculate.pdf
use malloc function and pointer Write a C program to calculate.pdf
sales87
 

More from sales87 (20)

Use the Plan X and Plan Y tax schemes to complete the following tabl.pdf
Use the Plan X and Plan Y tax schemes to complete the following tabl.pdfUse the Plan X and Plan Y tax schemes to complete the following tabl.pdf
Use the Plan X and Plan Y tax schemes to complete the following tabl.pdf
 
Use the pervious question to answer question 4. Suppose that in car.pdf
Use the pervious question to answer question 4.  Suppose that in car.pdfUse the pervious question to answer question 4.  Suppose that in car.pdf
Use the pervious question to answer question 4. Suppose that in car.pdf
 
Use the information below to Developdraw a Systemigram for enviro.pdf
Use the information below to Developdraw a Systemigram for enviro.pdfUse the information below to Developdraw a Systemigram for enviro.pdf
Use the information below to Developdraw a Systemigram for enviro.pdf
 
Use the phylogeny below to determine whether each statement is true .pdf
Use the phylogeny below to determine whether each statement is true .pdfUse the phylogeny below to determine whether each statement is true .pdf
Use the phylogeny below to determine whether each statement is true .pdf
 
Use the input function to ask the user for a positive, whole number..pdf
Use the input function to ask the user for a positive, whole number..pdfUse the input function to ask the user for a positive, whole number..pdf
Use the input function to ask the user for a positive, whole number..pdf
 
Use the code below from the previous assignment that we need to exte.pdf
Use the code below from the previous assignment that we need to exte.pdfUse the code below from the previous assignment that we need to exte.pdf
Use the code below from the previous assignment that we need to exte.pdf
 
Use este estudio de caso para responder las siguientes preguntas. .pdf
Use este estudio de caso para responder las siguientes preguntas. .pdfUse este estudio de caso para responder las siguientes preguntas. .pdf
Use este estudio de caso para responder las siguientes preguntas. .pdf
 
Usar su autoridad y poder formal para resolver un conflicto, mientra.pdf
Usar su autoridad y poder formal para resolver un conflicto, mientra.pdfUsar su autoridad y poder formal para resolver un conflicto, mientra.pdf
Usar su autoridad y poder formal para resolver un conflicto, mientra.pdf
 
Usando la teor�a de la expectativa de la motivaci�n como marco para .pdf
Usando la teor�a de la expectativa de la motivaci�n como marco para .pdfUsando la teor�a de la expectativa de la motivaci�n como marco para .pdf
Usando la teor�a de la expectativa de la motivaci�n como marco para .pdf
 
Usando Internet o fuentes de bibliotecas, seleccione cuatro organiza.pdf
Usando Internet o fuentes de bibliotecas, seleccione cuatro organiza.pdfUsando Internet o fuentes de bibliotecas, seleccione cuatro organiza.pdf
Usando Internet o fuentes de bibliotecas, seleccione cuatro organiza.pdf
 
URGENTAssignment 3 - Software DesginPauline is considering how.pdf
URGENTAssignment 3 - Software DesginPauline is considering how.pdfURGENTAssignment 3 - Software DesginPauline is considering how.pdf
URGENTAssignment 3 - Software DesginPauline is considering how.pdf
 
Uscinski and his co-authors describe how belief in political conspir.pdf
Uscinski and his co-authors describe how belief in political conspir.pdfUscinski and his co-authors describe how belief in political conspir.pdf
Uscinski and his co-authors describe how belief in political conspir.pdf
 
Uno de los beneficios del estado de flujos de efectivo es que ayuda .pdf
Uno de los beneficios del estado de flujos de efectivo es que ayuda .pdfUno de los beneficios del estado de flujos de efectivo es que ayuda .pdf
Uno de los beneficios del estado de flujos de efectivo es que ayuda .pdf
 
Uno de los m�dicos no se present� a trabajar sin llamar Los pacien.pdf
Uno de los m�dicos no se present� a trabajar sin llamar Los pacien.pdfUno de los m�dicos no se present� a trabajar sin llamar Los pacien.pdf
Uno de los m�dicos no se present� a trabajar sin llamar Los pacien.pdf
 
Unisa has invited labour unions, staff members and students to discu.pdf
Unisa has invited labour unions, staff members and students to discu.pdfUnisa has invited labour unions, staff members and students to discu.pdf
Unisa has invited labour unions, staff members and students to discu.pdf
 
Unit VII Case StudyThe employees at your organization have formed .pdf
Unit VII Case StudyThe employees at your organization have formed .pdfUnit VII Case StudyThe employees at your organization have formed .pdf
Unit VII Case StudyThe employees at your organization have formed .pdf
 
UQ�s Got Talent is a new talent show that is being launched in 2023 .pdf
UQ�s Got Talent is a new talent show that is being launched in 2023 .pdfUQ�s Got Talent is a new talent show that is being launched in 2023 .pdf
UQ�s Got Talent is a new talent show that is being launched in 2023 .pdf
 
Use python to answer Done on google colabortory. Dataset used Ol.pdf
Use python to answer Done on google colabortory. Dataset used Ol.pdfUse python to answer Done on google colabortory. Dataset used Ol.pdf
Use python to answer Done on google colabortory. Dataset used Ol.pdf
 
use partial fraction expansion and the inverse z-transform to find u.pdf
use partial fraction expansion and the inverse z-transform to find u.pdfuse partial fraction expansion and the inverse z-transform to find u.pdf
use partial fraction expansion and the inverse z-transform to find u.pdf
 
use malloc function and pointer Write a C program to calculate.pdf
use malloc function and pointer Write a  C  program to calculate.pdfuse malloc function and pointer Write a  C  program to calculate.pdf
use malloc function and pointer Write a C program to calculate.pdf
 

Recently uploaded

Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrésentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
siemaillard
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
Academy of Science of South Africa
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
Dr. Shivangi Singh Parihar
 
Life upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for studentLife upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for student
NgcHiNguyn25
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
adhitya5119
 
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UPLAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
RAHUL
 
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
สมใจ จันสุกสี
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
Colégio Santa Teresinha
 
Cognitive Development Adolescence Psychology
Cognitive Development Adolescence PsychologyCognitive Development Adolescence Psychology
Cognitive Development Adolescence Psychology
paigestewart1632
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
Dr. Mulla Adam Ali
 
Leveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit InnovationLeveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit Innovation
TechSoup
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
Israel Genealogy Research Association
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
amberjdewit93
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
History of Stoke Newington
 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
TechSoup
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
GeorgeMilliken2
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
Celine George
 
How to deliver Powerpoint Presentations.pptx
How to deliver Powerpoint  Presentations.pptxHow to deliver Powerpoint  Presentations.pptx
How to deliver Powerpoint Presentations.pptx
HajraNaeem15
 
How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
Celine George
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Akanksha trivedi rama nursing college kanpur.
 

Recently uploaded (20)

Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrésentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
 
Life upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for studentLife upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for student
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
 
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UPLAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
 
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
 
Cognitive Development Adolescence Psychology
Cognitive Development Adolescence PsychologyCognitive Development Adolescence Psychology
Cognitive Development Adolescence Psychology
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
 
Leveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit InnovationLeveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit Innovation
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
 
How to deliver Powerpoint Presentations.pptx
How to deliver Powerpoint  Presentations.pptxHow to deliver Powerpoint  Presentations.pptx
How to deliver Powerpoint Presentations.pptx
 
How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
 

use PostgreSQL codeTask 2 a. Create a new database called realdb.pdf

  • 1. use PostgreSQL code Task 2 a. Create a new database called realdb. b. Create a new schema in realdb and name it auth. c. Create the users [Zidane, Ronaldo, Messi, Kaka]. d. Create the roles [coach, player]. e. Grant the permissions necessary to be able to create a table to the role coach. f. Grant coach to Zidane. g. Using other DBeaver window; log in as Zidane, also perform actions h, and i as Zidane. h. Create a table named real_players. i. Grant the permissions necessary to view and update the table to the role player, with grant option. j. Grant player role to Ronaldo and Kaka. k. Using two other DBeaver windows; log in as Messi and as Ronaldo. l. Try accessing the table from both connections. m. Let Ronaldo insert some data and view it from Zidanes connection. n. Unfortunately, Zidane have decided to leave. Drop his user. Note: Revoke the role coach form him and reassign real_players table to coach. o. Try accessing the table real_players from Ronaldos connection. Why is this the case? Ronaldo did not leave the club. We want him to be able to access the table. What shall we change in the previous routine so that Ronaldo can still access the table even after Zidane leaves?