Professional Documents
Culture Documents
Selected
Answer: In mapping an EER N:M relationship type to the relational model, we create a new relation R. Its primary key is
the combination of the foreign keys referring to the primary keys of the relations corresponding to the
participating entity types.
Correct
Answer: In mapping an EER N:M relationship type to the relational model, we create a new relation R. Its primary key is the
combination of the foreign keys referring to the primary keys of the relations corresponding to the participating entity
types.
A _____ is a primary key created by a database designer to simplify the identification of entity instances.
Selected Answer: d. surrogate key
https://blackboard.gwu.edu/webapps/assessment/review/review.jsp?attempt_id=_31147449_1&course_id=_394226_1&content_id=_13366136_… 1/11
9/16/23, 3:18 AM Review Test Submission: Quiz01 – 202303_Database ...
Ticket (customerID, venue, tour name)
'customerID' is a foreign key referring to 'ID' in 'Customer'. This value cannot be NULL.
'venue' is a foreign key referring to 'venue' in 'Show'. This value cannot be NULL.
'tour name' is a foreign key referring to 'name' in 'Tour'. This value cannot be NULL.
Correct Answer: A customer can only buy one ticket for a certain show.
Selected Answer: An RDBMS has full separation between the logical and internal data model.
Correct Answer: An RDBMS has full separation between the logical and internal data model.
E.
E.
Response E - A unique index is automatically created for a primary key column. Because the combination of the PO_NUM
Feedback: and PO_LINE_IDcolumns is a composite primary key for the PO_DETAIL table, a unique composite index will be
created on the two columns.
The PRODUCT_ID option is incorrect because unique indexes are not created automatically for foreign key
columns. Foreign key columns are not required to be unique. Unique indexes are only created automatically for
columns with PRIMARY KEY and UNIQUE constraints.
The UNIT_PRICE option is incorrect because the column is not part of the primary key nor is it unique.
The PO_NUM only and PO_LINE_ID only options are incorrect because both are included in the composite
PRIMARY KEY constraint. Neither will have a separate unique index, but rather both will be included in a
composite index. When a composite PRIMARY KEY constraint is specified, the constraint enforces the uniqueness
of the column combination, not each individual column.
B.
https://blackboard.gwu.edu/webapps/assessment/review/review.jsp?attempt_id=_31147449_1&course_id=_394226_1&content_id=_13366136_… 2/11
9/16/23, 3:18 AM Review Test Submission: Quiz01 – 202303_Database ...
B.
Response B - This CREATE INDEX statement will create a composite non-unique index on the TEACHER table. Because the
Feedback: index is created on both the FIRST_NAME and LAST_NAME columns, the index is considered to be a composite
index. A composite index is an index created on two or more columns in a table. Columns in a composite index can
appear in any order. The TEACHER_NAME_IDXindex will speed data retrieval if both the FIRST_NAME and
LAST_NAME columns are frequently used together in WHERE clauses.
The option stating that a composite unique index is created is incorrect because neither the FIRST_NAME nor
LAST_NAME columns are unique. Unique indexes are automatically created on columns with UNIQUE and
PRIMARY KEY constraints.
The option stating that you must have the CREATE ANY INDEX privilege for the statement to succeed is incorrect
because you own the table. You only need the CREATE TABLE privilege to create indexes on tables in your
schema. To create indexes in other schemas, you must have the CREATE ANY INDEX privilege.
The option stating the statement will fail is incorrect because the statement is syntactically correct.
For which two conditions would you use an equijoin query with the USING keyword? (Choose two.)
Selected The PRODUCT and VENDOR tables have columns with identical names.
Answers: A.
D.
You want to perform a natural join of the PRODUCT and VENDOR tables but limit the number of columns in
the join condition.
Correct The PRODUCT and VENDOR tables have columns with identical names.
Answers: A.
D.
You want to perform a natural join of the PRODUCT and VENDOR tables but limit the number of columns in
the join condition.
Response A, D - You would use an equijoin query with the USING keyword in the following conditions:
Feedback:
The PRODUCT and VENDOR tables have columns with identical names.
You want to perform a natural join of the PRODUCT and VENDOR tables but limit the number of columns in
the join condition.
An equijoin joins columns of two tables, which have equal values. While joining two tables with an equijoin can be
accomplished several ways, you should only include a USING clause if both tables contain one or more columns
with identical names or if you want to perform a natural join but limit the columns used in the join condition.
A USING clause cannot be used to join two tables that do not have columns with identical names. To do so, you
would need to use an ON clause to specify a predicate similar to that found in a traditional WHERE clause.
Self-joins are used to join a table to itself, such as when the PRODUCT table contains a column that references
another column in the PRODUCT table.
Neither of the options stating that null values need to be displayed is correct. To return null values from either side
of a query, an outer join must be used.
Seniority is based on the number of years a student has been enrolled at the university. You must create a report that displays each
student's name, id number, and the number of years enrolled. The years enrolled must be rounded to a whole number, based on
the number of months from the date enrolled until today. Which statement produces the required results?
D.
https://blackboard.gwu.edu/webapps/assessment/review/review.jsp?attempt_id=_31147449_1&course_id=_394226_1&content_id=_13366136_… 3/11
9/16/23, 3:18 AM Review Test Submission: Quiz01 – 202303_Database ...
B.
The MONTHS_BETWEEN function determines the number of months between two dates. In this scenario, the
number of months between today, SYSDATE, and the date a student is enrolled, ENROLL_DATE, will be
determined. The resulting value is then divided by 12 to return a year value. The ROUND function rounds the year
value to the nearest integer. When using the MONTHS_BETWEEN date function, the value returned is positive
when date1 is later than date2. The value returned is negative when date1 is earlier than date2. The syntax of the
MONTHS_BETWEEN function is:
MONTHS_BETWEEN(date1, date2)
The SYSDATE function returns the current date and time as a DATE data type. This function requires no arguments
and returns the date and time of the database server.
The ROUND number function is used to round values to a specified decimal value. When an integer representing
the number of decimal places to be used (n) is not provided, the number is rounded to 0 places. ROUND may be
used as either a number or a date function. The syntax of the ROUND number function is:
ROUND(column|expression, n)
The TRUNC date function returns date with the time portion of the day truncated to the specified format ('fmt'). If
no format is provided, the date is truncated to the nearest day. TRUNC may be used as either a date or a number
function. The syntax of the TRUNC date function is:
TRUNC(date, [, 'fmt'])
The statement that uses ROUND(SYSDATE) - ROUND(enroll_date) will round the date values to the nearest day and
then subtract today's date from the date enrolled.
The statement that uses (ROUND(SYSDATE) - ROUND(enroll_date)) / 12 will round the date values to the nearest
day and then subtract today's date from the date enrolled. This value will be divided by 12.
The statement that uses TRUNC(SYSDATE, 'YY') - TRUNC(enroll_date, 'YY') will truncate each value to a two-digit
year and subtract the date enrolled from today's date. This will not retrieve accurate results because only a two-
digit year is used.
Which SELECT statement will display the next value of the PARTS_ID_SEQ sequence by actually retrieving the value from the
sequence?
C.
Response C - The following statement will display the next value of the PARTS_ID_SEQ sequence:
Feedback:
SELECT parts_id_seq.NEXTVAL
FROM SYS.DUAL;
Because a sequence is not tied directly to a table, sequence numbers are stored and generated independently of
tables. To view the next value of the PARTS_ID_SEQ sequence, you can query the NEXTVAL pseudo column using
the DUAL dummy table in the SYS schema. You must reference the PARTS_ID_SEQ sequence and the NEXTVAL
pseudo column as parts_id_seq.NEXTVAL in the select list.
NEXTVAL is a pseudo column and not a function. Therefore, both SELECT statements that include the SELECT
NEXTVAL(parts_id_seq) clause will return a syntax error.
While the SELECT statement that includes SELECT parts_id_seq.NEXTVAL and queries the INVENTORY table will
successfully access the sequence, it will return a sequence number for each row in the INVENTORY table. In this
scenario, you only wanted to return the next value of the sequence so this option is incorrect.
The SELECT statement that includes the SELECT parts_id_seq NEXTVAL clause is also incorrect because it contains
invalid syntax for referencing the NEXTVAL pseudo column.
https://blackboard.gwu.edu/webapps/assessment/review/review.jsp?attempt_id=_31147449_1&course_id=_394226_1&content_id=_13366136_… 4/11
9/16/23, 3:18 AM Review Test Submission: Quiz01 – 202303_Database ...
Which of the following SQL predicates is used to find rows of the Employee table that have no value for rating?
Response Feedback: Ahead: Manipulating the Database: SQL Data Manipulation Language (DML)
Complexity: Moderate
Subject: Chapter 5
Title: Relational Database Management Systems and SQL
In the entity relationship diagram (ERD), cardinality is indicated using the _____ notation, where max is the maximum number of
associated entities and min represents the minimum number of associated entities.
Selected Answer: d. (min, max)
Selected Answer: When implementing procedural DML, the system usually does not have a query processor.
Correct Answer: The buffer manager often uses the 80/20 rule that states that 20% of the time, 80% of the data is used.
Which statement should you use to eliminate the need for all users to qualify Marilyn's INVENTORY table with her schema when querying the table?
Response
You should use the following query:
Feedback:
CREATE PUBLIC SYNONYM inventory FOR marilyn.inventory;
This will create a public synonym for the INVENTORY table owned by user Marilyn. This eliminates the need for other users to qualify
the table name when querying the table. Users can reference the INVENTORY table in user Marilyn's schema as INVENTORY, rather
than as MARILYN.INVENTORY.
You should not use the statement that does not include the PUBLIC keyword. This statement will create a private synonym for you, but not
for all users.
You should not use the statement that includes FOR marilyn. In this scenario, the table name is INVENTORY.
You should not use the statement that uses CREATE PUBLIC inventory SYNONYM. This statement will return a syntax error because the
keywords are not in the correct order.
Which three functions can be used to manipulate character column values? (Choose three.)
INSTR
CONCAT
INSTR
https://blackboard.gwu.edu/webapps/assessment/review/review.jsp?attempt_id=_31147449_1&course_id=_394226_1&content_id=_13366136_… 5/11
9/16/23, 3:18 AM Review Test Submission: Quiz01 – 202303_Database ...
CONCAT
You need to add a FOREIGN KEY constraint to the LINE_ITEM_ID column in the CURR_ORDER table to refer to the ID column in
the LINE_ITEM table. Which statement should you use to achieve this result?
To add a FOREIGN KEY constraint to an existing column in a table, use the ALTER TABLE statement with the ADD
clause. In this scenario, the ALTER TABLE command adds a FOREIGN KEY constraint to the LINE_ITEM_ID column
in the CURR_ORDER table. This FOREIGN KEY constraint references the ID column in the LINE_ITEM table.
The ALTER TABLE line_item statement is incorrect because it will add a FOREIGN KEY on the ID column in the
LINE_ITEM table. The desired result is to add the constraint to the CURR_ORDER table.
The ALTER TABLE statements using the MODIFY clause are incorrect because you cannot add a FOREIGN KEY
constraint using this clause. These statements will return a syntax error.
You need to query the ACCT_HIST_V view. You want to display the account number and the average monthly finance charge for accounts 6900
through 7200 from the beginning of the year 2000 through today's date. BILLING_DATE contains the last day of a month. Records are uniquely
identified by ACCOUNT_ID and BILLING_DATE.
Selected Answer: SELECT account_id, AVG(finance_charge)
FROM acct_hist_v
WHERE account_id BETWEEN 6900 AND 7200
AND billing_date > '31-DEC-1999'
GROUP BY account_id;
C.
All of the desired results are achieved with this query. The average finance charge for each account number is calculated by
using the AVG function AVG(finance_charge). The account number display is restricted by using the WHERE clause condition
BETWEEN 6900 AND 7200. The rows returned are further restricted by the billing date by using AND billing_date > '31-DEC-
1999' in the WHERE clause condition.
The statement that does not contain a GROUP BY clause will fail. When a group function is used in the SELECT list, the
GROUP BY clause must contain the columns listed in the SELECT list that do not use a group function. In this scenario, the
ACCOUNT_ID column must be included in the GROUP BY clause. A GROUP BY clause divides query result rows into smaller
groups.
The statement that contains FROM VIEW will fail. When querying data from a view, the syntax FROM VIEW is incorrect and will
cause the statement to fail. The syntax used when querying from a view is the same as when querying from a table.
https://blackboard.gwu.edu/webapps/assessment/review/review.jsp?attempt_id=_31147449_1&course_id=_394226_1&content_id=_13366136_… 6/11
9/16/23, 3:18 AM Review Test Submission: Quiz01 – 202303_Database ...
The option that states you cannot use a group function when selecting from a view is incorrect. Group functions may be used
when querying from a view.
A set of objects having the same structure and behavior is called a(n):
In the ER model, the set of values permitted for an attribute is called the:
If you want to use a DBMS architecture that can access multiple data sources itself and provides a uniform interface hiding
the low-level details, the most appropriate DBMS would be a...
Selected
Answer: The four categories in which DQ dimensions can be grouped according to Wang et al. (1996) are: intrinsic,
contextual, representation and access.
Correct
Answer: The four categories in which DQ dimensions can be grouped according to Wang et al. (1996) are: intrinsic,
contextual, representation and access.
Which statement correctly identifies the differences between large objects (LOBS) and LONGand LONG RAW data types?
Selected The maximum size of a LOB is 8 GB and of a LONG data type is 2 GB.
Answer:
B.
https://blackboard.gwu.edu/webapps/assessment/review/review.jsp?attempt_id=_31147449_1&course_id=_394226_1&content_id=_13366136_… 7/11
9/16/23, 3:18 AM Review Test Submission: Quiz01 – 202303_Database ...
Correct Answer: D.
A table containing a LOB data type can be replicated, but a table containing a LONG data type cannot be
replicated.
Response D - The option stating that a table containing a LOB data type can be replicated, but a table containing a
Feedback: LONG datatype cannot be replicated, is correct. Replication is possible in tables that contain columns of the LOB
data type. Replication is not possible in tables that contain LONG data type columns. The different LOB data
types are BLOB, CLOB, NCLOB, and BFILE.
The option stating that LOBs can be stored only outside the database is incorrect. LOBs can be stored inside
and outside the database. There are different LOB data types that enable you to store data inside or outside the
database. The CLOB and BLOB data types are stored inside the database. The BFILE datatype enables you to
store data in an external file.
The option stating that the maximum size of a LOB is 8 GB and of a LONG data type is 2 GB is incorrect. The
maximum size of a LONG data type is 2 GB. The maximum size of a LOB is from 8 terabytes to 128TB, depending
on the block size of the database.
The option stating that a table can contain two LOB columns, but only one LONG column is incorrect. A table
can contain any number of LOB columns. A table can contain only one LONG data type column.
The option stating that a table containing a LONG data type can be partitioned but a table containing a
LOB datatype cannot be partitioned is incorrect because a table containing a LONG data type cannot be
partitioned.
CURR_ORDER
-------------------------
ORDER_ID NUMBER(9)
CUSTOMER_ID NUMBER(9)
ORDER_DATE DATE
SHIP_DATE DATE
LINE_ITEM
------------------
LINE_ITEM_ID NUMBER(9)
ORDER_ID NUMBER(9)
PRODUCT_ID NUMBER(9)
QUANTITY NUMBER(5)
The ORDER_ID column in the LINE_ITEM table has a FOREIGN KEY constraint to the CURR_ORDER table. Which statement
about these two tables is true?
Selected E.
Answer: To delete a record from the LINE_ITEM table, you must delete the associated record in the CURR_ORDER
table.
Correct Answer: B.
To delete a record from the CURR_ORDER table, you must delete any child records in the LINE_ITEM table.
Response B - Because the ORDER_ID column in the LINE_ITEM table has a FOREIGN KEY constraint to the ORDER_ID column
Feedback: in theCURR_ORDER table, you must delete any child records from the LINE_ITEM table before deleting a record
from the CURR_ORDERtable. In this relationship, defined by the FOREIGN KEY constraint, the CURR_ORDER table
is the parent table and the LINE_ITEMtable is the child table. The FOREIGN KEY constraint ensures that no child
(LINE_ITEM) can be created unless it has a parent(CURR_ORDER) and that no parent (CURR_ORDER) can be
deleted if it has one or more children (LINE_ITEM). With this defined relationship, you would also receive an
integrity constraint error if you attempted to insert a record into the LINE_ITEM table and a parent record did not
exist in the CURR_ORDER table.
You can insert a record into the CURR_ORDER table that has no associated LINE_ITEM records because the
CURR_ORDER table is the parent table.
The option stating that you can update a record in the CURR_ORDER table if the parent already exists in the
LINE_ITEM table is incorrect. In this scenario, the CURR_ORDER table is the parent table and the LINE_ITEM table is
the child table.
https://blackboard.gwu.edu/webapps/assessment/review/review.jsp?attempt_id=_31147449_1&course_id=_394226_1&content_id=_13366136_… 8/11
9/16/23, 3:18 AM Review Test Submission: Quiz01 – 202303_Database ...
To remove the constraint from the LINE_ITEM table, no conditions must be met. Therefore, the option that states
you must delete all records in the CURR_ORDER table is incorrect.
A parent is not required to have children records, so you can delete a record from the child table (LINE_ITEM)
without deleting any records from the parent table (CURR_ORDER). When a record is deleted from the LINE_ITEM
table, the associated parent record in the CURR_ORDER table is not deleted. The order might contain more than
one line item, and therefore the parent must be retained. You can, however, specify the WITH CASCADE option
when defining the FOREIGN KEY constraint to provide for automatically deleting children's records when the
parent is deleted.
Which operator is used to concatenate every row in the first table with every row in the second table?
Selected Answer: c. product
The relationship between different entities (in different tables) is handled by their common columns.
Selected Answer: False
Correct Answer: True
Click the Exhibit(s) button to view the structure of the EMPLOYEE table.
Which statement would you use to create an index for the EMP_LNAME column?
Response D - You would use the following statement to create an index for the EMP_LNAME column:
Feedback:
CREATE INDEX employee_emp_lname_idx
ON employee(emp_lname);
This is the correct syntax to create an index:CREATE INDEX <index_name> ON <table_name> (column[,
column]...);
All of the other options are incorrect and will return syntax errors. The CREATE INDEX employee(emp_lname)
option will not execute because an index name is not specified and the statement is missing the ON keyword. The
CREATE INDEXemployee_lname_idx ON employee option will not execute because the EMP_LNAME column is
not specified. The CREATE INDEX employee(emp_lname) employee_emp_lname_idx option will not execute
because the keywords are not ordered correctly and the ON keyword is missing.
Question 35
https://blackboard.gwu.edu/webapps/assessment/review/review.jsp?attempt_id=_31147449_1&course_id=_394226_1&content_id=_13366136_… 9/11
9/16/23, 3:18 AM Review Test Submission: Quiz01 – 202303_Database ...
0.5 out of 0.5 points
In the relational model, a view can be used:
Response Feedback: Ahead: Manipulating the Database: SQL Data Manipulation Language (DML)
Complexity: Easy
Subject: Chapter 5
Title: Relational Database Management Systems and SQL
Response
The WHERE clause will cause an error when this SELECT statement is executed. Groups can only be restricted with a HAVING clause.
Feedback:
Including a group (or aggregate) function in a WHERE clause is invalid.
All of the other clauses are correctly specified and do not generate errors.
SELECT description
FROM product
ORDER BY manufacturer_id, quantity ASC;
https://blackboard.gwu.edu/webapps/assessment/review/review.jsp?attempt_id=_31147449_1&course_id=_394226_1&content_id=_13366136… 10/11
9/16/23, 3:18 AM Review Test Submission: Quiz01 – 202303_Database ...
Given following question: "Retrieve the numbers of all suppliers who can supply product 0832 and 0494"
True or False? The Hadoop Distributed File System divides data into blocks, each of which is assigned to only one cluster.
Selected Answer: False
Correct Answer: False
Response Feedback: Ahead: Historical Developments in Information Systems
Complexity: Moderate
Subject: Chapter 1
Title: Introductory Database Concepts
← OK
https://blackboard.gwu.edu/webapps/assessment/review/review.jsp?attempt_id=_31147449_1&course_id=_394226_1&content_id=_13366136… 11/11