Check out example codes for "postgresql createdb". It will help you in understanding the concepts better.

Code Example 1

$ createdb -p 5000 -h eden -E LATIN1 -e demo
CREATE DATABASE demo ENCODING 'LATIN1';
/*createdb [connection-option...] [option...] [dbname] [description]*/

Learn ReactJs, React Native from akashmittal.com