Vous êtes sur la page 1sur 8

40.   Which of the following best defines a transaction?

A.   A transaction consists of DDL statements on the database schema


B.   A transaction consists of COMMIT or ROLLBACK in a database session
C.   A transaction consists of either a collection of DML statements or a DDL or DCL or TCL statement to form a
logical unit of work in a database session
D.   A transaction consists of collection of DML and DDL statements in different sessions of the database

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);  

41.   How many rows will be inserted by the above statement?


A.   0 B.   2 C.   3 D.   1

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

Control User Access (43-50)


43.   How many system privileges are available for users and roles?
A.   1 to 50 B.   51 to 75 C.   75 to 100 D.   more than 100

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

45.   Who generally allocates system privileges?


A.   Database administrator C.   Database programmer
B.   Database designer D.   Database 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;

49.   Which statement will correctly change a user’s password?


A.   ALTER USER demo IDENTIFIED BY employ; C.   CHANGE user demo IDENTIFIED BY employ;
B.   ALTER PASSWORD demo IDENTIFIED BY employ; D.   CHANGE PASSWORD demo IDENTIFIED BY employ;

50.   Which of the following statements is NOT CORRECT?


A.   After a user creates an object, the user can pass along any of the available object privileges to other users by
using the GRANT statement.
B.   A user can create roles by using the CREATE ROLE statement to pass along a collection of system or object
privileges to other users.
C.   Users can change their own passwords.
25.   Which of following will be used to join rows with other tables if the column values fall in a range defined by
inequality operators?
A.   Equijoin B.   Simple join C.   Non-equijoin D.   None of the above

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

27.   What are Cartesian Joins also known as in Oracle DB?


A.   Equi-join B.   Anti-join C.   Cross-Join D.   Hash Join

28.   How many tables can be joined by using the JOINS in Oracle DB?
A.   1 B.   2 C.   255 D.   No limit

29.   What is true about Natural joins in Oracle DB?


A.   The column names of the source and the target tables should be identical
B.   If the column names of the source and the target tables are not same, Oracle implicitly does the needful
C.   NATURAL JOINS, USING and ON are the keywords associated with Natural Joins
D.   All of the above

30.   Predict the outcome of the following query.


SELECT  e.salary,  bonus  
FROM  employees  E  JOIN  bonus  b  
USING  (salary,job_id  );    
 
A.   It executes successfully.
B.   It throws an error because bonus in SELECT is not aliased
C.   It throws an error because the USING clause cannot have more than 1 column.
D.   It executes successfully but the results are not correct.

31.   The following SQL statement contains which type of join?


SELECT  title,  order#,  quantity  FROM  books  FULL  OUTER  JOIN  orderitems  
ON  books.isbn  =  orderitems.isbn;  
A.   equality B.   self-join C.   non-equality D.   outer join

32.   Which of the following queries is valid?


A.   SELECT b.title, b.retail, o.quantity FROM books b NATURAL JOIN orders od NATURAL JOIN orderitems o WHERE
od.order# = 1005;
B.   SELECT b.title, b.retail, o.quantity FROM books b, orders od, orderitems o WHERE orders.order# =
orderitems.order# AND orderitems.isbn=books.isbn AND od.order#=1005;
C.   SELECT b.title, b.retail, o.quantity FROM books b, orderitems o WHERE o.isbn = b.isbn AND o.order#=1005;
D.   None of the above

Manipulate Data (33-42)


33.   What does ACID mean with respect to relational database?
A.   Accuracy, Consistency, Isolation, Database C.   Atomicity, Consistency, Isolation, Durability
B.   Accuracy, Concurrency, Isolation, Durability D.   Atomicity, Concurrency, Isolation, Durability

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

16.   Which of the following is a Case-Conversion Character function?


A.   CONCAT B.   SUBSTR C.   INITCAP D.   REPLACE

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.

SQL>  DESC  employees  


 Name        Null?      Type  
 -­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐  -­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐  -­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐  
 EMPLOYEE_ID     NOT  NULL  NUMBER(6)  
 FIRST_NAME     VARCHAR2(20)  
 LAST_NAME     NOT  NULL  VARCHAR2(25)  
 EMAIL       NOT  NULL  VARCHAR2(25)  
 PHONE_NUMBER     VARCHAR2(20)  
 HIRE_DATE     NOT  NULL  DATE  
 JOB_ID       NOT  NULL  VARCHAR2(10)  
 SALARY       NUMBER(8,2)  
 COMMISSION_PCT     NUMBER(2,2)  
 MANAGER_ID     NUMBER(6)  
 DEPARTMENT_ID   NUMBER(4)  

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;  

