rdbms
rdbms
b. Unify
c. MySQL
d. Oracle
Question SQL is a case sensitive language and the data stored inside the table are case in-sensitive. Say true or false?
2
Select one:
Correct
True
Mark 1.00 out of
1.00
False
Question
Tom has designed a payroll software for XYZ technology.The software will store the salary details into the database and later he can
4 retrieve the same for future references. Tom falls under which category of user.
Correct
b. End User
c. DBA
d. Application Programmer
The correct answer is: Data is represented in the form of a tree - → hierarchical, Data is represented in the form of a graph - → network,
Data is represented in the form of a table - → relational
Parvesh Modi .
b. SELECT
c. TRUNCATE
d. CREATE
c. Check
d. NULL
Mark 1 out of 1
a. Hierarchical
b. Relational
c. Network
d. Conceptual
Question Database is a shared collection of logically unrelated data, designed to meet the needs of an organization. State True or False.
4
Select one:
Correct
Mark 1 out of 1
a. TRUE
b. FALSE
b. Cardinality
c. Domain
d. No of Attributes
Adeeb Khan .
Question We need to ensure that the amount withdrawn should be less then the credit card limit amount, to ensure this integrity what
1 type constraint will be used?
Correct
https://accenturelearning.tekstac.com/mod/quiz/review.php?attempt=32750&cmid=1147 1/5
31/03/2020 Post-Quiz: Attempt review
Question theAdeeb
Tom , the administrator gets an error when executing the following scripts in the Oracle server. He finds that SQL Khan .
2 statements placed are not in the correct order.
Partially Help Tom to place the statements in the correct order. The script starts from the creation of course table. The schema
correct diagram is given below
Mark 0.50 out
of 1.00
coursename varchar2(40),
coursecategory varchar2(20), Adeeb Khan .
coursefees number(10,2),
courseduration number(3)
);
2. CREATE TABLE student
(
sid char(4) primary key,
sname varchar2(20),
sdob date,
scity varchar2(20),
squal varchar2(20),
semail varchar2(30),
sphone varchar2(20)
);
3. CREATE TABLE batch
(
batchid char(4) primary key,
bsdate date ,
bstrength number(3),
courseid char(4),
foreign key(courseid) references course(courseid)
);
4. CREATE TABLE enrollment
(
batchid char(4),
sid char(4) ,
edate date,
primary key(batchid,sid),
foreign key(sid) references student(sid),
foreign key(batchid) references batch(batchid)
);
validitydate check
https://accenturelearning.tekstac.com/mod/quiz/review.php?attempt=32750&cmid=1147 3/5
31/03/2020 Post-Quiz: Attempt review
Correct
Mark 2.00 out Tom, the administrator should create the table "CSR_Registration" with the following rules
of 2.00 Whenever a row in the CSR_Student table is deleted, the row from the CSR_Registration must be deleted
When deleting the row from the CSR_course table link column of the CSR_registration must be made to null
Drag and drop the correct keyword for the below given query.
create table CSR_registration(courseid number(4) references CSR_course(courseid) on delete set null ,studid
number(4) references CSR_student(studid) on delete cascade ,doj date);
Question An emp table contains fields employ name, desig and salary. How do you drop column salary?
5
Select one:
Correct
a. delete from emp where column = salary;
Mark 1.00 out
of 1.00 b. alter table emp drop column salary;
The correct answer is: alter table emp drop column salary;
https://accenturelearning.tekstac.com/mod/quiz/review.php?attempt=32750&cmid=1147 4/5
31/03/2020 Post-Quiz: Attempt review
c. Any number
d. 2
Question How would you add a foreign key constraint on the dept_no column in the EMP table, referring to the id column in the DEPT
8 table?
Correct
b. Use the ALTER TABLE command with the ADD clause on the EMP table.
c. Use the ALTER TABLE command with the MODIFY clause on the EMP table.
e. Use the ALTER TABLE command with the MODIFY clause on the EMP table.
The correct answer is: Use the ALTER TABLE command with the ADD clause on the EMP table.
https://accenturelearning.tekstac.com/mod/quiz/review.php?attempt=32750&cmid=1147 5/5
31/03/2020 Pre-Quiz: Attempt review
Adeeb Khan .
c. Tuples
d. Attributes
e. Domain
c. Fields
d. Records
c. primary key
d. secondary key
https://accenturelearning.tekstac.com/mod/quiz/review.php?attempt=31914&cmid=1112 1/2
31/03/2020 Pre-Quiz: Attempt review
Question Which of the following is not modification of the database Adeeb Khan .
4
Select one:
Correct
a. Insertion
Mark 1.00 out
of 1.00 b. Updating
c. Sorting
d. Deletion
c. Meta Information
d. Data Information
https://accenturelearning.tekstac.com/mod/quiz/review.php?attempt=31914&cmid=1112 2/2
31/03/2020 Post-Quiz: Attempt review
Adeeb Khan .
Address Varchar2(30)
DOB Date
Select one:
a. INSERT INTO student VALUES (101,'100 Main Street','17-JUN-99','Smith');
The correct answer is: INSERT INTO student (stud_id, address, name, dob)
VALUES (101,'100 Main Street','Smith','17-JUN-99');
https://accenturelearning.tekstac.com/mod/quiz/review.php?attempt=42753&cmid=1175 1/3
31/03/2020 Post-Quiz: Attempt review
Select one:
a. Value for phoneno is missing.
Question Which SQL statement needs both insert and update privilege on the target table and select privilege on the source table?
3
Select one:
Incorrect
a. alter
Mark 0.00 out
of 1.00 b. delete
c. merge
d. update
https://accenturelearning.tekstac.com/mod/quiz/review.php?attempt=42753&cmid=1175 2/3
31/03/2020 Post-Quiz: Attempt review
DeptId Number(10) FK
1 Sales Mumbai
2 Marketing Kolkata
Select one:
a. UPDATE Employee SET empid = NULL WHERE deptid=5;
The correct answer is: UPDATE Employee SET Deptid=3 WHERE Empid = 101;
https://accenturelearning.tekstac.com/mod/quiz/review.php?attempt=42753&cmid=1175 3/3
31/03/2020 Pre-Quiz: Attempt review
Adeeb Khan .
Question
Which CREATE TABLE statement is valid?
1
Correct
https://accenturelearning.tekstac.com/mod/quiz/review.php?attempt=41976&cmid=1148 1/3
31/03/2020 Pre-Quiz: Attempt review
Question To permanently remove all the data from the STUDENT table, and you need the table structure in the future.
Which single
Adeeb Khan .
2 command performs this?
Correct
Select one:
Mark 1.00 out
a. DELETE * FROM student
of 1.00
KEEP STRUCTURE;
Question When we attempt to create the salary table with this command:
3 1.CREATE TABLE salary
Partially
2.(employee_id NUMBER(9)
correct
3.CONSTRAINT salary_pk PRIMARY KEY,
Mark 0.67 out
of 1.00 4.1995_salaryNUMBER(8,2),
5.manager_name VARCHAR2(25)
6.CONSTRAINT mgr_name_nn NOT NULL,
7.$salary_96NUMBER(8,2));
b. 4
c. 5
d. 1
e. 7
f. 2
https://accenturelearning.tekstac.com/mod/quiz/review.php?attempt=41976&cmid=1148 2/3
31/03/2020 Pre-Quiz: Attempt review
Question
The EMPLOYEES table has these columns:
5 LAST NAMEVARCHAR2(35)
Correct
SALARYNUMBER(8,2)
Mark 1.00 out
HIRE_DATEDATE
of 1.00
Management wants to add a default value to the SALARY column. You plan to alter the table by
Select one:
a. All the rows that have a NULL value for the SALARY column will be updated with the value
5000.
b. A change to the DEFAULT value affects only subsequent insertions to the table.
d. Column definitions cannot be altered at add DEFAULT values for columns with a NUMBER
data type.
The correct answer is: A change to the DEFAULT value affects only subsequent insertions to the table.
https://accenturelearning.tekstac.com/mod/quiz/review.php?attempt=41976&cmid=1148 3/3
31/03/2020 Test Your Understanding: Attempt review
Adeeb Khan .
Mark 1.00 out Truncate Removes the entire data from the table, while the structure remains intact.
of 1.00
Drop Removes the table itself from the database.
Delete Removes all or only the rows specified from the table.
Question It is possible to update more than one column with a single UPDATE statement. State true or false.
3
Select one:
Correct
True
Mark 1.00 out
of 1.00 False
https://accenturelearning.tekstac.com/mod/quiz/review.php?attempt=42886&cmid=1176 1/2
31/03/2020 Test Your Understanding: Attempt review
Question To have all the rows deleted from the table using delete statement, you must specify the query with WHEREclause thatKhan .
Adeeb
4 specifies all the rows. State true or false.
Correct
Select one:
Mark 1.00 out
True
of 1.00
False
Question
To change the structure of the table we use MODIFY TABLE Syntax.
5
Incorrect
https://accenturelearning.tekstac.com/mod/quiz/review.php?attempt=42886&cmid=1176 2/2
slhmsÿmlhÿW ÿ
!"#$%&
'
()**+,-
f98dÿ\85ÿ4ÿ7ÿ5 ÿÿ6ÿg69ÿ45Wÿ4ÿh9ÿ89ÿ45W
ÿ8G
./*0ÿ2344ÿ)5-ÿ)6 4Wÿijÿk
2344 7Wÿh lj
h6ÿ899ÿ45g9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6,*0"A
ÿÿÿ
s2
6*/
?/02ÿ*4"2ÿÿ6/22"6A
%!"ÿ6/22"6ÿ*4"2ÿF
&)p()ÿO?ÿ70ÿ+"ÿ!"ÿq,*rÿ6,*0"ÿÿ!"ÿ$(C(#%ÿ*"7"Aÿ?/0ÿq6*rÿ3"68.ÿ*.ÿ6/7+*/ÿ/8ÿ07"26ÿ3//ÿ*1
6/,07ÿ*7"ÿÿ!"ÿ/21"2ÿ+.ÿ6,*0"A
t0
Reshma Banu Mothadi Shaik .
Question In which two cases would you use the USING clause? (Choose two)
1
Select one or more:
Correct
a. You want to create a nonequijoin.
Mark 1.00 out
of 1.00 b. The tables to be joined have columns with the same name and compatible data types.
c. The tables to be joined have columns of the same name and different data types.
The correct answers are: The tables to be joined have columns of the same name and different data types., The tables to be
joined have columns with the same name and compatible data types.
Question Which SELECT statement displays all the employees who do not have any subordinates?
2
Select one:
Correct
a. SELECT e.ename
Mark 1.00 out
FROM emp e
of 1.00
WHERE e.mgr IS NOT NULL;
b. SELECT e.ename
FROM emp e
WHERE e.empno NOT IN (SELECT m.mgr
FROM emp m
WHERE m.mgr IS NOT NULL);
c. SELECT e.ename
FROM emp e
WHERE e.empno IN (SELECT m.mgr
FROM emp m);
d. SELECT e.ename
FROM emp e
WHERE e.empno NOT IN (SELECT m.mgr
FROM emp m);
Select one:
a. last name and first name of all employees except those working in department 3 or 5
b. last name and first name of only the employees whose salary falls in the range of salaries from department 3 or 5
c. last name and first name of only the employees in department number 3 or 5
d. last name and first name of all employees with the same salary as employees in department 3 or 5
The correct answer is: last name and first name of all employees with the same salary as employees in department 3 or 5
Empno Number(10) PK
salary Number(10,2)
Tax Table
Taxgrade Number
Lowsal Number(10)
highsal Number(10,2)
We want to create a report that displays the employee details along with the tax category of each employee. The tax category
is determined by comparing the salary of the employee from the EMP table to the lower and upper salary values in the TAX
table.
Select one:
a. SELECT e.name, e.salary, t.taxgrade
FROM emp e, tax t
WHERE e.salary IN t.lowsal AND t.highsal;
Select one:
a. The FIRST_NAME values in the database are in lowercase.
b. There is more than one employee with the first name Scott.
The correct answer is: There is more than one employee with the first name Scott.
Question To display the names of employees who earns more than the average salary of all
6 employees.
Correct
SELECT last_name, first_name
Mark 1.00 out FROMemployee
of 1.00
WHEREsalary > AVG(salary);
Select one:
a. Change the function in the WHERE clause.
b. Move the function to the SELECT clause and add a GROUP BY clause and a HAVING clause.
c. Use a subquery in the WHERE clause to compare the average salary value.
d. Move the function to the SELECT clause and add a GROUP BY clause.
The correct answer is: Use a subquery in the WHERE clause to compare the average salary value.
Question Which operator is NOT appropriate in the join condition of a non-equi join SELECT statement?
7
Select one:
Correct
a. BETWEEN x AND y operator
Mark 1.00 out
of 1.00 b. IN operator
c. LIKE operator
d. equal operator
Customer Table
cust_last_name Varchar2(20)
cust_id Number(10) PK
cust_city Varchar2(20)
Sales Table
prod_id Number(10) FK
cust_id Number(10) FK
quantity_sold Number(10,2)
Generate a report that gives details of the customer's last name, name of the product and the quantity sold for all customers in
'Tokyo'.
b. SELECT c.cust_last_name,p.prod_name,s.quantity_sold
FROM products p JOIN sales s JOIN customers c
ON(p.prod_id=s.prod_id)
ON(s.cust_id=c.cust_id)
WHERE c.cust_city='Tokyo';
c. SELECT c.cust_last_name,p.prod_name,s.quantity_sold
FROM products p JOIN sales s
USING (prod_id)
ON(p.prod_id=s.prod_id)
JOIN customers c
USING(cust_id)
WHERE c.cust_city='Tokyo';
d. SELECT c.cust_last_name,p.prod_name,s.quantity_sold
FROM sales s JOIN products p
USING (prod_id)
JOIN customers c
USING (cust_id)
WHERE c.cust_city='Tokyo';
c. The tables being joined have both matched and unmatched data.
The correct answer is: The tables being joined have both matched and unmatched data.
c. ALL
d. IN
c. SELECT *
FROM emp_dept_vu;
The correct answer is: None of the statements produce an error; all are valid.
Question Which statement would display the highest credit limit available in each income level in each city in
2 the Customers table?
Correct
Select one:
Mark 1.00 out
of 1.00 a. SELECT cust_city, cust_income_level,MAX(cust_credit_limit)
FROM customers
GROUP BY cust_credit_limit , cust_income_level, cust_city ;
Promo_name Varchar
Promo_begin_date Date
Promo_end_date Date
Sales Table
Promo_id Number FK
Cust_id Number FK
Time_id Date
Customer Table
cust_id Number PK
cust_name Varchar
The Below query will generate a report showing the promo name along with the
customer name for all products that were sold during their promo campaign and before 30th October 2007.
Select one:
a. It produces an error because the join order of the tables is incorrect.
c. It produces an error because equijoin and nonequijoin conditions cannot be used in the same
The correct answer is: It executes successfully but does not give the required result.
Question SELECT cust_city. COUNT(cust_last_name) Reshma Banu Mothadi Shaik .
4 FROM customers
WHERE cust_credit_limit > 1000
Correct
GROUP BY cust_city
Mark 1.00 out HAVING AVG(cust_credit_limit) BETWEEN 5000 AND 6000;
of 1.00
Select one:
a. Date functions
b. It executes successfully.
c. It returns an error because WHERE and HAVING clauses cannot be used in the same SELECT statement.
d. It returns an error because WHERE and HAVING clauses cannot be used to apply conditions on the same column.
e. It returns an error because the BETWEEN operator cannot be used in the HAVING clause.
Question
5 To display the names of employees who earns more than the average salary of all
employees.
Correct
Select one:
a. Move the function to the SELECT clause and add a GROUP BY clause.
b. Move the function to the SELECT clause and add a GROUP BY clause and a HAVING clause.
d. Use a subquery in the WHERE clause to compare the average salary value.
The correct answer is: Use a subquery in the WHERE clause to compare the average salary value.
Question To create a report displaying employee last names, department names, and locations. Which
query should
Reshma Banuyou use to create
Mothadi Shaik .
6 an equi-join?
Correct
b. SELECT student_name,subject1
FROM marks
WHERE subject1 > AVG(subject1);
c. SELECT student_name,SUM(subject1)
FROM marks
WHERE student_name LIKE 'R%';
3 10
4 10 600
5 30 800
6 30 200
7 10
8 20 300
Which tasks would require sub queries or joins in order to be performed in a single
step?
b. Listing the employees who earn the same amount of commission as employee 3
c. Finding the number of employees who earn a commission that is higher than the average commission of the company
d. Listing the employees whose annual commission is more than 6000
e. Listing the employees who do not earn commission and who are working for department 20 in descending order of the
employee ID
The correct answers are: Listing the employees who earn the same amount of commission as employee 3, Finding the number
of employees who earn a commission that is higher than the average commission of the company
Question The following query is written to retrieve all those product IDs from the SALES table that have more than 55000 sold and have
9 been ordered more than 10 times:
Correct
Mark 1.00 out SELECT prod_id FROM sales WHERE quantity_sold > 55000 AND COUNT(*)>10
of 1.00
GROUP BY prod_id HAVING COUNT(*)>10;
Select one:
a. It executes successfully and generates the required result.
b. It produces an error because COUNT (*) should be only in the HAVING clause and not in the
WHERE clause.
c. It executes successfully but produces no result because COUNT(prod_id) should be used instead of COUNT(*) .
d. It produces an error because COUNT (*) should be specified the SELECT clause also .
The correct answer is: It produces an error because COUNT (*) should be only in the HAVING clause and not in the
WHERE clause.
Question Which statements are true regarding the USING and ON clauses in table joins? Reshma Banu Mothadi Shaik .
10
Correct
Select one or more:
Mark 1.00 out
a. The WHERE clause can be used to apply additional conditions in SELECT statement
of 1.00
containing the ON or the USING clause.
b. Maximum of one pair of columns can be joined between two tables using the ON clause
c. Both USING and ON clause can be used for equijoins and nonequijoins
d. The ON clause can be used to join tables on columns that have different names but compatible data types.
The correct answers are: The ON clause can be used to join tables on columns that have different names but compatible data
types., The WHERE clause can be used to apply additional conditions in SELECT statement
containing the ON or the USING clause.
Reshma Banu Mothadi Shaik .
Question
1
Correct
You issue the following SQL statement on the CUSTOMERS table to display the customers who are in the same country as
customers with the last name 'king' and whose credit limit is less than the maximum credit limit in countries that have
customers with the last name 'king'.
Select one:
a. It executes and shows the required result.
b. It produces an error and the < operator should be replaced by < ANY to get the required output
c. It produces an error and the < operator should be replaced by < ALL to get the required output.
d. It produces an error and the IN operator should be replaced by = in the WHERE clause of the main query to get the
required output
WHERE prod_list_price=(
WHERE prod_list_price<
The correct answers are: Field names in the SELECT statement., The FROM clause in the SELECT statement, The HAVING
clause in the SELECT statement, The WHERE clause in the SELECT as well as all DML statements
Question The NOT operator can be used with IN, ANY, and ALL operators in multiple-row subqueries. State true or false.
4
Correct
False
Question
5 Main query and subquery can/must get data from different tables.
Correct
Question Which SQL statement grants a privilege to all the database users?
1
Select one:
Correct
a. grant select on department to ALL;
Mark 1.00 out
of 1.00 b. grant select on department to PUBLIC;
Question You need to create the patient_id_seq sequence to be used with the patient table's primary key column. The sequence should
2 begin at 1000, have a maximum value of 999999999, never reuse any numbers, and increment by 1.
Correct
Which statement would you use to complete this task?
Mark 1.00 out
of 1.00
Select one:
a. CREATE SEQUENCE patient_id_seq
START WITH 1000
MAXVALUE 999999999
STEP BY 1;
Question Which SQL statement would you use to remove a view called EMP_DEPT_VU from your schema?
Reshma Banu Mothadi Shaik .
3
Select one:
Correct
a. REMOVE emp_dept_vu;
Mark 1.00 out
of 1.00 b. DROP emp_dept_vu;
c. DELETE emp_dept_vu;
Correct
Which of the following statements are true with respect to the above index?
Mark 1.00 out
of 1.00
Select one:
a. May reduce the amount of disk I/O for INSERT statements.
b. Override the unique index created when the FK relationship was defined.
c. Function Based
d. Clustered Index
Question An owner can give specific privileges on the owner's objects to others. State...
6
Select one:
Correct
True
Mark 1.00 out
of 1.00 False
Question Which object privileges can be granted on a view? Reshma Banu Mothadi Shaik .
7
Select one:
Correct
a. ALTER, DELETE, INSERT, SELECT
Mark 1.00 out
of 1.00 b. DELETE, INSERT,SELECT
c. none
Question The owner has all the privileges on the object. State true or False.
8
Select one:
Correct
True
Mark 1.00 out
of 1.00 False
Reshma Banu Mothadi Shaik .
b. DELETE
FROM sales
WHERE promo_id = (SELECT promo_id
FROM promotions
WHERE promo_name = 'blowout sale')
OR promo_id = (SELECT promo_id
FROM promotions
WHERE promo_name = 'everyday low price');
c. DELETE
FROM sales
WHERE promo_id = (SELECT promo_id
FROM promotions
WHERE promo_name = 'blowout sale')
AND promo_id = (SELECT promo_id
FROM promotions
WHERE promo_name = 'everyday low price');
d. DELETE
FROM sales
WHERE promo_id IN (SELECT promo_id
FROM promotions
WHERE promo_name = 'blowout sale')
OR promo_name = 'everyday low price';
custname Varchar
custaddress varchar
Cust_credit_limit Number
Grade Table
Grade Varchar
Startval Number
Endval Number
To display names and grades of customers who have the highest credit limit.
Which SQL statements would accomplish the task?
c. Outer Join
Question The _______ join is based on all columns in the two tables that have the same column name.
4
Select one:
Correct
a. Natural
Mark 1.00 out
of 1.00 b. Cross
c. Full Outer
d. Left Outer
Question Mr. John is the president of a company. Five managers report to him. All other employees report to these managers.
5
Examine the code:
Correct
SELECT employee.ename FROM emp employee
Mark 1.00 out WHERE employee.empno NOT IN (SELECT manager.mgr
of 1.00
FROM emp manager);
Select one:
a. None of the employees has a manager.
The correct answer is: A NULL value is returned from the subquery.
c. Equal Join
d. Simple Join
Order_mode varchar
Customer_id Number
Order_total Number(8,2)
There is only one customer with the CUST_LAST_NAME column having value Roberts. Which INSERT statement should be
used to add a row into the ORDERS table for the customer whose CUST_LAST_NAME is Roberts and CREDIT_LIMIT is 600?
Select one:
a. INSERT INTO orders ( order_id ,order _date,order_mode , (SELECT customer_id FROM customers
WHERE cust_last_name ='Roberts' AND
credit_limit =600) , order _total )
VALUES (1,'10-mar-2007','direct' ,& &customer_id,1000);
c. INSERT INTO orders ( order_id ,order _date,order_mode , (SELECT customer_id FROM customers
WHERE cust_last_name ='Roberts' AND
credit_limit =600) , order _total )
VALUES (1,'10-mar-2007','direct' ,& customer_id,1000);
Question The _______ join produces the cross product of two tables.
8
Select one:
Correct
a. Equi
Mark 1.00 out
of 1.00 b. Self
c. Outer
d. Cross
Prod_name Varchar
Prod_list_price varchar
Cust_credit_limit Number
Select one:
a. It shown the names of all products whose list price is less than the maximum list price
c. It shown the names of products whose list price is the second highest in the table
d. It produces an error
The correct answer is: It shown the names of products whose list price is the second highest in the table
d. Self Join