I flushed the data in SQLite from the Json data that I get. Now my question is: I have one database with several tables. I want to link several tables using id's.These there - these are 3 tables that I created.
This is the first table in which there is a list of products,
private static final String DATABASE_CREATE_PRODUCT = "CREATE TABLE if not exists " + "product_template" + " (" + "_id" + " integer PRIMARY KEY autoincrement," + "name" + "," + "list_price" + "," + "create_date" + "," + "default_code" + "," + "ean13" + "," + "image_new" + "," + "image_variant" + ");";
This is the second table in which there is a list of partners,
private static final String DATABASE_CREATE_PARTNER = "CREATE TABLE if not exists " + "res_partner" + " (" + "_id" + " integer PRIMARY KEY autoincrement," + "phone" + "," + "mobile" + "," + "name" + ");";
This is the third table where we have an account row,
private static final String DATABASE_CREATE_LINE = "CREATE TABLE if not exists " + "account_invoice_line" + " (" + "product_id" + "," + "partner_id" + ");";
In the third table, I have two product_id and partner_id columns, I have to match the partner_id values with the column of the second column_id table , and I have to get the values of the name column in it and through the values in the partner_id column. I have to match the first _id table , and I have to get the values in the name column.
Can someone help in creating a relationship between these tables?