Check out example codes for "how to create a new user in postgresql". It will help you in understanding the concepts better.

Code Example 1

CREATE DATABASE yourdbname;CREATE USER youruser WITH ENCRYPTED PASSWORD 'yourpass';GRANT ALL PRIVILEGES ON DATABASE yourdbname TO youruser;

Learn ReactJs, React Native from akashmittal.com