20%-Implements Databases and Database Management Systems Flashcards

1
Q

Portland, OR 97212

How many attributes are present in the address fragment?

a. 1
b 2
c. 3
d. 4

A

c. 3

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

Which data type represents numbers with fractional values:

e. Varchar
f. Integer
g. Binary
h. Decimal

A

h. Decimal

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

What does a DDL command(Data Definition Language) command do?

A

CREATES, ALTERS AND DROPS Tables.

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

What does a DML(Data Manipulation Language) command do?

A

INSERTS, UPDATES and DELETES data in a Table.

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

What does a DQL(Data Query Language) command do?

A

SELECTS (Retrieves) data from a database.

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

Which of the following are true about materialized view (Choose 2)?

e. It is a base table.
f. It is stored.
g. It must be refreshed whenever the base table changes.
h. The results are stored as a temporary table.

A

f. It is stored.
g. It must be refreshed whenever the base table changes.

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

Seattle, WA 98111
USA
How many attributes are present in the address fragment?
a. 1
b. 2
c. 3
d. 4

A

D.4

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

Which of the following are DDL commands?

a. INSERT
b. SELECT
c. CREATE INDEX
d. UPDATE

A

c. CREATE INDEX

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

Which of the following is a DML command?
a. CREATE VIEW
b. CREATE TABLE
c. INSERT
d. ALTER INDEX

A

c. INSERT

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

Which SQL command is an example of data definition language (DDL)?
A. UPDATE
B. ALTER.
C. SELECT
D. DELETE

A

B. ALTER

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

How would a database engine process an update that violates a RESTRICT referential integrity constraint?
A. The offending value would be set to the database default value
B. The update would be rejected by the database.
C. The offending value would be set to NULL
D. The updated value would flow to the primary key

A

B. The update would be rejected by the database.

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

Which restriction applies when using a materialized view?
A. The users of the view must provide search terms.
B. The underlying data must be periodically refreshed.
C. The tables referenced in the view must be indexed
D. The rows in the table must be compressed

A

B. The underlying data must be periodically refreshed.

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

All changes to a table structure are made using the _____ command, followed by a keyword
that produces the specific changes a user wants to make.
e. ALTER TABLE
f. UPDATE TABLE
g. COMMIT TABLE

A

ALTER TABLE

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

The SQL aggregate function that gives the number of rows containing non-null values for a
given column is _____.
a. COUNT
b. MIN
c. MAX
d. SUM

A

a. COUNT

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