Check out example codes for "select all domains of database firbird". It will help you in understanding the concepts better.

Code Example 1

SELECT
  f.rdb$field_name
FROM
  rdb$fields f
  LEFT JOIN rdb$relation_fields rf
    ON rf.rdb$field_source = f.rdb$field_name
WHERE
  rf.rdb$field_name IS NULL
  AND
  COALESCE(f.rdb$system_flag, 0) = 0

Learn ReactJs, React Native from akashmittal.com