![universal database all subjects questions universal database all subjects questions](https://venturebeat.com/wp-content/uploads/2020/03/a-1.png)
![universal database all subjects questions universal database all subjects questions](https://venturebeat.com/wp-content/uploads/2018/06/Scan-image.jpg)
Second inner query will return those S_IDs for which C_ID is equal to any member of set (C1 and C3 in this case) which are S1, S2 and S4. The innermost query will return a set with members C1 and C3. Select S_ID from STUDENT where S_ID NOT IN NOT IN: If we want to find out S_IDs of STUDENTs who have neither enrolled in ‘DSA’ nor in ‘DBMS’, it can be done as: (SELECT C_ID from COURSE where C_NAME=’DSA’ or C_NAME=’DBMS’)) (Select S_ID from STUDENT_COURSE where C_ID IN Note: If we want to find out names of STUDENTs who have either enrolled in ‘DSA’ or ‘DBMS’, it can be done as: The inner query will return a set with members C1 and C3 and outer query will return those S_IDs for which C_ID is equal to any member of set (C1 and C3 in this case). (SELECT C_ID from COURSE where C_NAME = ‘DSA’ or C_NAME=’DBMS’) Select S_ID from STUDENT_COURSE where C_ID IN STEP 2: Using C_ID of step 1 for finding S_ID Select C_ID from COURSE where C_NAME = ‘DSA’ or C_NAME = ‘DBMS’ STEP 1: Finding C_ID for C_NAME =’DSA’ or ‘DBMS’ From COURSE table, we can find out C_ID for C_NAME ‘DSA’ or DBMS’ and we can use these C_IDs for finding S_IDs from STUDENT_COURSE TABLE. IN: If we want to find out S_ID who are enrolled in C_NAME ‘DSA’ or ‘DBMS’, we can write it with the help of independent nested query and IN operator. Various operators like IN, NOT IN, ANY, ALL etc are used in writing independent nested queries. The execution of inner query is independent of outer query, but the result of inner query is used in execution of outer query. Independent Nested Queries: In independent nested queries, query execution starts from innermost query to outermost queries.There are mainly two types of nested queries: We will use STUDENT, COURSE, STUDENT_COURSE tables for understanding nested queries. The result of inner query is used in execution of outer query. In nested queries, a query is written inside a query. Challenges of database security in DBMS.Introduction to TimeStamp and Deadlock Prevention Schemes in DBMS.Graph Based Concurrency Control Protocol in DBMS.Two Phase Locking (2-PL) Concurrency Control Protocol | Set 3.Categories of Two Phase Locking (Strict, Rigorous & Conservative).Lock Based Concurrency Control Protocol in DBMS.Condition of schedules to View-equivalent.Precedence Graph For Testing Conflict Serializability in DBMS.Types of Schedules based Recoverability in DBMS.ISRO CS Syllabus for Scientist/Engineer Exam.ISRO CS Original Papers and Official Keys.GATE CS Original Papers and Official Keys.