C170 Alternate Test

Descrição

Alternate practice test for C170 WGU
Craig Willey
Quiz por Craig Willey, atualizado more than 1 year ago
Craig Willey
Criado por Craig Willey mais de 5 anos atrás
88
1

Resumo de Recurso

Questão 1

Questão
A customer can purchase many products and a product can be purchased by many customers. Which kind of binary relationship does this scenario describe?
Responda
  • Many-to-many
  • One-to-many
  • One-to-one binary
  • One-to-one

Questão 2

Questão
Which kind of relationship is displayed in this entity-relationship diagram?
Responda
  • Binary one-to-one
  • Unary many-to-many
  • Ternary one-to-one
  • Binary many-to-many
  • Unary one-to-one
  • Ternary many-to-many

Questão 3

Questão
Which kind of relationship is displayed in this entity-relationship diagram?
Responda
  • One-to-one binary
  • One-to-one unary
  • Many-to-many binary
  • Many-to-many unary

Questão 4

Questão
How is this portion of the entity-relationship diagram read, from left to right?
Responda
  • 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.

Questão 5

Questão
Which two examples are attributes?
Responda
  • A patient ID
  • An appointment number
  • A patient being seen at an appointment
  • An appointment

Questão 6

Questão
Which delete rule sets column values in a child table to NULL when the matching data is deleted from the parent table?
Responda
  • Restrict
  • Set-to-Null
  • Cascade
  • Matching

Questão 7

Questão
A patient is related to two exam records. The table follows the restrict delete rule. What happens if someone tried to delete the patient?
Responda
  • 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.

Questão 8

Questão
Which two columns are created as something other than variable-length strings in the statement above? Choose 2 answers
Responda
  • activity_id
  • activity_name
  • activity_date
  • time
  • location
  • coordinator_id

Questão 9

Questão
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?
Responda
  • 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.

Questão 10

Questão
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:
Responda
  • First Normal Form
  • Second Normal Form
  • Third Normal Form
  • Unnormalized

Questão 11

Questão
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?
Responda
  • Foreign
  • Composite
  • Primary
  • Compound

Questão 12

Questão
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?
Responda
  • It is undefined.
  • It is linked through the instructor_id
  • It is indicated by the tables’ adjacency.
  • It is linked through the campus_id.

Questão 13

Questão
In which two ways can data redundancy affect managing disk storage space and calculation speed? Choose 2 answers:
Responda
  • 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

Questão 14

Questão
With which command can a database administrator allow a user named Mary to query the Patient table by executing SELECT commands on it?
Responda
  • 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’;

Questão 15

Questão
Why does MySQL’s architecture use concurrency control?
Responda
  • 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.

Questão 16

Questão
Which command creates a database only if it does not already exist?
Responda
  • 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;

Questão 17

Questão
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?
Responda
  • AND item_price = 20;
  • AND item_price >= 20;
  • WHERE item_price = 20;
  • WHERE item_price >= 20;

Questão 18

Questão
What does WHERE identify in a basic SQL SELECT statement?
Responda
  • The associative entity
  • A table’s intersection data
  • The rows to be included in the result set
  • A range of included columns

Questão 19

Questão
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?
Responda
  • WHERE patient_id >=1000;
  • WHERE patient_id => 1000;
  • WHERE patient_id = 1000+;
  • WHERE patient_id > 1000;

Questão 20

Questão
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?
Responda
  • SUM item_id;
  • GROUP BY item_id;
  • COUNT item_id;
  • ORDER BY item_id;

Questão 21

Questão
Which data definition language statement affects databases or objects in them?
Responda
  • NULL
  • INSERT
  • SELECT
  • ALTER

Questão 22

Questão
What does the DELETE statement do?
Responda
  • It removes rows from a table.
  • It removes columns not named in the column list.
  • It removes views.
  • It removes columns from a table.

Questão 23

Questão
Which condition must be in effect to use the INSERT INTO … VALUES syntax for an INSERT statement?
Responda
  • 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.

Questão 24

Questão
Which kind of data type is FLOAT in the statement?
Responda
  • Decimal
  • Integer
  • Data
  • String

Questão 25

Questão
Which two MySQL data types can represent images or sounds? Choose two
Responda
  • TINYBLOB
  • FLOAT
  • BINARY
  • TERNARY
  • INT
  • SOUNDBLOB

Questão 26

