Syllabus of the test Duration 40 minutes No of question 40
SQL Concepts
Constraints
RDBMS Concepts
SQL Operators
SQL Commands
Data Retrieval
DDL
SQL Functions
Sub Queries
DML
1 SELECT last_name, salary, hire_date FROM EMPLOYEES ORDERBY salary DESC SELECT last_name, salary, hire_date FROM EMPLOYEES ORDERBY2DESC The two statements produce identical results The second statement returns an error There is no need to specify DESC because the results are sorted in descending order by default
2 Which of the following is not a numeric group function?
Avg Count Highest Max Stdev Sum
3 Examine the data in the EMPLOYEES table given below:
ALLEN 103000 MILLER 201500 KING 202200 DAVIS 305000
4 Which of the following Subqueries work? SELECT * FROM employees where salary > (SELECT MIN(salary) FROM employees GROUP BY department_id); SELECT * FROM employees WHERE salary = (SELECT AVG(salary) FROM employees GROUP BY department_id); SELECT distinct department_id FROM employees Where salary > ANY (SELECT AVG(salary) FROM employees GROUP BY department_id); SELECT department_id FROM employees WHERE SALARY > ALL (SELECT AVG(salary) FROM employees GROUP BY department_id); SELECT department_id FROM employees WHERE salary > ALL (SELECT AVG(salary) FROM employees GROUP BY AVG(SALARY));
5 Which of the following statements are true?
With DDL you can create and remove tables, schemas, domains, indexes and views Select, Insert and Update are DCL commands Grant and Revoke are DML commands Commit and Rollback are DCL commands
6 Which of the following clauses are not allowed in a single row sub-query? From Where Group by Having Order by
7 What is the collection of information stored in a database at a particular moment called?
Schema Instance Table Cluster View Index
8 The overall logical structure of a database can be expressed graphically by:
Data Flow Chart Flow Chart Directed Chart Entity-Relationship Diagram None of the above
9 Consider the following tables:
Books ------ BookId BookName AuthorId SubjectId PopularityRating (the popularity of the book ON a scale of 1TO10) Languagе (such AS French, English, German etc)
Subjects --------- SubjectId Subject (such AS History, Geography, Mathematics etc)
Authors -------- AuthorId AuthorName Country
What is the query to determine which German books(if any) are more popular than all the French?select bookname from books where language='German' and popularityrating = (select popularityrating from books where language='French') select bookname from books where language='German' and popularityrating> (select popularityrating from books where language='French') select bookname from books where language='French' and popularityrating> (select max(popularityrating) from books where language='German') select bookname from books where language='German' and popularityrating> (select max(popularityrating) from books where language='French')
10 Which statements are true for views? The definition of a view is stored in data dictionary Views provide a more secure way of retrieving data Views are actually Tables and store data in the same manner as Tables All of the above
11 Consider the following tables:
Books ------ BookId BookName AuthorId SubjectId PopularityRating (the popularity of the book ON a scale of 1TO10) Languagе (such AS French, English, German etc)
Subjects --------- SubjectId Subject (such AS History, Geography, Mathematics etc)
Authors -------- AuthorId AuthorName Country
What is the query to determine which Authors have written books on two or more subjects? select AuthorName from Authors where Authorid in (select Authorid from Books group by SubjectId having count(*)>1) select AuthorName from Authors where BookId in (select BookId from Books group by BookId having count(*)>1) select AuthorName from Authors where Authorid in (select Authorid from Books group by SubjectId,Authorid having count(*)>1) select AuthorName from Authors where Authorid in (select Authorid from Books group by Authorid having count(*)>1)
12 What does the term DDL stand for? Data Description Language Dynamic Data Language Data Definition Language Data Derived Language Descriptive Data Language
13 The concept of data independence is similar to the concept of _______ Data type
Abstract data type
Consolidation
Isolation
14 What are the programs that execute automatically whenever DML operations are performed on tables called?
Triggers Procedures Functions None of the above
15 What clause should be used to display the rows of a table in ascending order of a particular column?
Where Order By Group By Having First Group By and then Having Like Between
16 What is the error in the following query if the Students table contains several records?
SELECT name FROM students WHERE name = (SELECT name FROM students ORDERBY name); = should be replace by in operator Order by clause in the subquery should be preceded with a group by clause Order by clause in the subquery can be used only if the where and group by clauses have been applied Group by clause should be applied to the outer query An order by clause is not allowed in a subquery There is no error
17 How can data be accessed by users who do not have direct access to the tables?
By creating views By creating triggers By creating stored procedures None of the above
18 Consider the following tables:
Books ------ BookId BookName AuthorId SubjectId PopularityRating (the popularity of the book ON a scale of 1TO10) Languagе (such AS French, English, German etc)
Subjects --------- SubjectId Subject (such AS History, Geography, Mathematics etc)
Authors -------- AuthorId AuthorName Country
19 What is the query to determine which Authors have written at least 1 book with a popularity rating of less than 5? select authorname from authors where authorid in (select authorid from books where popularityrating<5) select authorname from authors where authorid in (select authorid from books where popularityrating<=5) select authorname from authors where authorid in (select BookId from books where popularityrating<5) select authorname from authors where authorid in (select authorid from books where popularityrating in (0,5))
20 An RDBMS performs the following steps:
1)It calculates the results of the group functions of each group 2)It groups those rows together based on the group by clause 3)It orders the groups based on the results of the group functions in the order by clause 4)It chooses and eliminates groups based on the having clause 5)It chooses rows based on the where clause Arrange the above steps in the correct order of execution: 4,3,5,1,2 4,5,3,2,1 5,2,1,4,3 5,2,3,4,1 2,3,1,4,5 2,3,1,5,4 1,2,3,4,5 3,2,1,4,5
21 _________ is the operation that displays certain columns from the table. Restriction Intersection Join Union Projection Selection Extraction SubQuery
22 There is a column c1 in the table t to which a primary key pk is to be added. What will be the correct syntax? Alter table t add primary key(c1); Alter table t add constraint pk primary key(c1); Alter table t add (constraint pk primary key(c1)); Alter table t add pk constraint primary key(c1);
23 Which of the following are aggregate functions in SQL? Avg Select Order By Sum Union Group by Having
24 A table Students has a column called name which stores the names of the students. What will be the correct query to display the names of the students in reverse order? Select name from students reverse; Select name from students reverse name; Select name from students order by name descending; Select name from students order by name reverse; Select name from students order by name desc; Select desc name from students; Select reverse name from students;
25 The primary key index does not allow ________ data in a field. Numeric Character Date Null Duplicate All of the above
oDesk test HTML5 ANSWERS 2013
oDesk test HTML 5 ANSWERS for 2013
Description of oDesk test
Duration
40 minutes
Number of Questions
40 multiple choice questions
Each question has between 1 and 8 options of which 1 or more may be correct
Syllabus of the Test
HTML 5 Elements and attributes
HTML 5 Events
HTML 5 syntax
HTML 5 Web application APIs
Loading HTML 5 Web pages
To find question/answers simply use Find (CTRL + F).
Question: 01 - Which of the following <iframe> attributes are NOT supported in HTML 5.0?
height
marginheight
sandbox
scrolling
Question: 2 - Which <body> tag event is fired when the user leaves the document?
onunload
onundo
onredo
onerror
Question: 03 - Which of the following is NOT a valid value for the <iframe> sandbox attribute in HTML 5.0?
url
allow-scripts
allow-same-origin
allow-forms
Question: 04 - Which of the following is an INVALID value for the type attribute of command tag?
checkbox
radio
command
text
Question: 05 - What is the function of the history traversal task source in HTML 5.0?
It is used for features that react to user interaction, for example, keyboard or mouse input.
It is used for features that react to DOM manipulations, for example, the things that happen asynchronously when an element is inserted in the document.
It is used to queue calls to history.back() and similar APIs.
All of the above.
Question: 06 - What will be the result if you use the following code to your HTML 5.0 document? <p>I use <del>MAC</del> <ins>Microsoft</ins>!</p>/p>
I use MAC Microsoft!
I use MAC Microsoft!
I use MACMicrosoft!
I use MAC Microsoft!
Question: 07 - You want to create a link for your website allowing users to email the webmaster. How will you implement this if the webmaster’s email address is webmaster@xcompany.com?
Question: 08 - In HTML 5.0, how will the script be executed if you use the script element shown below? <script src="script.js" type="text/javascript" defer="defer"></script>
The script is fetched and executed immediately, before the user agent continues parsing the page.
The script will be executed when the page has finished parsing.
The script will be executed asynchronously, as soon as it is available.
Question: 09 - What is the output when you use the HTML 5.0 code snippet shown below? <body onload="alert(this)">
It will alert saying “[object HTMLBodyElement]" when the document is loaded.
It will alert saying “[object Window]" when the document is loaded.
It will alert saying “[this]" when the document is loaded.
The alert message is not properly defined in the body element and an error will be generated when the document is loaded.
Question: 10 - A computer programming book has to go online. Which of the following tags is ideal for displaying the program snippets?
<emp>
<code>
<dfn>
<cite>
Question: 11 - Consider the above code. What will be the impact upon the contents of the element if both the style sheets define the same class? This question is based upon the figure shown below:
The contents of the element will be of red color and will inherit all the effects of style.css.
The contents of the element will be of blue color and will inherit all the effects of style1.css.
The contents of the element will be of white color and will inherit all the effects of style.css and style1.css.
None of the style effects will be applied to the contents of the element.
Question: 12 - Which of the following are valid HTML 5.0 elements?
<canvas>
<summary>
<aside>
<video>
All are correct
Question: 13 - How does a button created by the <button> tag differ from the one created by an <input> tag?
An input tag button can be a reset button too.
A button tag button can be a reset button too.
An input tag button can include images as well.
A button tag can include images as well.
Question: 14 - Which of the following attributes comes in handy when borders have to be put between groups of columns instead of every column?
col
colgroup
rowspan
row
Question: 15 - Which of the following is correct with regard to the oncanplaythrough event fired by media resources in the HTML 5.0 document?
The script will run when the media has reached the end.
The script will run when the media is played to the end, without stopping for buffering.
The script will run when media data is loaded.
The script will run when the length of the media is changed.
Question: 16 - The following link is placed on an HTML webpage. <a href="http://msdn.com/" target="_blank"</a> What do you infer from it?
It will open the site msdn.com in the same window.
It will open the site msdn.com in a new window.
It will open the site msdn.com in a frame below.
It will not be clickable as it is not formed correctly.
Question: 17 - While rendering your HTML 5.0 web page, which of the following <link> element files will get skipped by a compliant user agent if you include the link elements shown below in your document? <link rel="stylesheet" href="A" type="text/plain"> <link rel="stylesheet" href="B" type="text/css">
A link element whose href is “B"
A link element whose href is “A"
None of the above
Question: 18 - What does the icon attribute of the HTML 5.0 command tag define? <command icon="?">Click Me!</command>
It is used to define the url of an image to display as the command.
It is used to define the name of the radiogroup this command belongs to.
It is used to define if the command is checked or not.
It is used to define if the command is available or not.
Question: 19 - How will you change the value of the cookies and items in the Storage objects of the localStorage attributes in HTML 5.0?
By invoking the window.dialogArguments() API method.
By invoking the window. navigator.yieldForStorageUpdates() API method.
By invoking the window.navigator.appName API method.
Question: 20 - What is the role of the <dfn> element in HTML 5.0?
It is used to define important text.
It is used to define computer code text.
It is used to define sample computer code.
It is used to define a definition term
Question: 21 - Which of the following is not a valid input type of the form tag?
checkbox
image
hidden
button
All are valid
Question: 22 - Which form event is fired on the click of a button using a button tag with its type attribute value equal to submit?
onload
onsubmit
onunload
onreset
Question: 23 - How will you return a reference to the parent of the current window or subframe in an HTML 5.0 web application?
window.top
window.parent
window.frameElement
None of the above
Question: 24 - In HTML 5.0, which of the following is NOT a valid value for the type attribute when used with the <command> tag shown below?
<command type="?">Click Me!</command>
button
command
checkbox
radio
Question: 25 - What is the default background color for the canvas element in HTML 5.0?
Black
White
Transparent
Gray
Question: 26 - Which of the following are valid mouse events in HTML 5.0?
ondblclick
ondragstart
ondragenter
onscroll
ondrop
All are correct
Question: 27 - Which of the following languages will you use to paint the graphics designed using the HTML 5.0 <canvas> tag?
VB script
JavaScript
PostScript
None of the above
Question: 28 - Consider the following items of a <select> list: <option value="89″>Item 1</option> <option value="90″>Item 2</option>
Which of the following values would be passed on by clicking the submit button on selecting Item 2 from the list?
89
90
Item 1
Item 2
Question: 29 - Which of the following would give a yellow background to the web page? Note: The code used in the “correct" answer below was deprecated in HTML 4.01! Use styles instead for new code.
<body backcolor="Yellow">
<body background="Yellow">
<body bgcolor="Yellow">
<body color="Yellow">
Question: 30 - What is the function of onobsolete, an application cache API method in HTML 5.0?
It reflows the HTML document using updated cached content.
It triggers an event when the cache content has been marked as obsolete.
It triggers an event when the cache content has been updated.
It updates the cache for the current document in the background.
Question: 31 - Which of the following represents INVALID syntax for defining an attribute value in an HTML 5.0 document?
<input name =’be evil’ />
<input name=be evil />
<input name = “be-evil" />
All of the above.
Question: 32 - Which of the following is NOT a valid attribute for the <link> element in HTML 5.0?
hreflang
rel
http-equiv
media
Question: 33 - How will you bind the datalist option (shown below) with an <input> element, whose type attribute is set to url, to get the result shown in the image? This question is based upon the figure shown below:
User should define an accept attribute to the input element whose type is url.
User should define multiple attribute to the input element whose type is url.
User should define a list attribute to the input element whose type is url.
User should define a placeholder attribute to the input element whose type is url.
Question: 34 - Which of the following statements is correct if you allow the user to select only one radio button from a group of radio buttons?
The name of the input tag must be the same for all the radio buttons.
The value of the input tag must be the same for all the radio buttons.
The display text of the input tag must be the same for all the radio buttons.
All the radio buttons must be added to the same group using the <optgroup> tag.
Question: 35 - Which of the following is an INVALID keyword value for http-equiv attribute when used with the <meta> element in HTML 5.0?
content-type
expires
set-cookie
keywords
refresh
author
Question: 36 - Which media event is triggered when there is an error in fetching media data in HTML 5.0?
onstalled
onwaiting
onsuspend
oninvalid
Question: 37 - In HTML 5.0, what is the function of the sandbox attribute when used with <iframe> as shown below? <iframe src="aaa " sandbox=?></iframe>
It is used to define the restrictions to the frame content.
It is used to define the URL of the document that should appear in the iframe.
It is used to specify that an iframe should appear as if it is part of the document the iframe is in.
Question: 38 - Which of the following is NOT a supported attribute of the <ol> element in HTML 5.0?
type
reversed
start
compact
Question: 39 - When is the window onstorage event triggered in the HTML document?
It is triggered when the window is resized.
It is triggered when a document loads.
It is triggered when a document performs an undo function.
It is triggered when the window becomes visible.
Question: 40 - Which of the following is NOT a valid attribute for the <video> element in HTML 5.0?
controls
autoplay
disabled
preload
Question: 41 - Which of the following is NOT a valid syntax for the <h1> element in HTML 5.0?
<h1> This is header 1</h1>
<h1 align="center"> This is header 1</h1>
<h1 onClick="dothis(‘sc1′)" >This is header </h1>
<h1 style="cursor:auto;">This is header </h1>
Question: 42 - Which of the following video file formats are currently supported by the <video> element of HTML 5.0?
CCTV
MPEG 4
Ogg
3GPP
If you like this post please leave the comment.
Leave the comment if you need some specific TEST answers or Interview questions.