What is the outcome of this query?


A.   An error because the ROUND function cannot be used with Date arguments.
B.   An error because the WHERE condition expression is invalid.
C.   Number of days since the employee was hired based on the current San Diego date and time.
D.   Number of days since the employee was hired based on the current New Jersey date and time.

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.

21.   What will be the outcome of the query given below?


SELECT  100+NULL+999  FROM  dual;  
A.   100 B.   999 C.   NULL D.   1099

22.   What is true regarding the NVL function in Oracle DB?


A.   The syntax of NVL is NVL (exp1, exp2) where exp1 and exp2 are expressions.
B.   NVL (exp1, exp2) will return the value of exp2 if the expression exp1 is NULL.
C.   NVL (exp1, exp2) will return the value of the expression exp2 if exp1 is NOT NULL.
D.   NVL (exp1, exp2) will return exp1 if the expression exp2 is NULL.

Display data from multiple table using joins (23-32)


Republic of the Philippines

Region I
Candon City Division
CANDON NATIONAL HIGH SCHOOL
Candon City (Ilocos Sur)

DIAGNOSTIC TEST in ORACLE DATABASE

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.

Retrieve data using the SQL Select Statement (1-12)


1.   What do you call the column or a concatenation of several columns that uniquely identifies a row in a table?
A.   Candidate Key B.   Foreign Key C.   Primary Key D.   Secondary Key

2.   Which command is used to display the structure of a table?


A.   LIST B.   SHOW C.   DESCRIBE D.   STRUCTURE

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

5.   A BOOK is written by an AUTHOR. What relationship exists between these entities?


A.   1:1 B.   1:M C.   M:M D.   The relationship is not valid.

6.   Which of the following are Data Manipulation Language (DML) commands?


A.   SELECT, INSERT, UPDATE, DELETE, MERGE C.   GRANT, REVOKE
B.   CREATE, ALTER, DROP, RENAME, TRUNCATE, D.   COMMIT, ROLLBACK, SAVEPOINT
COMMENT

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

A.   i, ii, iii B.   i, iii, iv C.   i only D.   i and iv only

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"

Use single-row functions to customize output (13-22)


13.   Which of the following statements are true regarding the single row functions?
A.   They accept only a single argument.
B.   They can be nested only to two levels.
40.   Which of the following statements will apply a box shadow to the right and bottom edge of a div element?
A.   box-shadow: gray 5px 5px; C.   box-shadow: gray 5px -5px;
B.   box-shadow: gray -5px 5px; D.   box-shadow: gray -5px -5px;

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

46.   Which of the following IS NOT a valid web worker operation?


A.   postMessage B.   onmessage C.   close D.   terminate

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();

32.   Which of the following features does web storage support?


A.   Indexing C.   Asynchronous read/write
B.   Transactions D.   Simple key/value pair storage

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>

15.   What number does Math.random() return?


A.   A number between 0 and 1000.
B.   A number of any value.
C.   Your choice: A number between 0 and 100.
D.   A number between 0 and 1.

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)

DIAGNOSTIC TEST in .NET TECHNOLOGY

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.   &copyright; B.   &copywrite; C.   &copy_right; D.   &copy;

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

4.   What does the <header> tag define?


A.   The head of an HTML document C.   A header for a document or section
B.   A representation of the progress of a task D.   Additional details that the user can view or hide

5.   What does the <meter> element define?


A.   A scalar measurement within a known range C.   A scalar measurement within an unknown range
B.   A measurement of known and unknown ranges D.   None of these

6.   Which of the following is an example of a non-inherited property in CSS?


A.   Padding B.   Color C.   Text-align D.   Font-family

7.   The action attribute in a <form> element:


A.   specifies a JavaScript snippet to be executed when the form is submitted.
B.   specifies the form elements that will be processed.
C.   tells the browser what to do if an input field is invalid.
D.   specifies the URL of the service that will handle the submitted data.

8.   Which HTML5 element should you use to create a more structured layout?
A.   <div> B.   <p> C.   <table> D.   <form>

9.   What will be the result of the CSS rule below?


<div  class="container">  
       <p>This  is  a  paragraph.</p>  
       <p>This  is  another  paragraph.</p>  
</div>  
.container  p  {  
   float:  left;  
}  
A.   The parent div will be floated left since its children are all floated left
B.   The height of the parent div will collapse due to the fact that its children are all floated
C.   The height of the parent div will be exactly the combined heights of its children
D.   The parent div will be floated right since its children are all floated left

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

Vous aimerez peut-être aussi