C170 Practice Test 1

pdf

School

University of Texas *

*We aren’t endorsed by this school

Course

6233

Subject

Computer Science

Date

Jan 9, 2024

Type

pdf

Pages

25

Uploaded by BarristerMaskHare36

Report
9/18/23, 10:05 PM C170 Practice Test 1 https://forms.office.com/pages/responsepage.aspx?id=z5Knz2h3QUOIV4F1TCr6H8BBxwvKb-tBt7Mm_DoHfjRUNzZRQUFVWDZENjJPMVQyTjVYN… 1/25 C170 Practice Test 1 This Practice Test can only be taken once. Ensure you are prepared to take it before beginning. Enter your first and last name * 1 Da'Juan Mosley Enter your Student ID * 2 1216793 Maria.Schenk@wgu.edu Michele.Mcfarlane@wgu.edu Mindy.Crowder@wgu.edu Robert.Kumar@wgu.edu Who is your Course Instructor for C170? * 3
9/18/23, 10:05 PM C170 Practice Test 1 https://forms.office.com/pages/responsepage.aspx?id=z5Knz2h3QUOIV4F1TCr6H8BBxwvKb-tBt7Mm_DoHfjRUNzZRQUFVWDZENjJPMVQyTjVYN… 2/25 Many-to-many One-to-many One-to-one binary One-to-one A customer can purchase many products and a product can be purchased by many customers. Which kind of binary relationship does this scenario describe? * (1 Point) 4 Binary one-to-one Unary many-to-many Ternary one-to-one Binary many-to-many Unary one-to-one Which kind of relationship is displayed in this entity-relationship diagram? * (1 Point) 5
9/18/23, 10:05 PM C170 Practice Test 1 https://forms.office.com/pages/responsepage.aspx?id=z5Knz2h3QUOIV4F1TCr6H8BBxwvKb-tBt7Mm_DoHfjRUNzZRQUFVWDZENjJPMVQyTjVYN… 3/25 Ternary many-to-many One-to-one binary One-to-one unary Many-to-many binary Many-to-many unary Which kind of relationship is displayed in this entity-relationship diagram? * (1 Point) 6 Only one appointment was scheduled by one patient. How is this portion of the entity-relationship diagram read, from left to right? * (1 Point) 7
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
9/18/23, 10:05 PM C170 Practice Test 1 https://forms.office.com/pages/responsepage.aspx?id=z5Knz2h3QUOIV4F1TCr6H8BBxwvKb-tBt7Mm_DoHfjRUNzZRQUFVWDZENjJPMVQyTjVYN… 4/25 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. A patient ID An appointment number A patient being seen at an appointment An appointment Which two examples are attributes? * (1 Point) 8 Restrict Set-to-Null Cascade Matching Which delete rule sets column values in a child table to NULL when the matching data is deleted from the parent table? * (1 Point) 9 A patient is related to two exam records. The table follows the restrict delete rule. What happens if someone tried to delete the patient? * (1 Point) 10
9/18/23, 10:05 PM C170 Practice Test 1 https://forms.office.com/pages/responsepage.aspx?id=z5Knz2h3QUOIV4F1TCr6H8BBxwvKb-tBt7Mm_DoHfjRUNzZRQUFVWDZENjJPMVQyTjVYN… 5/25 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. activity_id activity_name CREATE TABLE activity ( activity_id int NOT NULL, activity_name varchar(30) NOT NULL, activity_date date NOT NULL, time varchar(20) NOT NULL, location varchar(30) NOT NULL, coordinator_id varchar(10) NOT NULL, PRIMARY KEY (activity_id), FOREIGN KEY (coordinator_id) REFERENCES coordinator (coordinator_id) ); Which two columns are created as something other than variable-length strings in the statement above? Choose 2 answers * (1 Point) 11
9/18/23, 10:05 PM C170 Practice Test 1 https://forms.office.com/pages/responsepage.aspx?id=z5Knz2h3QUOIV4F1TCr6H8BBxwvKb-tBt7Mm_DoHfjRUNzZRQUFVWDZENjJPMVQyTjVYN… 6/25 activity_date time location coordinator_id 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. The database table 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? * (1 Point) 12
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
9/18/23, 10:05 PM C170 Practice Test 1 https://forms.office.com/pages/responsepage.aspx?id=z5Knz2h3QUOIV4F1TCr6H8BBxwvKb-tBt7Mm_DoHfjRUNzZRQUFVWDZENjJPMVQyTjVYN… 7/25 Move the data from the first two columns into separate tables. First Normal Form Second Normal Form Third Normal Form Unnormalized 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: * (1 Point) 13 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? * (1 Point) 14
9/18/23, 10:05 PM C170 Practice Test 1 https://forms.office.com/pages/responsepage.aspx?id=z5Knz2h3QUOIV4F1TCr6H8BBxwvKb-tBt7Mm_DoHfjRUNzZRQUFVWDZENjJPMVQyTjVYN… 8/25 Foreign Composite Primary Compound 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? * (1 Point) 15
9/18/23, 10:05 PM C170 Practice Test 1 https://forms.office.com/pages/responsepage.aspx?id=z5Knz2h3QUOIV4F1TCr6H8BBxwvKb-tBt7Mm_DoHfjRUNzZRQUFVWDZENjJPMVQyTjVYN… 9/25 It is undefined. It is linked through the instructor_id. It is indicated by the tables’ adjacency. It is linked through the campus_id. 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. In which two ways can data redundancy affect managing disk storage space and calculation speed? Choose 2 answers: * (1 Point) 16
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
9/18/23, 10:05 PM C170 Practice Test 1 https://forms.office.com/pages/responsepage.aspx?id=z5Knz2h3QUOIV4F1TCr6H8BBxwvKb-tBt7Mm_DoHfjRUNzZRQUFVWDZENjJPMVQyTjVY… 10/25 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 ’; With which command can a database administrator allow a user named Mary to query the Patient table by executing SELECT commands on it? * (1 Point) 17 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. Why does MySQL’s architecture use concurrency control? * (1 Point) 18 CREATE DATABASE IF NOT EXISTS db_name; IF NOT EXISTS CREATE DATABASE db_name; IF NOT EXISTS db_name; Which command creates a database only if it does not already exist? * (1 Point) 19
9/18/23, 10:05 PM C170 Practice Test 1 https://forms.office.com/pages/responsepage.aspx?id=z5Knz2h3QUOIV4F1TCr6H8BBxwvKb-tBt7Mm_DoHfjRUNzZRQUFVWDZENjJPMVQyTjVY… 11/25 CREATE DATABASE IF NEW db_name; AND item_price = 10; AND item_price >= 10; WHERE item_price = 10; WHERE item_price >= 10; 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? * (1 Point) 20 The associative entity A table’s intersection data The rows to be included in the result set A range of included columns What does WHERE identify in a basic SQL SELECT statement? * (1 Point) 21 Refer to the given SQL statement. SELECT patient_id 22
9/18/23, 10:05 PM C170 Practice Test 1 https://forms.office.com/pages/responsepage.aspx?id=z5Knz2h3QUOIV4F1TCr6H8BBxwvKb-tBt7Mm_DoHfjRUNzZRQUFVWDZENjJPMVQyTjVY… 12/25 WHERE patient_id >=1000; WHERE patient_id => 1000; WHERE patient_id = 1000+; WHERE patient_id > 1000; FROM patient Which line added to the end of the statement returns patient ids of at least 1000? * (1 Point) SUM item_id; GROUP BY item_id; COUNT item_id; ORDER BY item_id; 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? * (1 Point) 23 NULL Which data definition language statement affects databases or objects in them? * (1 Point) 24
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
9/18/23, 10:05 PM C170 Practice Test 1 https://forms.office.com/pages/responsepage.aspx?id=z5Knz2h3QUOIV4F1TCr6H8BBxwvKb-tBt7Mm_DoHfjRUNzZRQUFVWDZENjJPMVQyTjVY… 13/25 INSERT SELECT ALTER It removes rows from a table It removes columns not named in the column list. It removes views. IT removes columns from a table. What does the DELETE statement do? * (1 Point) 25 The VALUES list must contain a value for each non-null valued column in the table. The references 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. Which condition must be in effect to use the INSERT INTO … VALUES syntax for an INSERT statement? * (1 Point) 26 Refer to the given SQL statement. 27
9/18/23, 10:05 PM C170 Practice Test 1 https://forms.office.com/pages/responsepage.aspx?id=z5Knz2h3QUOIV4F1TCr6H8BBxwvKb-tBt7Mm_DoHfjRUNzZRQUFVWDZENjJPMVQyTjVY… 14/25 Decimal Integer Data String CREATE TABLE Product ( product_id int NOT NULL, product_name varchar(30) NOT NULL, product_description varchar(255) NOT NULL, product_price float(6,2) NOT NULL, PRIMARY KEY (product_id) ); Which kind of data type is FLOAT in the statement? * (1 Point) TINYBLOB FLOAT BINARY TERNARY INT SOUNDBLOB Which two MySQL data types can represent images or sounds? Choose two. * (1 Point) 28
9/18/23, 10:05 PM C170 Practice Test 1 https://forms.office.com/pages/responsepage.aspx?id=z5Knz2h3QUOIV4F1TCr6H8BBxwvKb-tBt7Mm_DoHfjRUNzZRQUFVWDZENjJPMVQyTjVY… 15/25 customer_id INT NOT NULL, PRIMARY KEY (invoice_id), CREATE TABLE Invoice ( FOREIGN KEY (customer_id) REFERENCES Customer (customer_id) 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? * (1 Point) 29 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; Which method creates an empty copy of a table and then populates it from the original table? * (1 Point) 30
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
9/18/23, 10:05 PM C170 Practice Test 1 https://forms.office.com/pages/responsepage.aspx?id=z5Knz2h3QUOIV4F1TCr6H8BBxwvKb-tBt7Mm_DoHfjRUNzZRQUFVWDZENjJPMVQyTjVY… 16/25 Changing storage space Changing column data types Dropping indexes Adding rows Refer to the given MySQL syntax. ALTER TABLE tbl_name action [, action ] … ; What does this syntax allow? Choose two answers: * (1 Point) 31 TRUNCATE TABLE DELETE TABLE REMOVE TABLE DROP TABLE Which command eliminates a table? * (1 Point) 32 To limit many-to-many relationship between various entities and attributes To restrict access to persons retrieving and modifying sensitive information Why is a view used to give controlled access to data? * (1 Point) 33
9/18/23, 10:05 PM C170 Practice Test 1 https://forms.office.com/pages/responsepage.aspx?id=z5Knz2h3QUOIV4F1TCr6H8BBxwvKb-tBt7Mm_DoHfjRUNzZRQUFVWDZENjJPMVQyTjVY… 17/25 ExtranTo move complicated security routines to subquerieset To add complexity to encryption techniques SELECT INSERT ALTER NULL Which data definition language statement affects databases or objects in them? * (1 Point) 34 ALTER custview AS WHERE VIEW custview IS CREATE VIEW custview AS VIEW custview 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? * (1 Point) 35
9/18/23, 10:05 PM C170 Practice Test 1 https://forms.office.com/pages/responsepage.aspx?id=z5Knz2h3QUOIV4F1TCr6H8BBxwvKb-tBt7Mm_DoHfjRUNzZRQUFVWDZENjJPMVQyTjVY… 18/25 ALTER VIEW CHANGE VIEW MODIFY VIEW UPDATE VIEW What is the proper command to change a view? * (1 Point) 36 Unauthorized access to the view is restricted The view is discarded The data is discarded The patient table data is discarded 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? * (1 Point) 37 TO WITH GRANT OPTION Which optional clause added to a GRANT statement enables the account to give its own privileges to other uses? * (1 Point) 38
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
9/18/23, 10:05 PM C170 Practice Test 1 https://forms.office.com/pages/responsepage.aspx?id=z5Knz2h3QUOIV4F1TCr6H8BBxwvKb-tBt7Mm_DoHfjRUNzZRQUFVWDZENjJPMVQyTjVY… 19/25 REQUIRE FOR Cascaded delete Foreign key constraint Referential delete Dynamic update 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? * (1 Point) 39 PRIMARY KEY (invoice_id)); PRIMARY KEY = (invoice_id)); (PRIMARY KEY: invoice_id; Refer to the given information. CREATE TABLE Invoice ( invoice_id INT NOT NULL, date DATE NOT NULL, customer_id INT NOT NULL, Which clause should be added to the end to make the invoice_id attribute the primary key within a CREATE TABLE statement? * (1 Point) 40
9/18/23, 10:05 PM C170 Practice Test 1 https://forms.office.com/pages/responsepage.aspx?id=z5Knz2h3QUOIV4F1TCr6H8BBxwvKb-tBt7Mm_DoHfjRUNzZRQUFVWDZENjJPMVQyTjVY… 20/25 PRIMARY KEY = (invoice_id)); 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) Which statement should be used to establish a foreign key on customer_id? * (1 Point) 41 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; Which ALTER TABLE statement adds a foreign key constraint to a child table? * (1 Point) 42 Refer to the table below. The database administrator has been tasked with implementing an index to speed up the retrieval of data based on the V_STATE 43
9/18/23, 10:05 PM C170 Practice Test 1 https://forms.office.com/pages/responsepage.aspx?id=z5Knz2h3QUOIV4F1TCr6H8BBxwvKb-tBt7Mm_DoHfjRUNzZRQUFVWDZENjJPMVQyTjVY… 21/25 ALTER TABLE ‘Vendor’ ADD 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); 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? * (1 Point) INDEX custid_index (customer_id)); Refer to the SQL statement below: CREATE TABLE Invoice ( invoice_id INT NOT NULL AUTO_INCREMENT , date DATE NOT NULL, customer_id INT NOT NULL, PRIMARY KEY (invoice_id), FOREIGN KEY (customer_id) REFERENCES Customer (customer_id), Which clause when added to the end of the statement creates an index on the customer_id field? * (1 Point) 44
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
9/18/23, 10:05 PM C170 Practice Test 1 https://forms.office.com/pages/responsepage.aspx?id=z5Knz2h3QUOIV4F1TCr6H8BBxwvKb-tBt7Mm_DoHfjRUNzZRQUFVWDZENjJPMVQyTjVY… 22/25 INDEX = (customer_id); INDEX = (customer_id)); SET INDEX custid_index (customer_id)); 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; Which syntax is the correct way to use the DROP INDEX command to drop a primary key from a table? * (1 Point) 45 The set-to-null delete rule The restrict rule The default delete rule The cascade delete rule 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? * (1 Point) 46
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
9/18/23, 10:05 PM C170 Practice Test 1 https://forms.office.com/pages/responsepage.aspx?id=z5Knz2h3QUOIV4F1TCr6H8BBxwvKb-tBt7Mm_DoHfjRUNzZRQUFVWDZENjJPMVQyTjVY… 23/25 The row values for two individual columns The attributes that are changeable The column values for two individual rows The data to be duplicated. 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. * (1 Point) 47 DELETE FROM Invoice WHERE invoice_id = *; DELETE FROM Invoice; DELETE FROM Invoice WHERE invoice_id == *; DELETE ALL FROM Invoice; Which statement deletes all rows from the invoice table? * (1 Point) 48 It selects only the rows in Table 1 that are the same as Table 2 Refer to the given SQL statement. SELECT table1.*, table2.* FROM table1 LEFT JOIN table2 ON table1.column_name = table2.column_name; * (1 Point) 49
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
9/18/23, 10:05 PM C170 Practice Test 1 https://forms.office.com/pages/responsepage.aspx?id=z5Knz2h3QUOIV4F1TCr6H8BBxwvKb-tBt7Mm_DoHfjRUNzZRQUFVWDZENjJPMVQyTjVY… 24/25 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 (SUBQUERY customer_id (FIND customer_id (SELECT customer_id (SUBQUERY customer_id Refer to the given SQL Statement. SELECT invoice_id FROM Invoice WHERE customer_id = FROM customer WHERE customer_id = 55547); What is missing from the subquery at the beginning of Line 4? * (1 Point) 50 Table SALES ___________ STORE_ID SALES DATE SALES AMOUNT Which SQL statement will return the sales amount for each store? * (1 Point) 51
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
9/18/23, 10:05 PM C170 Practice Test 1 https://forms.office.com/pages/responsepage.aspx?id=z5Knz2h3QUOIV4F1TCr6H8BBxwvKb-tBt7Mm_DoHfjRUNzZRQUFVWDZENjJPMVQyTjVY… 25/25 SELECT STORE_ID, SUM(SALES_AMOUNT) FROM SALES; SELECT STORE_ID, SUM(SALES_AMOUNT) FROM SALE ORDER BY STORE_ID; SELECT STORE_ID, SUM(SALES_AMOUNT) FROM SALE HAVING UNIQUE STORE_ID; SELECT STORE_ID, SUM(SALES_AMOUNT) FROM SALE GROUP BY STORE_ID; Acknowledge Read below and acknowledge your receipt of this information: Once the submit button is clicked, the only time correct or incorrect items are shown is by clicking on "View Results" on the next screen. By checking the box next to "Send me an email receipt of my responses" below, a copy of your responses (without being marked correct) will be sent. * 52 This content is created by the owner of the form. The data you submit will be sent to the form owner. Microsoft is not responsible for the privacy or security practices of its customers, including those of this form owner. Never give out your password. Powered by Microsoft Forms | Privacy and cookies | Terms of use
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help