CS434 Final MCQs

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/57

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 12:02 PM on 5/13/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

58 Terms

1
New cards

So what is XML?

Extensible Markup Language

2
New cards

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

3
New cards

T/F Text in the tree diagram that appears without a box is always at a leaf level of the tree

T

4
New cards

T/F Boxes in a box diagram must be nested into other boxes.

(Except for the "biggest box" which may contain other boxes.)

T

5
New cards

Which of the following is camel case?

-good_data

-goodData

-good.Data

-GoodData

-good_Data

goodData

6
New cards

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

7
New cards

T/F XML data has to be passed to the XML constructor in Oracle as a string.

T

8
New cards

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('/')

9
New cards

T/F Always use getstringval() at the end of an XML query select clause [unless it is known that it returns a number].

T

10
New cards

The Oracle function that "works like extract" but returns a Boolean value is called

existsNode

11
New cards

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

12
New cards

T/F extract('/acard/wphone/text()') will find the first tag pair from left.

False

13
New cards

Arrays in XML:

-are prohibited

-Start with 0

-Start with whatever number the user declares

-Start with 1

Start with 1

14
New cards

T/F I can have an XML path in extract() that goes over several levels till it reaches a leaf.

T

15
New cards

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 and

-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

16
New cards

extract('/aa/bb') means this:

Find the string from to so that in the XML tree

-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

17
New cards

extract('/aaa/*/bbb') means

-Find under ANY node so that the ANY node is under the root

-this expression is illegal

-Find ANYWHERE under the root

Find under ANY node so that the ANY node is under the root

18
New cards

extract('/aaa//bbb') means:

-find under ANY node so that the ANY node is under the root

-find ANYWHERE under

-this expression is illegali

find ANYWHERE under

19
New cards

T/F extract('//') means anywhere under the root.

T

20
New cards

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

21
New cards

T/F Key-Value Pairs,

Key and value are separated by =

F

22
New cards

T/F JSON arrays are marked by { } braces.

F

23
New cards

T/F JSON vs. XML

The main advantage of JSON over XML is that JSON is shorter.

T

24
New cards

T/F Every diagram of a JSON structure is a tree with an artificial root {}.

T

25
New cards

T/F A key in a JSON diagram appears within a box

T

26
New cards

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)

27
New cards

The name of the JSON constructor in Oracle is:

-json_set

-json_create

-no constructor is needed

-JASON

-json_insert

no constructor is needed

28
New cards

T/F There is a simple way to do a SELECT on JSON data in Oracle and a complicated way.

T

29
New cards

The complicated access method uses the function:

json_value

30
New cards

No-SQL stands for ___ ___ SQL

Not, Only

31
New cards

___ and ___ are key-value stored databases

Redis, Riak

32
New cards

___ and ___ are columnar databases

Hbase, Cassandra

33
New cards

____ and ___ are document databases

MongoDB, CouchDB

34
New cards

____ is a graph database

Neo4J

35
New cards

T/F A document database stores MS Word and EXCEL files

F

36
New cards

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

37
New cards

REST stands for:

-REpresentational State Transfer

-Representation Evaluation State Transfer

-REliable State Transfer

-REpeated Status Test

REpresentational State Transfer

38
New cards

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

39
New cards

"$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

40
New cards

T/F $addToSet adds (+) the numbers in a set or an array

F

41
New cards

T/F MongoDB has an $inc operator and a $dec operator.

F

42
New cards

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}}

43
New cards

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

44
New cards

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}} ] } )

45
New cards

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

46
New cards

The MapReduce implementation consists of three steps

query, map, reduce

47
New cards

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

48
New cards

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.

49
New cards

Instead of sysdate we use the function

SYSTIMESTAMP

50
New cards

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

51
New cards

T/F Whenever I define an index, Oracle must use it.

F

52
New cards

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

53
New cards

The command for making an index is:

-declare index

-index =

-define index

-create index

-make index

create index

54
New cards

To find out runtime in MongoDB we use:

find({}).explain("runtime")

find({}).runtime("executionStats")

find({}).timestamp("executionStats")

find({}).explain("executionStats")

find({}).explain("executionStats")

55
New cards

T/F When you create an index in MongoDB you have to give it a name. That's just like in Oracle.

F

56
New cards

The mongoDB command for making a new index is:

-makeIndex

-createIndex

-newIndex

-Index is

-Index

createIndex

57
New cards

When using mongoDB, the command to drop an index is:

-deleteIndex()

-nullIndex()

-removeIndex()

-dropIndex()

dropIndex()

58
New cards

T/F You can create an index on two or more keys in MondoDB

T