Questão
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?
Responda
  • customer_id INT NOT NULL,
  • PRIMARY KEY (invoice_id),
  • CREATE TABLE Invoice (
  • FOREIGN KEY (customer_id) REFERENCES Customer (customer_id)

Questão 27

Questão
Which method creates an empty copy of a table and then populates it from the original table?
Responda
  • 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;

Questão 28

Questão
Refer to the given MySQL syntax. ALTER TABLE tbl_name action [, action ] … ; What does this syntax allow? Choose two answers:
Responda
  • Changing storage space
  • Changing column data types
  • Dropping indexes
  • Adding rows

Questão 29

Questão
Which command eliminates a table?
Responda
  • TRUNCATE TABLE
  • DELETE TABLE
  • REMOVE TABLE
  • DROP TABLE

Questão 30

Questão
Why is a view used to give controlled access to data?
Responda
  • 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

Questão 31

Questão
Which data definition language statement affects databases or objects in them?
Responda
  • SELECT
  • INSERT
  • ALTER
  • NULL

Questão 32

Questão
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?
Responda
  • ALTER custview AS
  • WHERE VIEW custview IS
  • CREATE VIEW custview AS
  • VIEW custview

Questão 33

Questão
What is the proper command to change a view?
Responda
  • ALTER VIEW
  • CHANGE VIEW
  • MODIFY VIEW
  • UPDATE VIEW

Questão 34

Questão
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?
Responda
  • Unauthorized access to the view is restricted
  • The view is discarded
  • The data is discarded
  • The patient table data is discarded

Questão 35

Questão
Which optional clause added to a GRANT statement enables the account to give its own privileges to other uses?
Responda
  • TO
  • WITH GRANT OPTION
  • REQUIRE
  • FOR

Questão 36

Questão
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?
Responda
  • Cascaded delete
  • Foreign key constraint
  • Referential delete
  • Dynamic update

Questão 37

Questão
Which clause should be added to the end to make the invoice_id attribute the primary key within a CREATE TABLE statement?
Responda
  • PRIMARY KEY (invoice_id));
  • PRIMARY KEY = (invoice_id));
  • (PRIMARY KEY): invoice_id;
  • (PRIMARY KEY) = (invoice_id));

Questão 38

Questão
Which statement should be used to establish a foreign key on customer_id?
Responda
  • 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)

Questão 39

Questão
Which ALTER TABLE statement adds a foreign key constraint to a child table?
Responda
  • 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;

Questão 40

Questão
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?
Responda
  • 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);

Questão 41

Questão
Which clause when added to the end of the statement creates and index on the customer_id field?
Responda
  • INDEX custid_index (customer_id));
  • INDEX = (customer_id);
  • INDEX = (customer_id));
  • SET INDEX custid_index (customer_id));

Questão 42

Questão
Which syntax is the correct way to use the DROP INDEX command to drop a primary key from a table?
Responda
  • 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;

Questão 43

Questão
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?
Responda
  • The set-to-null delete rule
  • The restrict rule
  • The default delete rule
  • The cascade delete rule

Questão 44

Questão
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.
Responda
  • The row values for two individual columns
  • The attributes that are changeable
  • The column values for two individual rows
  • The data to be duplicated.

Questão 45

Questão
Which statement deletes all rows from the invoice table?
Responda
  • DELETE FROM Invoice WHERE invoice_id = *;
  • DELETE FROM Invoice;
  • DELETE FROM Invoice WHERE invoice_id == *;
  • DELETE ALL FROM Invoice;

Questão 46

Questão
Refer to the given SQL statement. SELECT table1.*, table2.* FROM table1 LEFT JOIN table2 ON table1.column_name = table2.column_name;
Responda
  • 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.

Questão 47

Questão
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?
Responda
  • (SUBQUERY = customer_id
  • (FIND customer_id
  • (SELECT customer_id
  • (SUBQUERY customer_id

Semelhante

Atualidades- Notícias
Nathália Marins
Grandes Filósofos
Luiz Fernando
Conjunções
GoConqr suporte .
Principais Fórmulas de Física
Luiz Fernando
LEI 8080
Camila Costa
EA-HSG-2010 Questões achadas no app QUIZADA na playstore
carloshenriquetorrez .
ADJECTIVE + PREPOSITION
liviamialaret
SmartStudy Flash Cards - Estrutura do Sistema Financeiro Nacional
Jáder da Mota Mendonça
Sistema Único de Saúde
Vanessa Campos
Conectando tópicos diferentes
GoConqr suporte .