Check out example codes for "sqlite foreign key". It will help you in understanding the concepts better.

Code Example 1

CREATE TABLE track(
  trackid     INTEGER, 
  trackname   TEXT, 
  trackartist INTEGER,
  FOREIGN KEY(trackartist) REFERENCES artist(artistid)
);

Learn ReactJs, React Native from akashmittal.com