Check out example codes for "how to check table exists or not in postgresql". It will help you in understanding the concepts better.

Code Example 1

SELECT 1 FROM information_schema.tables
WHERE table_schema = 'schema_name'	AND table_name = 'table_name';

Learn ReactJs, React Native from akashmittal.com