I have two table both table are merge in third table like this
**sub_category**
Id 
Name
**category**
ID
Name
**sub_cat**
ID
sub_id
cat_id
**category**                  **Sub_Category**
ID   Name                     ID        Name
1    One_Cat                   1        one_sub
2    two_Cat                   2        two_sub
3    three_Cat                 3        three_sub
**Cat_SubCat**
ID      Cat_id      sub_catId
1         1         1
2         1         2
3         1         3
4         1         1
5         2         1
6         2         2
7         2         2
Do you See under cat_id 1 there is duplicate of sub_CatId,
and what i want is to validate that, under category one there should no duplicate subcategory same for category 2, there should no repeating subcategory under category 2
 
     
    