Is it possible to use foreign key on Android OS? I ask this question because this code in my app finished with error when it started on emulator( eclipse did not show any error throw compiling):
Code:
myDB.execSQL("CREATE TABLE IF NOT EXISTS "
+ categories
+ " (category_id PRIMARY KEY,FOREIGN KEY(parent_id) REFERENCES categories(category_id)),name text,amount float);");
myDB.execSQL("CREATE TABLE IF NOT EXISTS "
+ accounts
+ " (account_id PRIMARY KEY, name text);");
myDB.execSQL("CREATE TABLE IF NOT EXISTS "
+ tranzactions+
" (transaction_id PRIMARY KEY, FOREIGN KEY(account_id) REFERENCES accounts(account_id)), FOREIGN KEY(category_id) REFERENCES categories(category_id)),t_date date,amount float;");
i ve read that i have to use triggers for eliminate this error.Is it true?