CREATE TABLE IF NOT EXISTS directory ( number INTEGER PRIMARY KEY NOT NULL, -- This is the directory phone number name TEXT NOT NULL, -- This is the text of the entry, set by the user. route INTEGER NOT NULL, -- This is the ID of the route that owns this entry. Foreign key to routes.id FOREIGN KEY(route) REFERENCES routes(id) )