Missed Review Questions Flashcards

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
Q

A develop wants to create an application using PHP. Which of the following APIs can the developer use to interact with DB?

A

PDO

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

Which statement should replace XXX? There is a CREATE FUNCTION code with the line right above BEGIN missing

A

READS SQL DATA

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

DB queries are commonly implemented using a declarative programming language because of which two main reasons?

A

Easier programming and faster execution

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

The ____ method of the ____ class creates a connection object in connector

A

getConnection(), DriverManager

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

Assume that a DB connection is valid connection. What is the output of the code below?

A

No change on the teacher table because the dbQuery has not been executed with EXEC

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

Which statement is not an advantage of using a view table?

A

The creation of a new base table is always up to date

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

Refer to the stored procedure,what is the correct syntax to get the number of classes taught using a stored procedure call?

A

CALL TeacherClassLoad(45631, @numberOfClasses)

32
Q

In order to run a program with Embedded SQL, the compiler ____

A

translates the SQL code to the host language first, and then to an executable program

33
Q

The ___ keyword helps the compiler identify embedded SQL statements in a program

34
Q

Which DB programming technique best matches - compiles and stores complex data processing tasks on the DB server

A

Procedural SQL

35
Q

The ____ statement executes a query

36
Q

C contains control flow statements and SQL does not. This is an example of the ____ gap

37
Q

The EXEC sql keyword is used in procedural SQL T/F

38
Q

A stored procedure is compiled every time the procedure is called T/F

39
Q

A ___ determines how to process statements in a declarative language

40
Q

What API is often used with the C# language?

41
Q

How does UNION work?

A

Union joins everything while removing duplicates

42
Q

How does INTERSECT work?

A

Only returns rows that are in both lists

43
Q

How does UNION ALL work?

A

Union all puts both tables together without removing duplicates

44
Q

What is DB-API?

A

Python database API for interacting with databases

45
Q

What is JDBC?

A

A Java API for connecting and interacting with APIs

46
Q

Embedded SQL is commonly used in which language?

47
Q

What is INTO in SQL?

A

Used to add new records into a table or to copy elements to a new table. Used with INSERT and SELECT respectively

48
Q

____ languages do not explicitly specify how results are processed

A

Declarative

49
Q

The ODBC API for the Java language consists of Java classes T/F

50
Q

Procedural SQL is specified in the SQL standard T/F

51
Q

A driver manager communicates with all drivers using the same commands T/F

52
Q

What has become less popular with the rise of OOP?

A

Embedded SQL

53
Q

To list all the contents from the PRODUCT table, you would use ____

A

SELECT * FROM PRODUCT

54
Q

XML Schema improves and expands the DTD specification… T/F

55
Q

A connection consists of a database address only T/F

56
Q

Adding a FK constraint to a table only affects inserting new rows into the table

57
Q

What are considered objects in a JSON file?

A

All things enclosed in curly braces {}

58
Q

How do you add a UNIQUE constraint called UniqueNameMgr that ensures the name and ManagerID combination are unique?

A

CONSTRAINT UniqueNameMgr UNIQUE(Name, ManagerID)

59
Q

How do you rename a column in a table?

A

CHANGE oldName newName

60
Q

What kind of type is the following value (XML)?

61
Q

___ is the ISO standard that extends procedural SQL for use in stored procedures

62
Q

MONEY is an example of a ____ type

63
Q

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

A

Procedural SQL

64
Q

API defines ___ for applications written in a procedural programming language and ___ for applications in OOP

A

procedure calls, classes

65
Q

A standardized spatial reference system is identified with a ___

66
Q

What does SQL stand for?

A

Structured Query Language

67
Q

Which type is complex?

68
Q

In two dimensions, a minimum bounding rectangle is the ____

A

The smallest rectangle aligned with the X and Y axes that contains a spatial value

70
Q

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?

A

The item appears in the base table but not in the view table.

71
Q

Elements of the ____ type can be repeated and are not ordered

72
Q

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 __.

73
Q

The PosgreSQL ARRAY type is an example of a ____ type

A

Collection

74
Q

In ___ data, each element is named and element types are not explicitly declared

A

Semistructured

75
Q

In the relational algebra, compatible tables have the sane ____

A

number of columns, columnNames, and datatypes

76
Q

In MySQL, a column has a SET type with 16 possible elements. How many bytes does each column value require?