Check out example codes for "how to create an SQL table in ruby". It will help you in understanding the concepts better.
Code Example 1
def self.create_table
sql = <<-SQL
CREATE TABLE IF NOT EXISTS students (
name TEXT,
grade TEXT
)
SQL
DB[:conn].execute(sql)
end
Learn ReactJs, React Native from akashmittal.com