Académique Documents
Professionnel Documents
Culture Documents
Consider the following statement and the table structure. Answer the questions 41 to 42 that follow:
SQL> DESC departments
Name Null? Type
-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐ -‐-‐-‐-‐-‐-‐-‐-‐ -‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐
DEPARTMENT_ID NOT NULL NUMBER(4)
DEPARTMENT_NAME NOT NULL VARCHAR2(30)
MANAGER_ID NUMBER(6)
LOCATION_ID NUMBER(4)
INSERT INTO departments (department_id , department_name , manager_id, location_id )
VALUES (100, 'Human Resources', 121, 1000);
42. In which order the values will get inserted with respect to the above INSERT statement?
A. Location_id , manager_id, department_name , department_id
B. department_id , department_name , manager_id, location_id
C. department_id , manager_id, department_name , location_id
D. department_id , department_name , location_id , manager_id
44. Which of the following system privilege grants a user to delete another user?
A. ERASE USER B. DROP USER C. DELETE USER D. REMOVE USER
46. Which of the following can you do with Oracle server database security?
A. Control database access.
B. Give access to specific objects in the database.
C. Confirm given and received privileges with the Oracle data dictionary.
D. All of the above.
47. Which syntax must be used if your schema is oraxx, and the demo user wants to use a SELECT statement to obtain
data from your EMPLOYEES table?
A. SELECT * FROM oraxx.employees; C. SELECT * FROM demo.employees;
B. SELECT * FROM employees.oraxx; D. SELECT * FROM employees.demo;
48. Which of these statements will give a user authority to pass along privileges?
A. GRANT create table, create view to demo;
B. GRANT demo create table;
C. GRANT select, insert ON departments TO demo WITH GRANT OPTION;
D. GRANT select ON departments TO demo;
26. Which of the following can be used to join the rows of a table with other rows of the same table?
A. Equijoin B. Non-equijoin C. Outer join D. Self-join
28. How many tables can be joined by using the JOINS in Oracle DB?
A. 1 B. 2 C. 255 D. No limit
34. Which of the following DML commands can be considered to be a hybrid of INSERT and UPDATE in a single
statement?
A. INTERSECT B. INSERT C. SELECT D. MERGE
35. Which of following commands is a DDL (Data Definition Language) command but is often considered along with
DML commands?
A. DELETE B. INSERT C. TRUNCATE D. None of the above
36. Which of the following commands can be used to remove existing records from a table?
A. UPDATE B. INSERT C. MINUS D. DELETE
37. Which of the following commands allows undoing the changed data?
A. ROLLBACK B. COMMIT C. INSERT D. UPDATE
38. What is true about the INSERT statement? (Choose the most appropriate answer)
A. It can insert data in one row of one table at a time
B. It can insert data in many rows of one table at a time
C. It can insert data in many rows of many tables at a time
D. All of the above
15. Which of the following are also called Group functions?
A. Single row functions C. Multiple row functions
B. Multi group functions D. Single group functions
17. What will be the outcome of the following query? SELECT ROUND(144.23,-‐1) FROM dual;
A. 140 B. 144 C. 150 D. 100
Examine the structure of the EMPLOYEES table as given and answer the questions 18 and 19 that follow.
18. You are currently located in New Jersey and have connected to a remote database in San Diego. You issue the
following command.
SELECT ROUND (sysdate-‐hire_date,0) FROM employees WHERE (sysdate-‐hire_date)/180 = 2;
19. You need to display the names of the employees who have the letter 's' in their first name and the letter 't' at the
second position in their last name. Which query would give the required output?
A. SELECT first_name, last_name FROM employees WHERE INSTR(first_name,'s') <> 0 AND SUBSTR(last_name,2,1) =
't';
B. SELECT first_name, last_name FROM employees WHERE INSTR(first_name,'s') <> '' AND SUBSTR(last_name,2,1) =
't';
C. SELECT first_name, last_name FROM employees WHERE INSTR(first_name,'e') IS NOT NULL AND
SUBSTR(last_name,2,1) = 't';
D. SELECT first_name, last_name FROM employees WHERE INSTR(first_name,'e') <> 0 AND
SUBSTR(last_name,LENGTH(first_name),1) = 't';
20. Which of the following statements is true regarding the COUNT function?
A. COUNT (*) counts duplicate values and NULL values in columns of any data type.
B. COUNT function cannot work with DATE datatypes.
C. COUNT (DISTINCT job_id) returns the number of rows excluding rows containing duplicates and NULL values in
the job_id column.
D. A SELECT statement using the COUNT function with a DISTINCT keyword cannot have a WHERE clause.
Region I
Candon City Division
CANDON NATIONAL HIGH SCHOOL
Candon City (Ilocos Sur)
Select the best answer by writing the letter of your choice on the ANSWER SHEET provided. Do not write anything on
this test paper. Write your answers legibly. Use UPPERCASE letters.
3. What is the maximum number of WHERE clauses that can be included in a SELECT query?
A. 1 B. 2 C. 0 D. 3
4. What do you call the process of modeling data into relational tables?
A. Data Modeling B. Denormalization C. ER Modeling D. Normalization
7. Data that is modeled into a form suitable for processing in a relational database may described as being
__________.
A. First normal form B. Third normal form C. Abnormal form D. Paranormal form
8. Determine the capability of the SELECT statement demonstrated in the given query.
SELECT e.ename, d.dname FROM emp e, dept d
WHERE e.deptno = d.deptno AND e.sal > 1000;
i. Selection iii. Joining
ii. Filtering iv. Projection
9. When retrieving data from all columns in a table called “LOCATIONS”, which SQL statement is used?
A. SELECT * FROM LOCATIONS; C. select * from locations;
B. Select * from locations; D. All of the above
10. Which of the queries below displays employees' name and new salary after the increment of 1000?
A. SELECT ename, sal FROM emp; C. SELECT ename, sal+1000 FROM emp;
B. SELECT ename, sal=sal+1000 FROM emp; D. SELECT ename, 1000 FROM emp;
11. Determine the output of the query: SELECT 36/2-‐5*10 FROM dual;
A. 130 B. -32 C. -120 D. 175
12. Specify the column alias "New Salary" for the expression containing salary in the below SQL query
SELECT ename, job, sal + 100 FROM emp;
A. (sal + 100) AS New Salary C. (sal + 100) IS New Salary
B. (sal + 100) New Salary D. sal + 100 as "New Salary"
41. You want to set the style of the first letter of every paragraph in a <div> element whose id is readingPane. Which
style selector is most appropriate?
A. #readingPane p::first-letter C. #readingPane p:first-child
B. #readingPane::first-letter D. #readingPane:first-child
42. You want to find three shades of a color to use on parts of your webpage. Which color function helps you
accomplish this task?
A. rgb( ) B. rgba( ) C. hsl( ) D. color( )
43. You want to position a <div> element in relation to the browser window. Which position setting do you use?
A. static B. relative C. absolute D. fixed
44. Which of the following CSS would not change the appearance of text?
A. font-style: italic; C. font: bolder 12px arial;
B. font-weight: heavy; D. color: green;
Implement real-time communications by using Web Sockets and Web Worker process (45-50)
45. What is the blueprint for an object called?
A. property B. method C. class D. event
47. When working with the WebSocket object, which event can be used to retrieve the data that was received from
the server?
A. onopen B. onclose
C. onmessage D. onerror
48. Which library would you use if you are creating a Node.js website and want to write browser-independent code
that uses WebSocket?
A. SignalR
B. Socket.IO
C. FarmSockets D. AgnosticSocket
49. You want to ensure that the WebSocket connection is not disconnected as a result of inactivity. How can you
accomplish this?
A. Add code to the onclose event to reopen the connection when it’s closed.
B. Add code to send an empty message periodically before the connection is closed.
C. Set the keepAlive property on the WebSocket object to true.
D. Create a new WebSocket object each time you send a message.
50. Which of the following statements properly handles the reception of data from a WebSocket?
A. wsConnection.onpost = function(msg){..}; C. wsConnection.onmessage = function(msg){...};
B. wsConneciton.onreceive = function(msg){...}; D. wsConnection.ongetdata = function(msg){...};
25. Which of the following is a correct method for creating an instance of Person?
A. Person john = new Person('John', 'Doe', 50, 'blue');
B. var john = new Person('John', 'Doe', 50, 'blue');
C. var Person john = new Person('John', 'Doe', 50, 'blue');
D. new john = Person('John', 'Doe', 50, 'blue');
26. Which of the following DOES NOT represent valid variable declarations?
A. var switch; B. var myChar; C. var $cost; D. var tooGood4u;
27. In your application, you want to display a personalized message to the user, if the user’s name is populated, in
the userName variable, but if userName is empty, you want to use Valued User instead. How can you accomplish
this most efficiently?
A. var personalized = ‘Hello ‘ + (userName ?? ‘Valued User’);
B. var personalized = ‘Hello ‘ + (userName || ‘Valued User’);
C. var personalized = ‘Hello ‘ + (userName && ‘Valued User’);
D. var personalized = ‘Hello ‘ + (userName + ‘Valued User’);
28. Which statement correctly describes the proper error handling using try...catch...finally blocks?
A. Proper error handling allows code processing to continue and to provide appropriate user feedback.
B. Proper error handling allows users to fix problems with the webpage.
C. Proper error handling allows you to debug the application at run time.
D. Proper error handling allows you to suppress all the bugs in your scripts.
Create interactive user interface and add offline support for Web applications (29-34)
29. What are the two types of global storage available via HTML5 Data storage?
A. sessionStorage and localStorage C. externalStorage and dataStorage
B. globalStorage and localdataStorage D. browserStorage and persistentStorage
30. Which method allows browser access to a device's camera and microphone?
A. window.getUserMedia() C. navigator.mediaDevices.getUserMedia()
B. browser.getUserMedia() D. browser.window.getUserMedia()
31. What is the correct syntax for removing all values existing in localStorage?
A. localStorage.clear(); C. localStorage.abandon();
B. localStorage.removeAll(); D. localStorage.reset();
33. Which of the following is the correct way to cancel a storage event?
A. event.returnValue = false;
B. event.preventDefault();
C. event.stopPropagation();
D. Storage events cannot be canceled after they are triggered.
34. When using the Geolocation API, how do you configure the ability to use cached data?
A. Set the enableCache property to true on the PositionOptions object.
B. Set the maximumAge property to a non-zero value on the PositionOptions object.
C. Set the timeout property of the PositionOptions object.
D. Using the cache is always on to save bandwidth, so no configuration is required.
Use CSS3 to create scalable graphics and animated user interface (35-44)
35. Which of the following layouts is based on columns and rows?
A. flexbox B. multi-column C. grid layout D. exclusions
36. Which of the following pseudo-classes can be used when styling SVG elements?
A. :full-screen B. :hover C. :empty D. :nth-child()
37. A font that has curls at the top and bottom of its characters belongs to which font family group?
A. monospace B. serif C. sans serif D. cursive
38. Which of the following transition-timing-function properties makes the transition start slow, speed up, then end
slow?
A. ease B. ease-in C. ease-out D. ease-in-out
39. Which of the following SVG attributes can be used as a CSS property to style borders or lines around an SVG
12. Which element is used to create a multi-line text element in an HTML form?
A. <textarea type="input">words</textarea> C. <textarea>words</textarea>
B. <input type="textarea" /> D. <textarea value=”words”></textarea>
13. Which attribute for elements is no longer required for in-line scripts in HTML5?
A. type B. href C. rel D. src
14. Which of the following elements is used to define multiple media resources for <video> and <audio>?
A. <track> B. <audio> C. <video> D. <source>
16. Which syntax preserves the layout of the page when hiding an element in the DOM?
A. display=’hidden’ C. visibility=’none’
B. display=’inline’ D. visibility=’hidden’
17. Which of the following best describes the purpose of the keyframes at-rule?
A. To control timing for WebGL animations
B. To control the intermediate steps in a CSS animation sequence
C. To create custom timing functions for CSS animations
D. To set FPS (Frames Per Second) of HTML5 Canvas animations
18. You have two arrays of strings, customers and employees, and you want to combine them to create a contacts
array. Which method would be most suitable for this task?
A. concat B. join C. push D. splice
19. Which declaration will make each word in an element start with an uppercase letter?
A. type-transform: capitalize;
B. text-transform: capitalize first;
C. text-transform: capitalize;
D. type-style: capitalize;
20. You want to obtain a list of all elements whose tag name is div, and you need to retrieve this list as quickly as
possible. Which function is most appropriate for this task?
A. getElementsByName C. getElementsByTagName
B. querySelectorAll D. getElementsByClass
21. What will be the final color value of the span below?
<div>
<p>This is a <span>paragraph</span>.</p>
</div>
div span {
color: blue;
}
p span {
color: green;
}
span {
color: red;
}
A. Blue B. Black C. Green D. Red
Communicate with Remote Data Source and create objects and methods using JavaScript (22-27)
22. Which method cancels a web worker?
A. close B. terminate C. suspend D. sleep
23. Your application prompts the user to enter his or her age, which is placed in an age variable. A user ran the
application and entered I Don’t Know for the age. The application then multiplies age by two. What is the result?
A. undefined B. null C. NaN D. infinity
Republic of the Philippines
Region I
Candon City Division
CANDON NATIONAL HIGH SCHOOL
Candon City (Ilocos Sur)
Select the best answer by writing the letter of your choice on your ANSWER SHEET. Do not write anything on this test
paper. Write your answers legibly. Use UPPERCASE letters.
Develop basic HTML document using HTML5 and CSS3 syntax (1-10)
1. How should you start each HTML5 document?
A. <html> B. <head> C. <title> D. <!DOCTYPE html>
2. Which HTML special character entity name do you use to represent a copyright symbol?
A. ©right; B. ©write; C. ©_right; D. ©
3. How do you provide fallback content for browsers th1-t do not support the <video> element?
A. Add markup inside the <video> element C. Add markup inside the <notsupported> element
B. Add markup inside the <noscript> element D. Add markup inside the <source> element
8. Which HTML5 element should you use to create a more structured layout?
A. <div> B. <p> C. <table> D. <form>
10. Which of the following best describes the result of the rule below?
div p {
color: red;
}
A. Selects all paragraphs that are descendants of div elements and changes the text color to red
B. Selects all div and paragraph elements and changes the text color to red
C. Selects all paragraphs that are direct children of div elements and changes the text color to red
D. Selects all paragraphs that are siblings of div elements and changes the text color to red