wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Long Test ITEP 204

Total questions: 45

Worksheet time: 31mins

Name
Class
Date
1.

Describe subquery.

i. It is a query inside another query is possible

ii. Subqueries can be found in different parts of SELECT statements, each with different distinction and requirements.

iii. Subqueries can be inserted into any clauses in the SELECT statement.

a)
a. i only
b)
b. ii, iii
c)
c. none of the above
d)
d. all of the above
2.

The following are the main ways of classifying queries, except:

a)
a. A subquery that is part of a tablelist that specifies data source
b)
b. A subquery that is part of a condition that specifies criteria
c)
c. A subquery that is part of a columnlist that specifies a single calculated column
d)
d. A subquery that is part of a tablelist that specifies a single calculated column
3.

Which of the following statements is false?

a)
a. Subqueries can only be dependent on the main query.
b)
b. Subqueries can be found in different parts of SELECT statements.
c)
c. Subqueries are queries that are contained within other queries.
d)
d. There is no definite template in implementing subquery.
4.

Correlated subquery is a subquery that is related to the outer query while uncorrelated subquery is unrelated and independent of the outer query.

a)
a. True
b)
b. False
5.

Which of the following are the characteristics of a subquery?

i. A subquery is a query (SELECT statement) inside another query.

ii. A subquery is normally expressed inside parentheses.

iii. The first query in the SQL statement is known as the outer query.

iv. The query inside the SQL statement is known as the inner query.

a)
a. i, iii, iv
b)
b. i,ii
c)
c. none of the above
d)
d. all of the above
6.

Type of subquery where the subquery is related to the outer query.

a)
a. Having Subquery
b)
b. From Subquery
c)
c. Correlated Subquery
d)
d. Uncorrelated Subquery
7.

Type of subquery where the subquery is unrelated and completely independent of the outer query.

a)
a. Having Subquery
b)
b. From Subquery
c)
c. Correlated Subquery
d)
d. Uncorrelated Subquery
8.

Using the two tables given, what will be the output of the subquery that performs the following syntax, such as SELECT student_no,student_name FROM tbl_students WHERE (SELECT SUM(amt_pd) FROM tbl_fees WHERE tbl_students.student_no = tbl_fees.student_no) <= 12000;

a)

a.

b)

b. From Subquery

c)

c. Correlated Subquery

d)

d. Uncorrelated Subquery

9.

Using the two tables given, What will be the output of the subquery that performs the following syntax, such as SELECT student_no,student_name FROM tbl_students WHERE (SELECT SUM(amt_pd) FROM tbl_fees WHERE tbl_students.student_no = tbl_fees.student_no) > 12000;

a)

a.

b)

b.

c)

c.

d)

d.

10.

Using the two tables given, What will be the output of the subquery that performs the following syntax, such as SELECT student_no,student_name FROM tbl_students WHERE (SELECT MIN(amt_pd) FROM tbl_fees WHERE tbl_students.student_no = tbl_fees.student_no) < 5000;

a)

a.

b)

b.

c)

c.

d)

d.

11.

Using the two tables given, What will be the output of the subquery that performs the following syntax, such as SELECT student_name, (SELECT COUNT(student_no) FROM tbl_fees WHERE tbl_students.student_no = tbl_fees.student_no) as 'Number of Transaction' FROM tbl_students ORDER by tbl_students.student_no;

a)

a.

b)

b.

c)

c.

d)

d.

12.

Using the two tables given, What will be the output of the subquery that performs the following syntax, such as SELECT student_name FROM tbl_students,tbl_fees WHERE tbl_students.student_no = tbl_fees.student_no and tbl_fees.payment_mode = 'Cash' GROUP by tbl_students.student_name,tbl_students.student_no;

a)

a.

b)

b.

c)

c.

d)

d.

13.

Using the two tables given, What will be the output of the subquery that performs the following syntax, such as SELECT student_no,student_name FROM tbl_students WHERE (SELECT SUM(amt_pd) FROM tbl_fees WHERE tbl_students.student_no = tbl_fees.student_no) > 11000;

a)

a.

b)

b.

c)

c.

d)

d.

14.

Using the two tables given, What will be the output of the subquery that performs the following syntax, such as SELECT student_no,student_name FROM tbl_students WHERE student_no IN (SELECT student_no FROM tbl_fees WHERE payment_mode='Installment');

a)

a.

b)

b.

c)

c.

d)

d.

15.

Using the two tables given, What will be the output of the subquery that performs the following syntax, such as SELECT student_no,student_name FROM tbl_students WHERE student_no IN (SELECT student_no FROM tbl_fees WHERE payment_mode='Cash');

a)

a.

b)

b.

c)

c.

d)

d.

16.

It tries to figure out how to execute queries in the most efficient way possible.

a)
a. Database Backup
b)
b. Data Warehouse
c)
c. Optimizer
d)
d. Subqueries
17.

Choose the most optimized query below:

a)
a. select emp_id from emp_tbl where emp_id = 1063 or emp_id=1141 or emp_id=1200;
b)
b. select emp_id from emp_tbl where emp_id in(1063,1141,1200);
c)
c. select * from (select sum(emp_id) as emp_id from emp_tbl group by dept_no) as emp_tbl where emp_id = 1141 or emp_id=1200 or emp_id=1063;
18.

Choose the most optimized query below:

a)
a. select dept_no, count(*) from emp_tbl group by dept_no having dept_no<=5;
b)
b. select dept_no, count(*) from emp_tbl where dept_no<=5 group by dept_no;
c)
c. select * from (select dept_no, count(dept_no) as count from emp_tbl group by dept_no) as emp_tbl where dept_no<=5;
19.

