Ch 4 Flashcards

1
Q

Which of the following is used to restrict rows is SQL?

A

Where

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

Which of the following are non-commercial open-source database management systems? I. MS SQL Server II. MongoDB III. Oracle

A

II only

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

Suppose there are two tables: A and B. What would the following code output? SELECT * from A RIGHT JOIN B on A.orderid = B.orderid

A

the complete set of records from table B, along with the matching records (depending on the availability) from table A where tables A and B have the same orderid

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

Suppose there are two tables: A and B. What would the following code output? SELECT * from A LEFT JOIN B on A.orderid = B.orderid;

A

the complete set of records from table A, along with the matching records (depending on the availability) from table B where tables A and B have the same orderid

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

Suppose there are two tables: A and B. What would the following code output? SELECT * from A INNER JOIN B on A.orderid = B.orderid;

A

only the records from both tables A and B where tables A and B have the same orderid

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

What is the function COUNT() used for?

A

to return the number of rows that match a specified criteria

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

Which of the following is not a type of join?

A

FULLER INNER JOIN

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

Which of the following does a relational database not contain?

A

ID Graphs

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

Which of the following includes matched records from the right table and all records from the left table?

A

LEFT JOIN

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

Which join uses records that have matching values in both tables?

A

INNER JOIN

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