Check out example codes for "how to give access to database in postgresql server to another user". It will help you in understanding the concepts better.

Code Example 1

GRANT permissions ON DATABASE dbname TO username;

Learn ReactJs, React Native from akashmittal.com