Final Flashcards
The time required to read or write the first byte of data is known as _____.
access time
transfer rate
random-access
volatility
access time
A magnetic disk groups data into _____.
blocks
sectors
kilobytes
pages
sectors
A relational database uses row-oriented storage to store an entire row
within one _____.
Table
block
page
sector
block
With column-oriented storage, a block stores values for _____.
a single column
non-key columns
key columns only
all table columns
a single column
Data was not saved before a system was accidentally powered off. This data was located in _____.
non-volatile memory
volatile memory
flash storage
magnetic storage media
volatile memory
The heap table structure is optimized for _____.
inserting new rows
deleting all rows with primary key between two fixed values
reading all rows with primary key between two fixed values
updating all occurrences of a specific value of a column, in all rows
inserting new rows
The sort column in a sorted table determines the _____ row order.
key
physical
dynamic
linked
physical
Which table structure might use the modulo function to locate rows?
Sorted
Hash
Heap
Cluster
Hash
In a multi-table, a _____ column is available in all interleaved tables.
sort
hash function
bucket
cluster key
cluster key
A _____ assigns each row to a group of linked blocks, called a bucket.
hash table
heap table
table cluster
sorted table
hash table
A single-level index is a file that contains column values and pointers to _____ containing the column _____.
tables, key
blocks, key
rows, value
tables, rows
rows, value
In order to locate rows selected by a query, an index scan reads index blocks _____.
in reverse order
randomly
sequentially
in order of key values
sequentially
When performing a search, which scan type is fastest?
Cluster
Row
Table
Index
Index
A _____ index is an index on a non-unique sort column.
clustering
primary
secondary
sorted
Clustering
When a table is updated and the index block has no free space for a new index entry, what happens?
An error results.
A new block is merged.
The block splits.
The entry is removed.
The block splits
The bottom level of a multi-level index is a _____index.
sorted single-level
unsorted single-level
bottom-level block
primary and clustering
sorted single-level
What is the fan-out for a multi-level index where index entries are 32 bytes and index blocks are 10 kilobytes?
Approximately 400
Approximately 300
Approximately 200
Approximately 500
Approximately 300
How are blocks read with a single-level index scan?
A scan is initiated to read all table blocks. Index blocks are then read.
The search reads one index block plus selected table blocks.
A scan reads all index blocks to find table blocks that contain selected rows. The table blocks are then read.
A scan is initiated to read all table blocks that contain index blocks with selected data.
A scan reads all index blocks to find table blocks that contain selected rows. The table blocks are then read.
Branches that are similar in length in an index hierarchy are _____.
sparse
primary
balanced
dense
balanced
Which of the following is a characteristic of a B-tree index, but not a B+tree index?
Pointers to table blocks appear only in the bottom level.
All column values appear in the bottom level.
Column values are occasionally repeated in the index.
Column values do not repeat at lower levels.
Column values do not repeat at lower levels.
Hash index entries are assigned to _____.
buckets
values
clusters
blocks
buckets
What are two characteristics of an efficient bitmap index?
The WHERE clause may specify any values in upper case. The column used in a WHERE clause may contain mixed upper and lower case characters.
The database can quickly determine the block containing a table row from the index row number. Any indexed column contains relatively few distinct values.
Each bucket initially has one block. Any additional blocks are allocated and linked to the initial block.
Indexes change only when primary key values are updated. Physical indexes change whenever a row moves to a new block.
The database can quickly determine the block containing a table row from the index row number. Any indexed column contains relatively few distinct values.
What is a characteristic of a logical index?
Each bucket initially has one block.
Any additional blocks are allocated and linked to the initial block.
The block containing a table row is determined from the index row number.
Index does not change when a row moves to a new block.
Index does not change when a row moves to a new block.
A column contains grades from 0 to 10, but a WHERE clause specifies values from 0 to 100. A _____ index can be used to modify the column values and process the queries.
logical
function
multi-level
single-level
function
In a logical index, pointers to table blocks are replaced with _____ values.
artificial key
primary key
foreign key
composite key
primary key
What object maps one or more tables to a single file?
Tablespace
Shard
Vertical partition
Horizontal partition
tablespace
A subset of table rows is called a _____.
horizontal partition
fragment
cluster
vertical partition
horizontal partition
How does a list partition assign rows to partition?
A value that is determined automatically by the database.
A return value from a partition expression that uses VALUES IN.
A return value from a partition expression that specifies MAXVALUE.
A specified number of partitions assigned with positive integer values.
A return value from a partition expression that uses VALUES IN.
When a table is assigned to a tablespace, where is the index stored?
In an adjacent tablespace.
Within the table.
In the same tablespace as the table.
In a separate tablespace file.
In the same tablespace as the table.
A _____ partition requires a partition expression with positive integer values.
vertical
list
hash
horizontal
hash
Which storage engine provides full support for transaction management and locking?
MEMORY
MySQL
MyISAM
InnoDB
InnoDB
In MySQL with InnoDB, how are primary and secondary indexes created?
Primary indexes are automatically created for each primary key. Secondary indexes are created manually for all foreign keys.
Primary indexes are manually created for each primary key. Secondary indexes are created manually for all foreign keys.
Primary indexes are automatically created for each primary key. Secondary indexes are created automatically for all foreign keys.
Primary indexes are manually created for each primary key. All secondary indexes are created automatically.
Primary indexes are automatically created for each primary key. Secondary indexes are created automatically for all foreign keys.
In MySQL with InnoDB, tables with a primary key have a _____ structure, while those without a primary key have a _____ structure.
cluster, heap
sorted, hash
sorted, heap
heap, sorted
sorted, heap
What approach can a database administrator use to assess the effectiveness of indexes when investigating slow queries?
Inspect query logs
Partition large tables
Change the primary key
Run EXPLAIN on queries
Run EXPLAIN on queries
A database _____ is a unit of work that is treated as a whole. It is either completed as a unit or failed as a unit.
commit
operation
rollback
transaction
transaction
In an online bank application that transfers funds from a checking account to a savings account, if a debit is made successfully from the checking account, the _____ property ensures that the corresponding credit is made to the savings account.
atomicity
isolation
consistency
durability
atomicity
In an online bank application that transfers funds from a checking account to a savings account, the _____ property ensures that another transaction sees the transferred funds in one account or the other, but not in both, nor in neither.
durability
atomicity
isolation
consistency
isolation
In an online bank application that transfers funds from a checking account to a savings account, the _____ property ensures that the changes made to each account will not be lost due to a computer failure.
durability
consistency
isolation
atomicity
durability
A ____ is a sequential order of database instructions for multiple transactions.
Query
Transaction
Schedule
Path
Schedule
Refer to the schedule below. The initial value of B is 7 and C is 3. What is the value of A after the schedule executes?
A schedule with two transactions. Line 1, T1: read B. Line 2, T1: A = B + 1. Line 3, T1: write A. Line 4, T1: commit. Line 5, T2: read C. Line 6, T2: B = C - 2. Line 7, T2: write B. Line 8, T2: commit.
4
7
8
2
8
Refer to the schedule below. The initial value of B is 7 and C is 3. What is the value of A after conflicting schedule executes?
A schedule with two transactions. Line 1, T2: read C. Line 2, T2: B = C - 2. Line 3, T2: write B. Line 4, T1: read B. Line 5, T1: A = B + 1. Line 6, T1: write A. Line 7, T1: commit. Line 8, T2: commit.
4
7
8
2
2
In which isolation level can dirty reads occur?
Repeatable read
Serializable
Read uncommitted
Read committed
Read uncommitted
Which isolation level prevents dirty, non-repeatable, and phantom reads?
Repeatable read
Serializable
Read committed
Read uncommitted
Serializable
A database administrator is updating one of the tables in the database. Which of the following techniques can prevent other database administrators from doing concurrent transactions to the same table?
Scoping
Logging
Mirroring
Locking
Locking
A _____ is a part of the concurrency system that monitors, grants, and releases locks.
Lock Optimizer
Lock Administrator
Lock System
Lock Manager
Lock Manager
In a _____, all transactions come to a halt and remain at a standstill until one of the transactions is aborted.
deadlock
locking
two-phase locking
timeout
deadlock
Which deadlock management technique automatically rolls back a transaction when a lock is not released in a fixed period of time?
Cycle detection
Timeout
Data ordering
Aggressive locking
Timeout
Refer to the table and schedule below. The UPDATE statement in transaction T1 holds an exclusive lock on the Class table. With strict two-phase locking, when does the SELECT statement in transaction T2 execute?
A schedule with two transactions. Line 1, T1: UPDATE Class. Line 2, T1: SET TeacherID = 32412. Line 3, T1: WHERE ClassID = 80;. Line 4, T2: SELECT CourseTitle. Line 5, T2: FROM Class WHERE ClassID = 80;. Line 6, T1: ROLLBACK;.
Immediately after the UPDATE statement in T1 executes
After the ROLLBACK statement in T1 executes
The SELECT statement in T2 will never execute
At the same time as the UPDATE statement in T1 executes
After the ROLLBACK statement in T1 executes
A document that sequentially writes all the database operations is known as a/an _____.
system log
task log
recovery log
application log
recovery log
A recovery system should manage which three failure scenarios?
Transaction failure, System failure, and Storage media failure
Transaction failure, Memory failure, and Storage media failure
Transaction failure, Program failure, and Storage media failure
Transaction failure, System failure, and Application failure
Transaction failure, System failure, and Storage media failure
The username and password for the database in the configuration file of a web application is incorrect, so the web application cannot connect to the database. Which failure scenario best describes this example?
System failure
Storage media failure
Transaction failure
Task failure
Transaction failure
Choose the recovery log that is generated by the schedule below.
A schedule with two transactions. Line 1, T1: read B. Line 2, T2: read C. Line 3, T1: A = B + 1. Line 4, T1: write A. Line 5, T1: commit. Line 6, T2: B = C - 2. Line 7, T2: write B. Line 8, T2: rollback.
- start T1
- start T2
- update T1, AID, Aoriginal, Anew
- update T2, BID, Boriginal, Bnew
- undo T2, BID, Boriginal
- commit T1
- rollback T2
- start T1
- start T2
- update T1, AID, Aoriginal, Anew
- commit T1
- update T2, BID, Boriginal, Bnew
- undo T2, BID, Boriginal
- rollback T2
- start T1
- update T1, AID, Aoriginal, Anew
- start T2
- update T2, BID, Boriginal, Bnew
- undo T2, BID, Boriginal
- commit T1
- rollback T2
- start T1
- update T1, AID, Aoriginal, Anew
- start T2
- commit T1
- update T2, BID, Boriginal, Bnew
- undo T2, BID, Boriginal
- rollback T2
- start T1
- start T2
- update T1, AID, Aoriginal, Anew
- commit T1
- update T2, BID, Boriginal, Bnew
- undo T2, BID, Boriginal
- rollback T2
In the recovery log below, line 6 is a/an _____.
- start T1
- start T2
- update T1, AID, Aoriginal, Anew
- commit T1
- update T2, BID, Boriginal, Bnew
- undo T2, BID, Boriginal
- rollback T2
checkpoint record
transaction record
update record
compensation record
compensation record
_____ is a recovery technique that creates a nearly synchronized backup of the primary database on another database server.
Data backup
Cold backup
Storage backup
Hot backup
Hot Backup
Refer to the sequence below. What is the isolation level of transaction E?
session begins
SET GLOBAL TRANSACTION
ISOLATION LEVEL SERIALIZABLE;
session ends
session begins
SET SESSION TRANSACTION
ISOLATION LEVEL REPEATABLE READ;
transaction A
transaction B
SET TRANSACTION
ISOLATION LEVEL READ UNCOMMITTED;
transaction C
SET TRANSACTION
ISOLATION LEVEL READ COMMITTED;
transaction D
transaction E
session ends
Read uncommitted
Read committed
Repeatable read
Serializable
Repeatable Read
A transaction _____ indicates the starting and ending statement of a database transaction.
boundary
scope
coverage
limit
boundary
Refer to the initial Class table, SQL transaction, and final Class table, below. Which SAVEPOINT identifier is used to produce the final Class table?
A table named INITIAL CLASS TABLE with 5 rows and 4 columns. The first row contains headers ClassId, CourseCode, CourseTitle, TeacherId. The second row contains entries 12, HTML1, Web Development, 32412. The third row contains entries 30, DB1, Databases, 11234. The fourth row contains entries 56, PROG1, Programming, 11234. The fifth row contains entries 80, MATH26, Algebra, NULL.
START TRANSACTION;
SELECT CourseTitle FROM Class;
SAVEPOINT S1;
UPDATE Class SET CourseTitle = “Programming in C” WHERE ClassID = 56;
SAVEPOINT S2;
UPDATE Class SET TeacherID = 32412 WHERE ClassID = 56;
SAVEPOINT S3;
DELETE FROM Class WHERE ClassID = 80;
SAVEPOINT S4;
ROLLBACK TO _____;
UPDATE Class SET TeacherID = 32412 WHERE ClassID = 80;
COMMIT;
A table named FINAL CLASS TABLE with 5 rows and 4 columns. The first row contains headers ClassId, CourseCode, CourseTitle, TeacherId. The second row contains entries 12, HTML1, Web Development, 32412. The third row contains entries 30, DB1, Databases, 11234. The fourth row contains entries 56, PROG1, Programming, 11234. The fifth row contains entries 80, MATH26, Algebra, 32412.
S3
S2
S4
S1
S2
_____ allows all executed database instructions to be rolled back and to be restored in a prior transaction state.
RELEASE SAVEPOINT
SET TRANSACTION
COMMIT
SAVEPOINT
SAVEPOINT
In MySQL, which of the following SQL operations always commits immediately?
DELETE
SELECT
CREATE
INSERT
CREATE
Which MySQL layer interacts directly with database users and administrators?
Query Processor
File system
Tools
Storage engine
Tools
A developer wishes to link to a database with a utility created in C. Which MySQL component does the developer use for the link?
API
Command-Line
Connector
Workbench
API
In the query processor layer, the query optimizer generates a/an _____.
connection
execution plan
data import
primary key
Execution plan
Which MySQL component retains data blocks from storage in main memory for possible reuse?
Connection manager
Buffer manager
Storage manager
Cache manager
Buffer Manager
A buffer manager retains _____ from the _____ to reduce data access time.
data blocks, cache
data blocks, file system
files, file system
free space, cache entries
data blocks, file system
A database admin uses a SHOW statement to retrieve information about objects in a database. This information is contained in a _____.
data dictionary
file system
storage manager
index
data dictionary
_____ architecture is an example of a modern multi-tier architecture.
Server
Desktop
Web
Browser
Web
An organization uses a database and application development tools through a cloud provider’s _____ services.
SaaS
PaaS
IaaS
NaaS
PaaS
Using a cloud-based database comes with risk. _____ is a regulatory risk.
Security
Reliability
Privacy
Elasticity
Privacy
A retailer is using a cloud-based transaction database and is experiencing sales fluctuations through the year. The ability for cloud resources to adapt to such change in utilization is called _____.
privacy
reliability
security
elasticity
Elasticity
An organization deploys computer processing power and storage through a cloud provider’s _____ services.
SaaS
PaaS
IaaS
NaaS
IaaS
When concurrently processing instructions, a shared memory computer works well with a common data set in a _____ memory space.
parallel
single
cache
distributed
Single
An organization has a main office and three satellite locations. Data specific to each location is stored locally in which configuration?
Distributed
Private
Shared
Parallel
Distributed
For integrity purposes, a distributed transaction requires all or _____ nodes to be updated in order to complete the transaction.
no
shared
primary
connected
no
What occurs when a distributed database experiences a network error and nodes cannot communicate?
Inconsistent transactions
Network partition
Database failure
Consistent records
Network partition
Which of the following is NOT a replica type?
Database
Data
Table
Query
Query
A replicated database maintains at least _____ or more replicas on _____ storage devices.
three, distributed
two, separate
three, parallel
two, propagated
two, separate
A database admin configures replication for a distributed database. Which technique applies updates to any available node?
Parallel system
Group replication
Master/slave
Primary/secondary
Group replication
Due to infrequent updates, many distributed databases use a _____ catalog.
replicated
parallel
primary
private
replicated
In a primary/secondary replica update for a distributed database, secondary nodes are updated _____.
at the same time as the primary node replica
with independent local transactions
to any available single node
as a single distributed transaction
with independent local transactions
Operational data changes _____, while analytic data is updated _____.
in real time, at fixed intervals
at fixed intervals, in real time
in real time, as it changes
at fixed intervals, per a schedule
in real time, at fixed intervals
An operational database contains tables in third normal form. This design reduces _____.
interference
redundancy
reference time
normalization
redundancy
Data warehouses should be refreshed periodically. To start, all data should be _____.
cleansed of any errors
restructured for optimization
extracted to a temporary database
integrated the data into a uniform structure
extracted to a temporary database
For reporting purposes, an organization establishes a(n) _____, which is separate from the operational database.
autonomous database
data warehouse
embedded database
star schema
data warehouse
During a data _____ phase, a database administrator refreshes a data warehouse and replaces incompatible keys with consistent values.
cleansing
integration
restructuring
extraction
integration
In a data warehouse that uses a dimensional design, a StudentID column is found in which table?
Schema
Star
Dimension
Parallel
Dimension
A hierarchy in a dimension table contains a series of _____ where each has a _____ relationship to the next.
columns, one-many
columns, many-many
indexes, one-many
rows, many-many
columns, one-many
A date dimension table tracks data for two years. How many rows does the table contain?
365
730
24
12
730
A primary key of a _____ is the composite of the foreign keys that reference a _____.
dimension hierarchy, dimension table
star schema, fact table
dimension table, fact table
fact table, dimension table
fact table, dimension table
A time dimension table tracks throughout a day by minute. How many rows does the table contain?
60
24
1440
240
1440
What is a concern with using an in-memory database?
Redundancy
Interference
Volatility
Privacy
Volatility
A database designer suggests using a database that is packaged with a programming language. Which of the following databases is a good choice?
Autonomous database
Embedded database
Federated database
In-Memory database
Embedded database
In a federated database, a(n) _____ database operates independently of other databases.
Embedded
In-memory
Heterogeneous
Autonomous
Autonomous
Raw data that is copied from multiple data sources is called what?
Dimension hierarchy
Replicated catalog
Data lake
Federated database
Data Lake
In a data lake, data is often loaded _____ rather than _____.
periodically, in parallel
periodically, continuously
continuously, in parallel
continuously, periodically
continuously, periodically
MONEY is an example of a _____ type.
binary
integer
character
semantic
Semantic
A complex type _____.
is defined by the user, not the database system
cannot be used in a join query
has multiple values per table cell, from the perspective of the database system
has a richer internal structure than a simple type
has a richer internal structure than a simple type
Which type is complex?
TEXT
DATE
JSON
BLOB
JSON
A user-defined type is defined in terms of a _____ type.
complex
base
simple
built-in
base
In MySQL, a column has a SET type with 16 possible elements. How many bytes does each column value require?
1
2
8
4
2
The PosgreSQL ARRAY type is an example of a _____ type.
simple
semantic
collection
object
Collection
Elements of the _____ type can be repeated and are not ordered.
MULTISET
ARRAY
LIST
SET
MULTISET
What is the difference between the ENUM type and the SET type?
ENUM and SET types are equivalent.
ENUM values are compressed, SET values are not.
ENUM has a character base type, SET has a numeric base type.
Each ENUM value has exactly one element, each SET value can have many elements.
Each ENUM value has exactly one element, each SET value can have many elements.
In _____ data, each element is named, and element types are not explicitly declared.
semistructured
structured
unstructured
complex
semistructured
What is wrong with the syntax of this XML?
<menu>
<Item>
<Name>Green salad</Name>
<Description>Lettuce, tomatoes, green peppers</Description>
<Price>7.00</Price>
</Item>
<Item>
<Name>Greek salad</Name>
<Description>Cucumbers, tomatoes, onions, feta cheese</Description>
<Price>8.50</Price>
</Item>
<Item>
<Name>Cobb salad</Name>
<Description>Eggs, bacon, lettuce, tomatoes, green onions</Description>
<Price>11.00</Price>
</Item>
</menu>
XML cannot contain multiple tags with the same name.
Tag names cannot be capitalized.
The XML syntax is correct.
Tags cannot be nested inside other tags.
The XML syntax is correct.
How many types are possible for elements of a JSON document?
Zero - JSON elements do not have a type
Unlimited - JSON element types are user-defined
6
3
6
MySQL stores JSON values as _____.
an internal binary format
XML values
a VARCHAR type
a TEXT type
an internal binary format
Elements can be nested in _____.
neither XML nor JSON
XML but not JSON
both XML and JSON
JSON but not XML
both XML and JSON
Select the correct WKT syntax for a polygon.
POLYGON(0 0; 20 10; 10 20; 0 0)
POLYGON( (0 0, 20 10, 10 20, 0 0) )
POLYGON(0 0, 20 10, 10 20, 0 0)
POLYGON( (0 0) (20 10) (10 20) (0 0) )
POLYGON( (0 0, 20 10, 10 20, 0 0) )
Geographic data is _____.
not supported in MySQL
another name for geometric data
any two-dimensional spatial data
defined with reference to the surface of the earth
defined with reference to the surface of the earth
A standardized spatial reference system is identified with a/an _____.
latitude and longitude
data type
standard coordinate system
SRID
SRID
How many bytes does POINT(18.5 -20) require in internal MySQL format?
32
24
20
16
24
In MySQL, spatial values _____ numeric values.
cannot be compared to
are the same as
can be compared directly with
must be converted to numeric values using spatial functions prior to comparing with
must be converted to numeric values using spatial functions prior to comparing with
In two dimensions, a minimum bounding rectangle is the _____?
the minimum area of a polygon or multipolygon
the sum of the spatial values contained within a rectangle
the rectangular area aligned with the X- and Y-axes that contains all spatial values
the smallest rectangle aligned with the X- and Y-axes that contains a spatial value
the smallest rectangle aligned with the X- and Y-axes that contains a spatial value
An R-tree has a ____ index with index entries containing ____.
multi-level, MBRs
multi-level, column values
single-level, MBRs
single-level, column values
multi-level, MBRs
One goal of object-relational database technology is to _____.
simplify database programming
reduce data storage space
improve query response time
simplify database administration
Simplify database programming
In an object-programming language, a class is like a _____, and an object is like a database _____.
composite type, row
table, column
object, query
schema, instance
composite type, row
An object-relational database is _____.
an object-oriented programming language with database capabilities such as transaction management
a software layer between a relational database and an object-oriented programming language
a relational database that supports an object type
an object database that supports subtables and supertables
a relational database that supports an object type
In Oracle Database, the object type _____.
can define either an individual column or an entire table
can define an entire table only
is not supported
can define an individual column only
Can define either an individual column or an entire table
Which of the following does NOT appear in the Oracle Database’s CREATE TYPE statement below?
CREATE TYPE NameType AS OBJECT ( … )
Function names and return types
Function body
Property names and types
Procedure names and parameters
Function body
Given the Oracle Database statement below, what is PlaceType?
CREATE TYPE HomeType UNDER PlaceType (
Bedrooms INT,
Bathrooms INT,
OVERRIDING MEMBER FUNCTION SquareFeet RETURN INT
);
Object that does not use NOT FINAL keywords
Table that implements the PlaceType object
Supertype
Subtype
Supertype
A big data application generates 20,000 data entries per second. This rate is called what?
Variety
Veracity
Velocity
Volume
Velocity
To fulfill data processing requirements in a growing transactional database, _____ scales up by increasing processing power of a limited number of systems.
table partitioning
extensive replication
horizontal scaling
vertical scaling
Vertical Scaling
Which approach splits data sets across multiple systems?
Partitioning
Relaxing
Scaling
Sharding
Sharding
A NoSQL database that represents data as a key with multiple values is called a _____ database.
document
key-value
graph
wide column
wide column
A NoSQL database that represents data using XML or JSON is called a _____ database.
wide column
key-value
document
graph
document
When a key-value database allows multiple values per key, how is each value identified?
By the use of a timestamp.
By using a name for each value.
By assigning a query to each key value.
By assigning more keys.
By using a name for each value.
What is a characteristic of hash structure in a key-value database?
Databases can shard data across thousands of machines.
Replication for high availability in the event that storage devices fail.
Inconsistency across multiple replicas enables faster writes.
Buckets are stored on different machines, enabling horizontal scaling.
Buckets are stored on different machines, enabling horizontal scaling.
Which NoSQL database uses tables that consist of a key and a group of items?
Oracle NoSQL
DynamoDB
Redis
SQL
DynamoDB
Which information would be acceptable in a key-value database?
Key = badge number, value = office
Key = color, value = fruit
Key = car make, value = Ford
Key = part name, value = part number
Key = car make, value = Ford
A _____ database stores related data as column families.
wide column
key-value
document
graph
wide column
Which wide-column database has no single point of failure and is always available?
NoSQL
Cassandra
BiTable
HBase
Cassandra
A wide column database is similar to a relational database except that it does not support _____.
third normal form
primary keys and joins
foreign keys and joins
primary keys and queries
foreign keys and joins
Within each row of a wide column database, all columns of a family are stored ____ to optimize performance of read queries.
incrementally
decrementally
non-contiguously
contiguously
contiguously
Strict consistency is enforced in some document databases by directing read queries to _____.
the primary replica
all replicas
the secondary replica
all subsequent replicas
the primary replica
Which document type is commonly used by document databases?
XML
XLSX
DOCX
SQL
XML
In a document database, a ________ assigns documents to shards.
replica
join function
range function
key-value
range function
A document database stores data as _____, while a relational database stores data as _____.
collections, tables
collections, ranges
tables, collections
ranges, tables
collections, tables
A primary replica has failed in a document database. What happens as a result?
A secondary replica becomes active
A secondary replica synchronizes
All subsequent replicas synchronize
All subsequent replicas become active
A secondary replica becomes active
A database designer depicts a database as a graph with _____ representing entities.
vertices
properties
edges
links
vertices
Vertices in a graph database are similar to _____ in a relational table.
keys
rows
columns
Relationships
rows
Vertices in a graph database are similar to _____ in a relational table. Which language is created specifically for graph databases?
Python
SQL
GraphAccelerator
Gremlin
Gremlin
Which graph database physical structure might combine a graph and a relational database?
Property
Native
Layered
Vertex
Layered
________ means each vertex in a graph database contains a pointer to all connected vertices.
Hashing
Referential integrity
Index-free adjacency
Full connectivity
Index-free adjacency
In the MongoDB query, how is every student EXCEPT Larry selected?
{ name: { _____: _____ } }
$ne, “Larry”
$eq, “Larry”
$!=, “Larry”
$==, “Larry”
$ne, “Larry”
In a MongoDB shell, what happens when the following command executes?
db.movies.insert({ name: “What About Bob?”, year: 1991 })
The document is not added to the collection without an _id
The MongoDB shell prompts for an _id before adding the document
The document is added to the collection with no _id
The document is added to the collection with a generated _id
The document is added to the collection with a generated _id
Given the autos collection, complete the statement to return all documents.
db.autos._____({ year: { _____ } })
[
{
“_id” : 100,
“make” : “Ford”,
“model” : “Fusion”,
“year” : 2014,
“price” : 13500
},
{
“_id” : 200,
“make” : “Honda”,
“model” : “Accord”,
“year” : 2013,
“price” : 16900
},
{
“_id” : 300,
“make” : “Dodge”,
“model” : “Avenger”,
“year” : 2012,
“price” : 10800
},
{
“_id” : 400,
“make” : “Toyota”,
“model” : “Corolla”,
“year” : 2013,
“price” : 13400
}
]
find, $gte: 2012
get, $lte: 2013
find, $lte: 2012
get, $gte: 2012
find, $gte: 2012
What command results in an empty students collection?
db.students.remove({})
db.students.delete()
db.students.removeAll()
db.students.delete({})
db.students.remove({})
Given the autos collection, what condition sets all sold fields to true?
db.autos.update({ price: {$gte 13500} },
{ _____ }, { multi: true })
$inc: { sold: true }
sold = true
sold: true
$set: { sold: true }
$set: { sold: true }