database - SQL : Column check constraint cannot reference other columns. (for different tables) -


i have 2 tables:
t1(a,b) where
create table t1( char(2) not null primary key check(t1.a not in t2.b), b char(2) unique );

t2(c,b) where
create table t2( c number(2) primary key, b char(2) unique references t1 check(t1.b not in t1.a) );

here, t2.b references t1.a.

my question how can put check constraint t1.a , t1.b such values allowed t1.a different allowed t2.b?

the knapsack problem in worst case needs verify subsets of given knapsack determine best combination put in knapsack hence worst case performance using backtracking evaluates valid combinations o(2^n) no of subsets of given set of n items. hence has exponential time complexity.


Comments

Popular posts from this blog

jQuery Mobile app not scrolling in Firefox -

c++ - How to add Crypto++ library to Qt project -

php array slice every 2th rule -