Missed Review Questions Flashcards

(76 cards)

1
Q

What API only supports one language?

A

DB-API

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Several connections can exist at the same time T/F

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Stored functions have no parameters T/F

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is embedded SQL syntax

A

Starts with EXEC SQL, follows normal syntax for SQL and ends with semi colon

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Which database might have an unordered set of values?

A

MySQL

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is equijoin?

A

Condition is based on ‘=’ between columns of two tables

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is self-join?

A

Table join with itself to compare rows within same table

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is cross join?

A

Returns Cartesian product of two table (all possible row combinations)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is non-equijoin?

A

Uses operators other than ‘=’ to compare the join like <, > etc

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Which name refers to a single value selected by flightCursor?

A

airport

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the only difference between multi-set and list

A

Elements are ordered in list types but not multiset

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Which datatype is best for storing a cities population from dozen - 24 Million?

A

unsigned Integer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Does inserting into a table view require a primary key?

A

Yes, the primary key of the base table

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is the statement to add a column to a table?

A

ALTER TABLE tableName ADD ColumnName Datatype

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Which statements shows all databases in a database system?

A

SHOW DATABASES;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Do you need to specify a primary key if it has the AUTO_INCREMENT qualifier?

A

No it will generate the value on its own

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Programming languages fall into either ____ or ____ paradigms

A

imperative, declarative

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Which of the following database programming techniques is commonly used with OOP?

A

API

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

An application may use a ___ API which in turn uses a ____ API to access unsupported data sources

A

primary, secondary

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

In DB APIs, ____ a query is a term used when compiling happens before executing the query

A

preparing

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

Given a connection object conn, the following connector /J code fragment executes the stored procedure. What XXX and YYY complete the code?

A

CallableStatement, registerOutParameter

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

____ allows a programmer to create an SQL query with a PREPARE statement at runtime

A

Dynamic SQL

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

Which of the following DB programming techniques is an extension of the SQL language that is typically used for DP applications?

A

Procedural SQL

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

Why would mysql.connector.connect() throw an exception in a connector/python program?

A

The function was called with a username that does not have access to the DB

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
A develop wants to create an application using PHP. Which of the following APIs can the developer use to interact with DB?
PDO
26
Which statement should replace XXX? There is a CREATE FUNCTION code with the line right above BEGIN missing
READS SQL DATA
27
DB queries are commonly implemented using a declarative programming language because of which two main reasons?
Easier programming and faster execution
28
The ____ method of the ____ class creates a connection object in connector
getConnection(), DriverManager
29
Assume that a DB connection is valid connection. What is the output of the code below?
No change on the teacher table because the dbQuery has not been executed with EXEC
30
Which statement is not an advantage of using a view table?
The creation of a new base table is always up to date
31
Refer to the stored procedure,what is the correct syntax to get the number of classes taught using a stored procedure call?
CALL TeacherClassLoad(45631, @numberOfClasses)
32
In order to run a program with Embedded SQL, the compiler ____
translates the SQL code to the host language first, and then to an executable program
33
The ___ keyword helps the compiler identify embedded SQL statements in a program
EXEC SQL
34
Which DB programming technique best matches - compiles and stores complex data processing tasks on the DB server
Procedural SQL
35
The ____ statement executes a query
OPEN
36
C contains control flow statements and SQL does not. This is an example of the ____ gap
paradigm
37
The EXEC sql keyword is used in procedural SQL T/F
False
38
A stored procedure is compiled every time the procedure is called T/F
False
39
A ___ determines how to process statements in a declarative language
compiler
40
What API is often used with the C# language?
ADO.NET
41
How does UNION work?
Union joins everything while removing duplicates
42
How does INTERSECT work?
Only returns rows that are in both lists
43
How does UNION ALL work?
Union all puts both tables together without removing duplicates
44
What is DB-API?
Python database API for interacting with databases
45
What is JDBC?
A Java API for connecting and interacting with APIs
46
Embedded SQL is commonly used in which language?
C
47
What is INTO in SQL?
Used to add new records into a table or to copy elements to a new table. Used with INSERT and SELECT respectively
48
____ languages do not explicitly specify how results are processed
Declarative
49
The ODBC API for the Java language consists of Java classes T/F
True
50
Procedural SQL is specified in the SQL standard T/F
True
51
A driver manager communicates with all drivers using the same commands T/F
True
52
What has become less popular with the rise of OOP?
Embedded SQL
53
To list all the contents from the PRODUCT table, you would use ____
SELECT * FROM PRODUCT
54
XML Schema improves and expands the DTD specification... T/F
True
55
A connection consists of a database address only T/F
False
56
Adding a FK constraint to a table only affects inserting new rows into the table
False
57
What are considered objects in a JSON file?
All things enclosed in curly braces {}
58
How do you add a UNIQUE constraint called UniqueNameMgr that ensures the name and ManagerID combination are unique?
CONSTRAINT UniqueNameMgr UNIQUE(Name, ManagerID)
59
How do you rename a column in a table?
CHANGE oldName newName
60
What kind of type is the following value (XML)?
Document
61
___ is the ISO standard that extends procedural SQL for use in stored procedures
SQL/PSM
62
MONEY is an example of a ____ type
Semantic
63
Which of the following DB programming techniques is an extension of the SQL language that is typically used for DB applications?
Procedural SQL
64
API defines ___ for applications written in a procedural programming language and ___ for applications in OOP
procedure calls, classes
65
A standardized spatial reference system is identified with a ___
SRID
66
What does SQL stand for?
Structured Query Language
67
Which type is complex?
JSON
68
In two dimensions, a minimum bounding rectangle is the ____
The smallest rectangle aligned with the X and Y axes that contains a spatial value
69
70
An Inventory view table is defined with a WHERE clause that specifies ShelfNumber = 25. An INSERT adds a new item to ShelfNumber 20. What happens when the WITH CHECK OPTION is not specified in the CREATE VIEW statement?
The item appears in the base table but not in the view table.
71
Elements of the ____ type can be repeated and are not ordered
MULTISET
72
When using the fetch in a SELECT statement, each call to fetch) returns the next row from the result table. If it reaches the last row, the next returned value is __.
False
73
The PosgreSQL ARRAY type is an example of a ____ type
Collection
74
In ___ data, each element is named and element types are not explicitly declared
Semistructured
75
In the relational algebra, compatible tables have the sane ____
number of columns, columnNames, and datatypes
76
In MySQL, a column has a SET type with 16 possible elements. How many bytes does each column value require?
2