1/57
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
So what is XML?
Extensible Markup Language
What is one of several advantages of XML?
-It saves time
-It is easier to process for the computer
-Browsers know how to display it beautifully
-You can tell for a value what it means
-It saves space
You can tell for a value what it means
T/F Text in the tree diagram that appears without a box is always at a leaf level of the tree
T
T/F Boxes in a box diagram must be nested into other boxes.
(Except for the "biggest box" which may contain other boxes.)
T
Which of the following is camel case?
-good_data
-goodData
-good.Data
-GoodData
-good_Data
goodData
Two attribute value pairs in XML are
-separated by a blank
-separated by a ;
-separated by a comma
-not permitted
-separated by --
separated by a blank
T/F XML data has to be passed to the XML constructor in Oracle as a string.
T
To select a complete XML expression from a row in an Oracle table you type the following function in the select clause.
-extract()
-extract('\')
-extract(\)
-extract('/')
-extract(/)
extract('/')
T/F Always use getstringval() at the end of an XML query select clause [unless it is known that it returns a number].
T
The Oracle function that "works like extract" but returns a Boolean value is called
existsNode
If I want to select "only what is between the tags" of the tag pair found by path_to_tag, I need to write:
extract('/path_to_tag').text().getstringval()
extract('/path_to_tag').getstringval().text()
extract('/path_to_tag').getstringval(text())
extract('/path_to_tag/text()').getstringval()
extract('/path_to_tag/text()').getstringval()
T/F extract('/acard/wphone/text()') will find the first tag pair
False
Arrays in XML:
-are prohibited
-Start with 0
-Start with whatever number the user declares
-Start with 1
Start with 1
T/F I can have an XML path in extract() that goes over several levels till it reaches a leaf.
T
extract('/JOE') means extract the XML expression:
-if it is there, and return NULL if it is not there
-this expression is illegal
-that has a root JOE and return only text between
-that has a root called JOE and everything under it
-that has a tag JOE anywhere in the tree and everything under it
that has a root called JOE and everything under it
extract('/aa/bb') means this:
Find the string from
-aa is the root tag and bb is a leaf
-aa is the root tag and bb is anywhere in the tree
-aa is the root tag and bb is under it
-aa is any tag and bb is its child
-aa and bb are root tags
aa is the root tag and bb is under it
extract('/aaa/*/bbb') means
-Find
-this expression is illegal
-Find
Find
extract('/aaa//bbb') means:
-find
-find
-this expression is illegali
find
T/F extract('//') means anywhere under the root.
T
T/F You can extract an attribute value of an attribute value pair inside a tag by putting an @ sign into the XML path query right before the name of the attribute.
T
T/F Key-Value Pairs,
Key and value are separated by =
F
T/F JSON arrays are marked by { } braces.
F
T/F JSON vs. XML
The main advantage of JSON over XML is that JSON is shorter.
T
T/F Every diagram of a JSON structure is a tree with an artificial root {}.
T
T/F A key in a JSON diagram appears within a box
T
A column for JSON data in Oracle has to be declared with the data type:
-varchar2
-CLOB
-CLOB (with an additional constraint)
-BLOB (with an additional constraint)
-JSON
CLOB (with an additional constraint)
The name of the JSON constructor in Oracle is:
-json_set
-json_create
-no constructor is needed
-JASON
-json_insert
no constructor is needed
T/F There is a simple way to do a SELECT on JSON data in Oracle and a complicated way.
T
The complicated access method uses the function:
json_value
No-SQL stands for ___ ___ SQL
Not, Only
___ and ___ are key-value stored databases
Redis, Riak
___ and ___ are columnar databases
Hbase, Cassandra
____ and ___ are document databases
MongoDB, CouchDB
____ is a graph database
Neo4J
T/F A document database stores MS Word and EXCEL files
F
Hot swapping means:
-is the opposite of cold swapping of data
-a computer disk can be changed without stopping and restarting the computer
-program data can be changed without stopping and restarting the computer
-a program can be changed without stopping and restarting it
a program can be changed without stopping and restarting it
REST stands for:
-REpresentational State Transfer
-Representation Evaluation State Transfer
-REliable State Transfer
-REpeated Status Test
REpresentational State Transfer
Neo4j assumes that many kinds of important data are:
-stored as Naturally Extended Objects for Java
-stored in Java, version 4 or higher
-stored as tables
-stored as graphs
stored as graphs
"$x" in MongoDB means:
-this is wrong, it should be "x$"
-x must be a dollar amount
-process the characters $ and x as they are
-use the value of x
use the value of x
T/F $addToSet adds (+) the numbers in a set or an array
F
T/F MongoDB has an $inc operator and a $dec operator.
F
The sql update operation for a column price
set price = price - 100
is done in MongoDB by:
-{"price" : {$inc : -100}}
-{inc : {"price" : -100}}
-{$inc : {"price" : -100}}
-{$dec : {"price" : 100}}
{$inc : {"price" : -100}}
The equivalent of SQL
WHERE price > 10
in MongoDB would be:
-find( {"price" : {$> : 10} } )
-find( {"price" : {$gt : 10} } )
-find( {"price" : {> : 10} } )
-find( {"price" : $gt : 10} } )
find( {"price" : {$gt : 10} } )
The equivalent of SQL
WHERE (price > 10) or (amount > 20)
in MongoDB would be:
-find( { $or : [ {"price" : {$gt : 10}} , {"amount" : {$gt : 20}} ] } )
-find( [ {"price" : {$gt : 10}} , "or", {"amount" : {$gt : 20}} ] )
-find( [ {"price" : {$gt : 10}} , $or, {"amount" : {$gt : 20}} ] )
-find( [ $or, {"price" : {$gt : 10}} , {"amount" : {$gt : 20}} ] )
find( { $or : [ {"price" : {$gt : 10}} , {"amount" : {$gt : 20}} ] } )
What happens if you forget the $set in an update operation in mongoDB?
-It works like normal with a $set and adds the json object after the comma
-The json object before the comma is replaced by the json object after the comma
-It assumes that it is a $unset operation
-It gives an error message
The json object before the comma is replaced by the json object after the comma
The MapReduce implementation consists of three steps
query, map, reduce
Map consists of two steps. In the first your program generates pairs and in the second:
-all keys of the same value are collected into an array
-all values are collected into an array
-all values of the same key are added
-all values of the same key are collected into an array
all values of the same key are collected into an array
Why do we need to measure response times for Oracle queries before talking about indexing?
-To charge the database clients the correct amount
-To show that Oracle is faster than other database systems
-To prove that we have made queries faster to execute.
To prove that we have made queries faster to execute.
Instead of sysdate we use the function
SYSTIMESTAMP
I want to perform a query based on values in two columns of the same table.
I am doing this as a nested query.
The INNER query should be the query that:
-returns the larger number of rows
-returns the smaller number of rows
returns the smaller number of rows
T/F Whenever I define an index, Oracle must use it.
F
T/F Whenever I define an index, any query that uses the index will be faster than any query that does not use the index.
F
The command for making an index is:
-declare index
-index =
-define index
-create index
-make index
create index
To find out runtime in MongoDB we use:
find({}).explain("runtime")
find({}).runtime("executionStats")
find({}).timestamp("executionStats")
find({}).explain("executionStats")
find({}).explain("executionStats")
T/F When you create an index in MongoDB you have to give it a name. That's just like in Oracle.
F
The mongoDB command for making a new index is:
-makeIndex
-createIndex
-newIndex
-Index is
-Index
createIndex
When using mongoDB, the command to drop an index is:
-deleteIndex()
-nullIndex()
-removeIndex()
-dropIndex()
dropIndex()
T/F You can create an index on two or more keys in MondoDB
T