Which clause is optional in the basic SELECT-FROM-WHERE query structure?
Anonymous Quiz
40%
WHERE
10%
FROM
10%
SELECT
40%
All are mandatory
Which constraint is used to ensure that an attribute value is greater than zero?
Anonymous Quiz
18%
CHECK
27%
PRIMARY KEY
36%
NOT NULL
18%
UNIQUE
The ON DELETE SET NULL action is specified for a:
Anonymous Quiz
50%
Candidate Key
10%
Non-key attribute
40%
Foreign Key
0%
Primary Key
The operator NOT IN is used for which type of SQL query?
Anonymous Quiz
0%
Set operation
60%
Aggregate function
20%
Nested query
20%
Join operation
What does the TRUNCATE TABLE command do?
Anonymous Quiz
11%
Removes the table structure and data
22%
Removes only specified rows
11%
Changes the table structure
56%
Removes all rows from a table quickly (DDL)
Which command is used to take away privileges from a user?
Anonymous Quiz
18%
GRANT
36%
DROP
45%
REVOKE
0%
DELETE
Which SQL keyword specifies that the sorting order should be descending?
Anonymous Quiz
50%
ORDER DESC
25%
DESC
25%
ASCENDING
0%
UP
Which aggregate function calculates the average value of a numeric column?
Anonymous Quiz
11%
SUM
67%
AVG
11%
MIN
11%
COUNT
Which of the following commands is considered DML (Data Manipulation Language)?
Anonymous Quiz
0%
ALTER TABLE
57%
DROP TABLE
14%
CREATE TABLE
29%
INSERT INTO
What is used to assign a temporary name to a table in a query (e.g., in self-joins)?
Anonymous Quiz
22%
Schema
22%
Subquery
0%
View
56%
Alias
A statement that is used to define the structure of a relation is called a:
Anonymous Quiz
33%
DML command
44%
DDL command
22%
Procedural command
0%
DCL command
When mapping a Strong Entity Type, the resulting relations Primary Key is:
Anonymous Quiz
40%
The Partial Key of the entity
30%
The Foreign Key to its owner
30%
The Primary Key of the entity type
0%
A new surrogate key
When mapping a Weak Entity Type, its resulting relations Primary Key is formed by combining its Partial Key with:
Anonymous Quiz
30%
A new surrogate key
0%
The Partial Key alone
20%
The Foreign Key of a Superclass
50%
The Primary Key of the Owner Entity
For a 1:N Relationship (R from E1 to E2), the Foreign Key is placed in the relation corresponding to:
Anonymous Quiz
22%
The N-side entity (E2)
44%
A separate relation (R)
33%
Both E1 and E2
0%
The 1-side entity (E1)
For an M:N Relationship, the required mapping step is to:
Anonymous Quiz
11%
Place the FK in the N-side relation
67%
Create a new relation for the relationship type
11%
Place the FK in the M-side relation
11%
Combine the attributes into a single relation
When mapping a Composite Attribute, the common approach is to:
Anonymous Quiz
10%
Treat it as a Multivalued attribute
60%
Include only its simple component attributes in the relation
10%
Discard the attribute
20%
Create a separate relation for the attribute
A Multivalued Attribute is mapped by:
Anonymous Quiz
0%
Discarding it
75%
Creating a new relation with the entitys PK and the attribute
0%
Treating it as a Composite Attribute
25%
Including its values in the main entity relation
In a 1:1 Relationship, the Foreign Key should ideally be placed in the relation corresponding to the entity with the:
Anonymous Quiz
20%
Maximum number of attributes
30%
Total participation constraint
20%
Partial participation constraint
30%
Minimum number of attributes
The general rule for mapping an N-ary Relationship (N > 2) is to:
Anonymous Quiz
11%
Map it into two 1:N relations
22%
Map it into N binary relations
67%
Create a new relation for the relationship type
0%
Combine the relationship attributes into one entity relation
❤1
One option for mapping a Total, Disjoint Specialization is to create a single relation for the Superclass and Subclasses, adding a Type Attribute and:
Anonymous Quiz
33%
Foreign Keys to all Subclasses
67%
NULL values for the specific attributes of other subclasses
0%
Only the key attribute
0%
Multiple Foreign Keys to itself