For query optimization, it is recommended to place as many conditions as possible in the WHERE clauses and as few as possible in the HAVING clause.

a)
a. True
b)
b. False
20.

Describe index.

i. an ordered set of values that contains the index key

ii. index has an index key which causes improvement in data access speed occurs.

iii. data structure used in database systems to perform faster look up

a)
a. i, iii, iv
b)
b. i,ii
c)
c. none of the above
d)
d. all of the above
21.

What is the syntax for creating an index?

a)
a. CREATE INDEX index_name ON table_name (column_list);
b)
b. CREATE index_name ON table_name (column_list);
c)
c. CREATE INDEX column_list ON table_name (index_name);
d)
d. CREATE column_list ON table_name (index_name);
22.

This clause will be added at the beginning of the SELECT statement to see how MySQL internally performed this query.

a)
a. DESCRIBE
b)
b. SHOW
c)
c. EXPLAIN
d)
d. HAVING
23.

In database systems, an index is a data structure that allows for slower lookups.

a)
a. False
b)
b. True
24.

Searches on the indexed column or columns can be improved significantly with indexes.

a)
a. False
b)
b. True
25.

What is the correct query for removing the index name ilastname from the tbl_student?

a)
a. DROP index ilastname on tbl_student;
b)
b. DROP indexes on tbl_student(ilastname);
c)
c. REMOVE index ilastname FROM tbl_student;
d)
d. DELETE FROM tbl_student(ilastname);
26.

It is not important to retain many generations of backups.

a)
a. True
b)
b. False
27.

It is a separate file where the DBMS keeps track of the database transactions.

a)
a. Checkpoints
b)
b. Log file
c)
c. Recovery manager
d)
d. Mysqldump
28.

Which of the following information is not included in the log file?

a)
a. Security Plan
b)
b. Before - image
c)
c. After - image
d)
d. Transaction identifier
29.

What is the point of synchronization between the database and the transaction log file?

a)
a. Log file
b)
b. Recovery manager
c)
c. Mysqldump
d)
d. Checkpointing
30.

One of the facilities provided by the DBMS which assists in recovery that creates backup copies of the database on a regular basis.

a)
a. Log file
b)
b. Recovery manager
c)
c. Logging facilities
d)
d. Backup mechanism
31.

What enables the system to recover the database to a consistent state after a failure?

a)
a. Log file
b)
b. Recovery manager
c)
c. Checkpoint facility
d)
d. Backup mechanism
32.

According to Inmon,the following are the characteristics of a data warehouse except:

a)
a. subject-oriented
b)
b. integrated
c)
c. time variant data
d)
d. volatile
33.

This characteristic of a data warehouse creates a tracker that is used to generate reports which includes data changes over time.

a)
a. subject-oriented
b)
b. integrated
c)
c. time variant data
d)
d. volatile
34.

This is used to interact with the warehouse to obtain information. Business users use the information obtained for strategic decision-making.

a)
a. Metadata
b)
b. End-User Access Tools
c)
c. Data Mining
d)
d. Data Warehousing
35.

Area of the data warehouse where it performs all the operations associated with the extraction and loading of data into the warehouse.

a)
a. Detailed Data
b)
b. Load Manager
c)
c. Operational Data Store
d)
d. Archive/Backup Data
36.

Operational Data Store is a part of Data Warehouse Architecture. What does Operational Data Store mean?

a)
a. The area of the warehouse which stores all the detailed data in the database schema
b)
b. The area of the warehouse where detailed and summarized data are stored for the purpose of archiving and back up
c)
c. A repository of current and integrated operational data used for analysis.
d)
d. The area of the warehouse where all the metadata definitions are stored.
37.

Describe OLAP.

a)
a. process of discovering meaningful new correlations, patterns, and trends by mining large amounts of data using statistical, mathematical, and artificial intelligence techniques.
b)
b. based on the concept of multi-dimensional databases that allow a sophisticated user to analyze the data using complex and multidimensional views.
c)
c. graphical data access tools designed primarily for client-server environments.
d)
d. perform all the operation associated with the extraction and loading of data into the warehouse
38.

Describe detailed data as part of a data warehouse architecture.

a)
a. The area of the warehouse which stores all the detailed data in the database schema
b)
b. The area of the warehouse where detailed and summarized data are stored for the purpose of archiving and back up
c)
c. A repository of current and integrated operational data used for analysis.
d)
d. The area of the warehouse where all the metadata definitions are stored
39.

It is discovering meaningful new correlations, patterns, and trends by mining large amounts of data.

a)
a. Metadata
b)
b. End-User Access Tools
c)
c. Data Mining
d)
d. Data Warehousing
40.

What term was used by IBM to describe the original notion of a data warehouse?

a)
a. information warehouse
b)
b. information mining
c)
c. data mining
d)
d. data storage
41.

A characteristic of a data warehouse wherein the data are saved in a globally acceptable manner having consistent naming conventions, measurements, encoding structures, and physical characteristics.

a)
a. subject-oriented
b)
b. integrated
c)
c. time variant data
d)
d. volatile
42.

According to IBM, a data warehouse is a topic-oriented, integrative, real-time-variant, and non-volatile data collecting system.

a)
a. False
b)
b. True
43.

The use of a data warehouse requires the use of a small amount of disk space to get the most out of a data warehouse

a)
a. False
b)
b. True
44.

In the situation of a hidden problem, the developer must then decide whether to address the issue in the data warehouse or the source system.

a)
a. True
b)
b. False
45.

Successful data warehousing implementation may give a significant competitive advantage since decision-makers can access data on customers, trends, and demands.

a)
a. True
b)
b. False