TCS Xplore SQL Quiz Answer of All Modules, TCS Xplore 2022
Below are the answers to the TCS Xplore SQL Quiz Answer of All Modules. The answer to the TCS SQL Quiz Answer is highlighted in Yellow Colour.
There is the Following Module in TCS SQL Course:
1. ERD and Normalization Quiz
2. SQL Type Quiz
3. DataBase Constraint Quiz
4. Function in SQL Quiz
5. SQL Joins Quiz
6. Database Object Quiz
Also Read: TCS Xplore Business Skill Final Assessment
Also Read: TCS Xplore KYT Final Assessment Quiz Answer
Also Read: TCS Xplore UNIX Assessment Quiz Answer
1. ERD and Normalization Quiz
Question 1. ________ Defines the possible number of occurrences in one entity that is associated with the number of occurrences in another.
Answer: Cardinality
Question 2. The criteria to be fulfilled for a table to be in 1NF are
Answer: Each record needs to be unique,
Each table column should contain a single value
Question 3. Normalization is used for?
Answer: Eliminating redundant data
Question 4. Which of the following are true about a Primary Key?
Answer: A primary key value must be unique
The primary key cannot be changed
Question 5. Students as a group are associated with multiple faculty members, and faculty members, in turn, are associated with multiple students. For this scenario, the cardinality between the student entity and the faculty entity is _____?
Answer: many to many
2. SQL Type Quiz
Question 1. Which keyword is used while adding a constraint to an existing table to avoid verifying old values within the column?
Answer: DEFERRABLE
Question 2. What are the various keywords used along with the ALTER statement?
Answer: DROP, RENAME, ADD, MODIFY
Question 3. Select the suitable option for Check Constraint?
Answer: All of the these
Question 4. How can we define constraints with the user-defined name?
Answer: data type constraint
Question 5. Which SQL statement is used to remove all the data from a table permanently?
Answer: TRUNCATE
3. Database Constraint Quiz
Question 1. How to check constraint names and constraint types on the column of a particular table?
Answer: Select constraint_name, constraint_type from user_constraints where table_name =""
Question 2. Select the Suitable option on the Foreign key on a Column.
Answer: All of the these
Question 3. Select correct syntax to drop check constraint.
Answer: alter table drop constraint
Question 4. Which type of Constraint doesn't allow null values in a column?
Answer: Not Null
Question 5. Which of the below option ensure that the value of COLUMN(named as budget) is non-negative?
Answer: check(budget>=0)
4. Functions in SQL Quiz
Question 1. Which SELECT statement should you use to extract the year from the system date and display it in the format "2021"?
Answer: SELECT TO_CHAR(SYSDATE, 'yyyy') FROM dual;
Question 2. Select LENGTH('Tata Consultancy'); Returns
Answer: 16
Question 3. Which SQL statement returns a numeric value?
Answer: SELECT sysdate-hire_date FROM EMP;
Question 4. What is true of using group functions on columns that contain NULL values?
Answer: Group functions on columns ignore NULL values.
Question 5. SELECT ROUND(TRUNC(MOD(1600, 10),-1),2) FROM dual; What will be displayed?
Answer: 0
5. SQL Joins Quiz
Question 1. To avoid a Cartesian product?
Answer: Always include a valid join condition in the WHERE clause
Question 2. For joining N tables how many join conditions are required?
Answer: N-1
Question 3. What is true about joining a table through an equijoin?
Answer: You can join n tables (all having single-column primary keys) in a SQL statement by specifying a minimum of n-1 join conditions.
Question 4. In which case would you use a FULL OUTER JOIN?
Answer: You want all unmatched data from both tables.
Question 5. In which of the cases would you use the Using clause?
Answers: All
6. Database Object Quiz
Question 1. Which is a database object from which multiple users can generate unique identification number or Random number with fixed interval?
Answer: Sequence
Question 2. How many types of indices are there in the SQL server?
Answer: Two
Question 3. Select the suitable option to get the next value of the sequence?
Answer: .nextval
Question 4. Select the suitable option for clustered index creation?
Answer: create fulltext index
special system stored procedures
Question 5. Examine the structure of the EMployee table: Column name Data type RemarksEmployee_ID NUMBER NOT NULL, Primary KeyEMP_NAME VARCHAR2(20) NOT NULL SAL NUMBERGR_ID NUMBER References EMPLOYEE_ID column DEPARTMENT_ID NUmber Foreign key to DEPARMENT_ID column of the DEPARTMENT table You need to create a view called EMP_VU that allows the user to insert rows through the view. Which SQL statement, when used to create the EMP_VU view. allows the user to insert rows?
Answer: CREATE VIEW emp_vu AS SELECT department_id, emp_name, job_id, department_id FRoM employees WHERE mgr_id IN (102, 120).
7. SQL Final Assessment Quiz
Click here for the SQL Final Assessment Quiz answer
Also, Read TCS Xplore Java Quiz Answer (All modules).
Also, Read: TCS Xplore PLSQL Block Quiz Answer
Thank you for visiting my blog. Do share this post with your friends if found it useful and also leave a comment in the comment box.
0 Comments