Pregunta 1
Pregunta
A customer can purchase many products and a product can be purchased by many customers.
Which kind of binary relationship does this scenario describe?
Respuesta
-
Many-to-many
-
One-to-many
-
One-to-one binary
-
One-to-one
Pregunta 2
Pregunta
Which kind of relationship is displayed in this entity-relationship diagram?
Respuesta
-
Binary one-to-one
-
Unary many-to-many
-
Ternary one-to-one
-
Binary many-to-many
-
Unary one-to-one
-
Ternary many-to-many
Pregunta 3
Pregunta
Which kind of relationship is displayed in this entity-relationship diagram?
Respuesta
-
One-to-one binary
-
One-to-one unary
-
Many-to-many binary
-
Many-to-many unary
Pregunta 4
Pregunta
How is this portion of the entity-relationship diagram read, from left to right?
Respuesta
-
Only one appointment was scheduled by one patient.
-
One appointment was scheduled by more than one patient.
-
No appointments were scheduled by a patient.
-
At least one appointment is scheduled by a patient.
Pregunta 5
Pregunta
Which two examples are attributes?
Pregunta 6
Pregunta
Which delete rule sets column values in a child table to NULL when the matching data is deleted from the parent table?
Respuesta
-
Restrict
-
Set-to-Null
-
Cascade
-
Matching
Pregunta 7
Pregunta
A patient is related to two exam records. The table follows the restrict delete rule. What happens if someone tried to delete the patient?
Respuesta
-
The lack of a patient connected to the exam records is flagged for later.
-
The delete occurs immediately.
-
The delete is not allowed.
-
Another patient is linked with the exam records.
Pregunta 8
Pregunta
Which two columns are created as something other than variable-length strings in the statement above?
Choose 2 answers
Respuesta
-
activity_id
-
activity_name
-
activity_date
-
time
-
location
-
coordinator_id
Pregunta 9
Pregunta
The database table above has 7 different physician IDs in the first column and physician_id is the primary key of the table. There are 7 different physician names in the second column. The third column indicates which site a physician is located at. There are 3 different sites. Two of the site names are repeated 3 times.
Which action should be used to translate this data into third normal form?
Respuesta
-
Move the data from the second column into the third column
-
Move the data from the third column into its own table.
-
Move the data from the third column into the first column.
-
Move the data from the first two columns into separate tables.
Pregunta 10
Pregunta
A database designer is working through the normalization process. A simple primary key has been established. All of the repeating groups and multi-valued fields have been removed
In which form is this table:
Respuesta
-
First Normal Form
-
Second Normal Form
-
Third Normal Form
-
Unnormalized
Pregunta 11
Pregunta
Two attributes in two related tables have the exact same domain of values. The attribute is a primary key (PK) in one table.
Which kind of key is the attribute in the other table?
Respuesta
-
Foreign
-
Composite
-
Primary
-
Compound
Pregunta 12
Pregunta
In this entity-relationship diagram, many instructors are shown as working at a minimum of one campus.
How is the relationship between instructors and campuses represented in the diagram?
Respuesta
-
It is undefined.
-
It is linked through the instructor_id
-
It is indicated by the tables’ adjacency.
-
It is linked through the campus_id.
Pregunta 13
Pregunta
In which two ways can data redundancy affect managing disk storage space and calculation speed?
Choose 2 answers:
Respuesta
-
Additional processing time is needed to update redundant data.
-
Additional processing time is needed to find intersection data for each redundant piece of data
-
Redundant data must be processed as unary, binary, and ternary information.
-
Redundant data takes up additional disk space.
-
Every copy of redundant data must be copied to a third record in the database
Pregunta 14
Pregunta
With which command can a database administrator allow a user named Mary to query the Patient table by executing SELECT commands on it?
Respuesta
-
GRANT Patient TO ‘mary’@ ‘localhost’;
-
GRANT SELECT ON PATIENT TO ‘mary’@ ‘localhost’;
-
GRANT SELECT PATIENT TO ‘mary’@ ‘localhost’;
-
GRANT PATIENT ON SELECT TO ‘mary’@ ‘localhost’;
Pregunta 15
Pregunta
Why does MySQL’s architecture use concurrency control?
Respuesta
-
To prevent two users from viewing the same record during potential updates.
-
To ensure that users are logged in on a local machine.
-
To let multiple clients easily find and negotiate with each other.
-
To prevent two users from modifying the same record at the same time.
Pregunta 16
Pregunta
Which command creates a database only if it does not already exist?
Respuesta
-
CREATE DATABASE IF NOT EXISTS db_name;
-
IF NOT EXISTS CREATE DATABASE db_name;
-
IF NOT EXISTS db_name;
-
CREATE DATABASE IF NEW db_name;
Pregunta 17
Pregunta
Refer to the given SQL statement:
SELECT item_number, item_name
FROM item
Which line should be added to the end of the statement to return the item numbers and item names for items that have an item_price of 10 dollars?
Respuesta
-
AND item_price = 20;
-
AND item_price >= 20;
-
WHERE item_price = 20;
-
WHERE item_price >= 20;
Pregunta 18
Pregunta
What does WHERE identify in a basic SQL SELECT statement?
Respuesta
-
The associative entity
-
A table’s intersection data
-
The rows to be included in the result set
-
A range of included columns
Pregunta 19
Pregunta
Refer to the given SQL statement.
SELECT patient_id
FROM patient
Which line added to the end of the statement returns patient ids of at least 1000?
Pregunta 20
Pregunta
Refer to the given SQL statement:
SELECT item_id, SUM(quantity)
FROM invoice
Which line, when added to the end of the statement, returns the total number of each kind of item by item_id?
Respuesta
-
SUM item_id;
-
GROUP BY item_id;
-
COUNT item_id;
-
ORDER BY item_id;
Pregunta 21
Pregunta
Which data definition language statement affects databases or objects in them?
Pregunta 22
Pregunta
What does the DELETE statement do?
Respuesta
-
It removes rows from a table.
-
It removes columns not named in the column list.
-
It removes views.
-
It removes columns from a table.
Pregunta 23
Pregunta
Which condition must be in effect to use the INSERT INTO … VALUES syntax for an INSERT statement?
Respuesta
-
The VALUES list must contain a value for each non-null valued column in the table.
-
The VALUES list must contain a value for each attribute/column in the table.
-
The INSERT INTO portion of the statement must generate a LOAD DATA statement.
-
THE INSERT INTO portion of the statement must refer to a sampdb database table.
Pregunta 24
Pregunta
Which kind of data type is FLOAT in the statement?
Respuesta
-
Decimal
-
Integer
-
Data
-
String
Pregunta 25
Pregunta
Which two MySQL data types can represent images or sounds?
Choose two
Respuesta
-
TINYBLOB
-
FLOAT
-
BINARY
-
TERNARY
-
INT
-
SOUNDBLOB
Pregunta 26
Pregunta
Refer to the given SQL statement.
CREATE TABLE Invoice (
invoice_id INT NOT NULL ,
date DATE NOT NULL,
customer_id INT NOT NULL,
PRIMARY KEY (invoice_id),
FOREIGN KEY (customer_id) REFERENCES Customer (customer_id)
);
In which line of the statement is the table given its name?
Respuesta
-
customer_id INT NOT NULL,
-
PRIMARY KEY (invoice_id),
-
CREATE TABLE Invoice (
-
FOREIGN KEY (customer_id) REFERENCES Customer (customer_id)
Pregunta 27
Pregunta
Which method creates an empty copy of a table and then populates it from the original table?
Respuesta
-
CREATE TABLE new_tbl_name INTO tbl_name;
INSERT INTO new_tbl_name;
-
INSERT TABLE new_tbl_name SELECT tbl_name;
INSERT INTO new_tbl_name LIKE tbl_name;
-
CREATE TABLE new_tbl_name LIKE tbl_name;
INSERT INTO new_tbl_name SELECT * FROM tbl_name;
-
INSERT TABLE new_tbl_name LIKE tbl_name;
SELECT tbl_name;
Pregunta 28
Pregunta
Refer to the given MySQL syntax.
ALTER TABLE tbl_name action [, action ] … ;
What does this syntax allow?
Choose two answers:
Pregunta 29
Pregunta
Which command eliminates a table?
Respuesta
-
TRUNCATE TABLE
-
DELETE TABLE
-
REMOVE TABLE
-
DROP TABLE
Pregunta 30
Pregunta
Why is a view used to give controlled access to data?
Respuesta
-
To limit many-to-many relationship between various entities and attributes
-
To restrict access to persons retrieving and modifying sensitive information
-
To move complicated security routines to subqueries
-
To add complexity to encryption techniques
Pregunta 31
Pregunta
Which data definition language statement affects databases or objects in them?
Pregunta 32
Pregunta
Refer to the given SQL statement.
SELECT customer_id, customer_last_name, customer_first_name
FROM customer;
Which statement, when added before this statement, generates a view?
Respuesta
-
ALTER custview AS
-
WHERE VIEW custview IS
-
CREATE VIEW custview AS
-
VIEW custview
Pregunta 33
Pregunta
What is the proper command to change a view?
Respuesta
-
ALTER VIEW
-
CHANGE VIEW
-
MODIFY VIEW
-
UPDATE VIEW
Pregunta 34
Pregunta
DROP VIEW patient_view;
What happens as a result of the execution of this statement to the patient table on which patient_view is based?
Pregunta 35
Pregunta
Which optional clause added to a GRANT statement enables the account to give its own privileges to other uses?
Respuesta
-
TO
-
WITH GRANT OPTION
-
REQUIRE
-
FOR
Pregunta 36
Pregunta
When a patient is deleted from the patient table, all corresponding rows from the patient in the exam table are automatically deleted as well.
What is this referential integrity technique called?
Respuesta
-
Cascaded delete
-
Foreign key constraint
-
Referential delete
-
Dynamic update
Pregunta 37
Pregunta
Which clause should be added to the end to make the invoice_id attribute the primary key within a CREATE TABLE statement?
Respuesta
-
PRIMARY KEY (invoice_id));
-
PRIMARY KEY = (invoice_id));
-
(PRIMARY KEY): invoice_id;
-
(PRIMARY KEY) = (invoice_id));
Pregunta 38
Pregunta
Which statement should be used to establish a foreign key on customer_id?
Respuesta
-
FOREIGN KEY (customer_id) (index_columns)
-
FOREIGN KEY (customer_id) REFERENCES customer (customer_id)
-
FOREIGN KEY [table_name](customer_id)
-
FOREIGN KEY = (customer_id) REFERENCES customer (customer_id)
Pregunta 39
Pregunta
Which ALTER TABLE statement adds a foreign key constraint to a child table?
Respuesta
-
ALTER TABLE child
ADD FOREIGN KEY (parent_id) ON DELETE CASCADE;
-
ALTER TABLE child
ADD FOREIGN KEY WHERE parent (parent_id) ON DELETE CASCADE;
-
ALTER TABLE child
ADD FOREIGN KEY (parent_id) REFERENCES parent (parent_id) ON DELETE CASCADE;
-
ALTER TABLE child
ADD FOREIGN KEY (parent_id) WHERE parent (parent_id) ON DELETE CASCADE;
Pregunta 40
Pregunta
The database administrator has been tasked with implementing an index to speed up the retrieval of data based on the V_STATE values. The database is using the InnoDB engine.
What is the correct syntax to create an index to be built on the V_STATE field based on the database information?
Respuesta
-
ALTER TABLE ‘Vendor’ ADD UNIQUE INDEX ‘state_index (‘V_STATE’);
-
ALTER TABLE Vendor ADD INDEX ‘state_index’ (‘V_STATE’);
-
CREATE UNIQUE INDEX state_index ON Vendo (V_STATE) USING HASH;
-
CREATE INDEX state_index USING HASH ON Vendor (V_STATE);
Pregunta 41
Pregunta
Which clause when added to the end of the statement creates and index on the customer_id field?
Pregunta 42
Pregunta
Which syntax is the correct way to use the DROP INDEX command to drop a primary key from a table?
Respuesta
-
DROP INDEX ‘PRIMARY’ ON tbl_name;
-
DROP INDEX WHERE PRIMARY KEY = ON tbl_name;
-
DROP INDEX ‘PRIMARY KEY’ ON tbl_name;
-
DROP INDEX PRIMARY KEY tbl_name;
Pregunta 43
Pregunta
A database administrator tried to delete a row in a parent table, but the delete fails because a row in another table depends on that row.
Which referential-integrity rule is in effect?
Pregunta 44
Pregunta
Refer to the given MySQL statement.
INSERT INTO Invoice VALUES (10217, ‘2018-08-01’, 55527), (10218, ‘2018-08-01’, 44436);
Describe what the parentheses denote.
Respuesta
-
The row values for two individual columns
-
The attributes that are changeable
-
The column values for two individual rows
-
The data to be duplicated.
Pregunta 45
Pregunta
Which statement deletes all rows from the invoice table?
Pregunta 46
Pregunta
Refer to the given SQL statement.
SELECT table1.*, table2.* FROM table1 LEFT JOIN table2 ON table1.column_name = table2.column_name;
Respuesta
-
It selects only the rows in Table 1 that are the same as Table 2
-
It selects the rows in both Tables that have numerical data that is left-aligned.
-
It selects the rows in Table 1 numbered the same as Table 2.
-
It selects all of the rows in Table 1 (regardless of if there is a match in Table 2) and the matching rows in Table 2.
Pregunta 47
Pregunta
Refer to the given SQL Statement.
1. SELECT invoice_id
2. FROM Invoice
3. WHERE customer_id =
4. FROM customer
5. WHERE customer_id = 55547);
What is missing from the subquery at the beginning of Line 4?
Respuesta
-
(SUBQUERY = customer_id
-
(FIND customer_id
-
(SELECT customer_id
-
(SUBQUERY customer_id