WGU Course C170 - Data Management (Applications) Quizlet by Brian MacFarlane
WGU Course C170 - Data Management (Applications) Quizlet by Brian MacFarlane Document Content and Description Below WGU Course C170 - Data Management (Applications) Quizlet by Brian MacFarlane A salesperson is authorized to sell many products and a product can be sold by many salespersons. Which kind of binary relationship does this scenario describe? A One-to-one B One-to-many C One-to-one binary D Many-to-many Correct Answer-D Which kind of relationship is displayed in this entity-relationship diagram? A Many-to-many unary B Many-to-many binary C One-to-one unary D One-to-one binary Correct Answer-AWhich kind of relationship is displayed in this entity-relationship diagram? A Binary many-to-many B Unary one-to-one C Ternary many-to-many D Ternary one-to-one D Unary many-to-many E Binary one-to-one Correct Answer-B How is this portion of the entity-relationship diagram read, from left to right? A At least one book was written by an author. B Only one book was written by one author. C No books are written by an author. D One book was written by more than one author. Correct Answer-A Which two examples are attributes?Choose 2 answers 1 A meeting code 2 A person attending a meeting 3 An employee number 4 A sales meeting A 1,3 B 2,4 Correct Answer-A Which delete rule sets column values in a child table to a missing value when the matching data is deleted from the parent table? A Restrict B Cascade C Matching D Set-to-Null Correct Answer-D In this entity-relationship diagram, Salesperson 361 is related to two customers. The table follows the restrict delete rule.What happens if someone tries to delete Salesperson 361 from the customer records? A The delete occurs immediately. B The lack of a salesperson is flagged for later. C A new salesperson is assigned instead. D The delete is prohibited. Correct Answer-D Refer to the given SQL statement. CREATE TABLE member(member_idINT UNSIGNED NOT NULL AUTO_INCREMENT,PRIMARY KEY (member_id),last_nameVARCHAR(20) NOT NULL,first_nameVARCHAR(20) NOT NULL,suffixVARCHAR(5) NULL,expirationDATE NULL,emailVARCHAR(100) NULL,streetVARCHAR(50) NULL,cityVARCHAR(50) NULL,stateVARCHAR(2) NULL,zipVARCHAR(10) NULL,phoneVARCHAR(20) NULL,interestsVARCHAR(255) NULL); Which two columns are created as something other than variable-length strings in this statement? Choose 2 answers 1 member_id2 expiration 3 suffix 4 email 5 last name 6 city A 1,2 B 3,4 Correct Answer-A This database table has ten different employee numbers in the first column. Employee_ID is the primary key. In addition, it has ten different names in the second column and two office addresses repeated five times each in the third column. Which action should be used to translate this data into third normal form? A Move the data from the third column into the first column. B Move the data from the third column into its own table. C Move the data from the first two columns into separate tables. D Move the data from the second column into the third column. Correct Answer-BA database manager starts to convert data that has been normalized into a form that conforms to the relational model. A simple primary key has been established and all the repeating groups have been deleted. In which form is this data? A First normal form B Second normal form C Third normal form D Fourth normal form Correct Answer-B Two attributes in two related tables have the exact same domain of values. The attribute is a primary key in one table. Which kind of key is the attribute in the other table? A Compound B Composite C Primary D Foreign Correct Answer-DIn this entity-relationship diagram, many salespersons are shown as working in at least one office. How is the relationship between salespersons and offices represented in the diagram? A It is linked through the salesperson ID. B It is indicated by the tables' adjacency. C It is undefined. D It is linked through the office ID. Correct Answer-D? Which command creates a database only if it does not already exist? A IF NOT EXISTS CREATE DATABASE db_name ; B CREATE DATABASE IF NEW db_name ; C IF NOT EXISTS db_name ; D CREATE DATABASE IF NOT EXISTS db_name ; Correct Answer-A Refer to the given SQL statement.SELECT PRODNUM, PRODNAME FROM PRODUCT Which line should be added to the end of the statement to return the product numbers and product names for products that cost 20 dollars? A WHERE PRODCOST>=20; B WHERE PRODCOST=20; C AND PRODCOST=20; D AND PRODCOST>=20; Correct Answer-B What does WHERE identify in a basic SQL SELECT statement? A A table's intersection data B The associative entity C A range of included columns D The rows to be included Correct Answer-D Refer to the given SQL statement.SELECT EMPNUM FROM EMPLOYEE Which line added to the end of the statement returns employee numbers of at least 1000? A WHERE EMPNUM > 1000; B WHERE EMPNUM >= 1000; C WHERE EMPNUM => 1000; D WHERE EMPNUM = 1000+; Correct Answer-B Refer to the given SQL statement. SELECT PRODNUM, SUM(QUANTITY) FROM SALESPERSON Which line, when added to the end of the statement, returns the total number of each kind of product by product number?A ORDER BY PRODNUM; B GROUP BY PRODNUM; C COUNT PRODNUM; D SUM PRODNUM; Correct Answer-B Which data definition language statement affects databases or objects in them? A INSERT B NULL C ALTER D SELECT Correct Answer-C What does the DELETE statement do? A It removes rows from a table. B It removes views. C It removes columns not named in the column list. D It removes columns from a table. Correct Answer-AWhich condition must be in effect to use the INSERT INTO ... VALUES syntax for an INSERT statement? A The VALUES list must contain a value for each non-null valued column in the table. B The INSERT INTO portion of the statement must refer to a sampdb database table. C The INSERT INTO portion of the statement must generate a LOAD DATA statement. D The VALUES list must contain a value for each row in the table. Correct Answer-A Refer to the given SQL statement. CREATE TABLE mytbl ( f FLOAT(10,4), c CHAR(15) NOT NULL DEFAULT 'none', i TINYINT UNSIGNED NULL ); Which kind of data type is FLOAT in this statement? A DecimalB Data C String D Integer Correct Answer-A Which two SQL data types can represent images or sounds? Choose 2 answers 1 FLOAT 2 TERNARY 3 SOUNDBLOB 4 TINYBLOB 5 BINARY 6 INT A 4,5 B 1,2 Correct Answer-A Refer to the given SQL statement.CREATE TABLE CUSTOMER (CustomerIDINT NOT NULL AUTO_INCREMENT, LastName VARCHAR(100) NOT NULL, FirstName VARCHAR(100) NOT NULL, PRIMARY KEY( CustomerID )); Which component of the command indicates the table's name? A TABLE CUSTOMER B CustomerID C CUSTOMER D INT Correct Answer-C Which method creates an empty copy of a table and then populates it from the original table? A CREATE TABLE ... INTO followed by INSERT INTO: B INSERT TABLE ... LIKE followed by SELECT: C INSERT TABLE ... SELECT followed by INSERT INTO ... LIKE:D CREATE TABLE ... LIKE followed by INSERT INTO ... SELECT : Correct Answer-D Refer to the given SQL syntax. ALTER TABLE tbl_name action [, action ] ... ; What does this syntax allow? Choose 2 answers 1 Changing storage space 2 Dropping indexes 3 Changing column data types 4 Adding rows A 2,3 B 3,4 Correct Answer-A Which command eliminates a table? A REMOVE TABLEB TRUNCATE TABLE C DELETE TABLE D DROP TABLE Correct Answer-D Why is a view used to give controlled access to data? A To move complicated security routines to subqueries B To limit many-to-many relationships between various entities and attributes C To add complexity to encryption techniques D To restrict access to persons retrieving and modifying sensitive information Correct Answer-D A database manager plans to create a view of a table and has these two elements: •The CREATE VIEW privilege for the table •A level of privilege for every column selected by the SELECT What else does the manager need to create this view? A A reciprocal level of privilege for every row selected by the SELECT statement B The values created by the syntax INSERT INTO tbl_name VALUES(...),(...),... ;C The SELECT privilege for every column referred to elsewhere in the statement D The level of privilege for every column that is part of the base table Correct Answer-C Refer to the given SQL statement. SELECT product_name, product_number, mfg_city FROM product; Which statement, when added before this statement, generates a view? A VIEW viewprod: B ALTER viewprod AS C CREATE VIEW viewprod AS D WHERE VIEW viewprod IS Correct Answer-C What is the proper command to change a view? A ALTER VIEW B MODIFY VIEW C UPDATE VIEWD CHANGE VIEW Correct Answer-A Refer to the given statement. DROP VIEW EMPLOYEE; What happens as a result of the execution of this statement to the HRDB table on which the EMPLOYEE view is based? A The viewing of data is prohibited. B The view is discarded. C The data is discarded. D Unauthorized access to the view is restricted. Correct Answer-B When a product is deleted from the product table, all corresponding rows for the product in the pricing table are deleted automatically as well. What is this referential integrity technique called? A Cascaded deleteB Foreign key constraint C Referential delete D Dynamic update Correct Answer-A Refer to the given information. CREATE TABLE 'test1' ( contact_id INT(10), name VARCHAR(10), event_id INT(5), Which command should be added to the end to make the event_id attribute the primary key within a CREATE TABLE statement? A PRIMARY KEY (event_id)); B PRIMARY KEY = event_id); C PRIMARY (event_id)' D (PRIMARY KEY: event_id); Correct Answer-AWhat does the clause PRIMARY KEY followed by a field name in parentheses mean in a CREATE TABLE statement? A The column, in parentheses, is the primary key for the table. B The row, in parentheses, can be inserted as the foreign key. C The primary key value, in parentheses, can be used by a column. D The foreign key, in parentheses, is linked to the primary key. Correct Answer-A Which statement should be used so that it assigns a foreign key to the customer name? A FOREIGN KEY ( customer_name ) ( index_columns ) B FOREIGN KEY = customer_name REFERENCES table_name ( customer_name ) C FOREIGN KEY ( customer_name ) REFERENCES table_name ( customer_name ) D FOREIGN KEY [ table_name ] ( customer_name ) Correct Answer-C Which ALTER TABLE statement adds a foreign key constraint to a child table? A ALTER TABLE child ADD FOREIGN KEY (par_id) REFERENCES parent (par_id) ON DELETE CASCADE;B ALTER TABLE child ADD FOREIGN KEY WHERE parent (par_id) ON DELETE CASCADE; C ALTER TABLE child ADD FOREIGN KEY(par_id) WHERE parent(par_id)ON DELETE CASCADE; D ALTER TABLE child ADD FOREIGN KEY (par_id) ON DELETE CASCADE; Correct Answer-A (Refer to the exhibit) The database administrator has been tasked with implementing an index to speed up the retrieval of data based on the city values. The database is using the InnoDB engine. What is the correct syntax to create an index to be built on the city field based on the database information? A ALTER TABLE `Salesperson` ADD INDEX 'city_index' (`city`) B CREATE UNIQUE INDEX city_index ON Salesperson (city);C CREATE INDEX city_index USING HASH ON Salesperson (city); D ALTER TABLE `Salesperson` ADD UNIQUE INDEX 'city_index' (`city`) Correct Answer-A What is the name of the special internal database where the query optimizer finds information? A Optimizer catalog B Join catalog C Relational catalog D Query catalog Correct Answer-C Which clause in a CREATE TABLE statement creates an index on a field? A INDEX index_columns (index_name) B INDEX index_name (index_columns) C INDEX index_name (index_rows) D INDEX index_rows (index_name) Correct Answer-B A database administrator needs to modify an index on the CUSTOMER table called IDX_NAME because there are multiple customers with the same name. It has been determined that it would be desirable to modify the index to also include the telephone number.Which command line will modify the IDX_NAME index on the CUSTOMER table to include both NAME and TELEPHONE as part of the index? A ALTER INDEX IDX_NAME ON CUSTOMER(NAME, TELEPHONE); B MODIFY INDEX IDX_NAME BY CUSTOMER(NAME, TELEPHONE); C CHANGE INDEX IDX_NAME BY CUSTOMER(NAME, TELEPHONE); D REPLACE INDEX IDX_NAME ON CUSTOMER(NAME, TELEPHONE); Correct Answer-A Which syntax is the correct way to use the DROP INDEX command to drop a primary key from a table? A DROP INDEX WHERE PRIMARY KEY = tbl_name ; B DROP INDEX `PRIMARY` ON tbl_name ; C DROP INDEX PRIMARY KEY tbl_name; D DROP INDEX `PRIMARY KEY` ON tbl_name; Correct Answer-B A database administrator tries 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? A The cascade delete ruleB The default delete rule C The set-to-null delete rule D The restrict delete rule Correct Answer-D A manager deletes the BUILDING_MANAGEMENT row in a DEPARTMENT table. Deleting the row also deletes the GARDENING_TEAM and CLEANING_TEAM rows from the referenced PERSONNEL_TEAMS table. Which referential-integrity rule is in effect? A The restrict delete rule B The default delete rule C The cascade delete rule D The set-to-null delete rule Correct Answer-C Refer to the given SQL statement.INSERT INTO student VALUES('John','S',NULL),('Mary','S',NULL); What do the parentheses denote? A The data to be duplicatedB The attributes that are changeable C The row values for two individual columns D The column values for two individual rows Correct Answer-D What happens in an UPDATE statement if the WHERE clause is omitted? A Returns an error. B Every row in the table is updated. C Every column in the table is updated. D Only the first row in the table is updated. Correct Answer-B Which action deletes all rows from a table? A Omitting the table name in a DELETE statement B Adding an ALL statement to a DELETE statement C Omitting the WHERE clause from a DELETE statement D Adding an asterisk to a DELETE statement Correct Answer-C What is the purpose of using a SELECT statement?A To update data B To retrieve data C To index data D To delete data Correct Answer-B Which SQL statement retrieves all of the columns from the Owners table? A SELECT * FROM Owners; B SELECT ALL FROM Owners; C RETRIEVE ALL COLUMNS FROM Owners; D RETRIEVE COMPLETE FROM Owners; Correct Answer-A Which SQL statement tallies the number of different cities in which record companies have been founded? A GROUP BY(city) FROM recordcompany; B SELECT COUNT(DISTINCT city) FROM recordcompany; C SELECT DISTINCT city FROM recordcompany;D GROUP BY *(DISTINCT city) FROM recordcompany; Correct Answer-B Which task does ORDER BY perform by default? A Sorting rows in ascending order B Sorting columns in ascending order C Sorting rows in descending order D Sorting columns in descending order Correct Answer-A A database administrator of a movie rental company needs to compile a list of movies released each year for a marketing campaign. Which SQL command will accomplish this? A SELECT MOVIE, YEAR FROM MOVIE BY TITLE; B SELECT MOVIE, TOTAL FROM MOVIE BY TITLE; C SELECT YEAR, TITLE FROM MOVIE GROUP BY YEAR; D SELECT MOVIE, TITLE FROM MOVIE BY MOVIE YEAR; Correct Answer-CHow does Table 2 affect the returned results from Table 1 in a left join? A Records are dropped from the results where a match is found between Table 1 and Table 2. B All Table 1 results are returned, regardless of whether a match is found in Table 2. C Results are only returned where a match is found between Table 1 and Table 2. D Table 1 results are prioritized where a match with Table 2 exists. Correct Answer-B Which command functions as a RIGHT JOIN with the roles of the tables reversed? A INNER JOIN B LEFT JOIN C FULL JOIN D OUTER JOIN Correct Answer-B Refer to the given SQL statement.SELECT t1.*, t2.* FROM t1 LEFT JOIN t2 ON t1.i1 = t2.i2 What does the LEFT JOIN statement do? A It selects all of the rows in Table 1 and the matching rows in Table 2. B It selects only the rows in Table 1 that are the same as Table 2. C It selects the rows in Table 1 numbered the same as Table 2. D It selects the rows in both Tables that have numerical data that is left-aligned. Correct Answer-A What is the difference between COUNT(*) and COUNT(col_name) for specified column names? A COUNT(*) counts every row selected, and COUNT(col_name) counts every column selected. B COUNT(*) counts every column selected, and COUNT(col_name) counts only non-null values. C COUNT(*) counts every row selected, and COUNT(col_name) counts only non-null values. D COUNT(*) counts every column selected, and COUNT(col_name) counts only columns with alphabetical names. Correct Answer-CWhich function determines the total value for a column? A ALL() B SUM() C TOTAL() D SUMMARY() Correct Answer-B How does a row subquery differ from a table subquery? A A row subquery returns a single row of one or more values. B A row subquery returns a table with two rows in two columns. C A row subquery returns multiple rows of one or more values. D A row subquery returns a table with one row in one column. Correct Answer-A Refer to the given SQL statement. 1. SELECT SPNAME 2. FROM SALESPERSON3. WHERE SPNUM= 4. FROM CUSTOMER 5. WHERE CUSTNUM=20900); What is missing from the subquery at the beginning of line 4? A (SELECT SPNUM B (FIND SPNUM C (SUBQUERY SPNUM D (SPNUM Correct Answer-A ______ : _____ relationships cannot be implemented as such in the relational model. Correct Answer-M; N According to Codd's _____ rule of relational database, "If the system supports low level access to the data, users must not be allowed to bypass the integrity rules of the database." A view updating B information C nonsubversionD rule zero Correct Answer-C The DIFFERENCE operator subtracts one table from the other. A False B True Correct Answer-B The order of the rows and columns is important to the DBMS. A False B True Correct Answer-A If the attribute (B) is functionally dependent on a composite key (A) but not on any subset of that composite key, the attribute (B) is fully functionally dependent on (A). A True B False Correct Answer-A One characteristic of generalization hierarchies is that they are implemented as _____ relationship.A 1:M B 1:1 C M:N Correct Answer-B In a relational table, each column has a specific range of values known as the _____ domain. Correct Answer-attribute Proper data _______ design requires carefully defined and controlled data redundancies to function properly. Correct Answer-warehousing According to Codd's _____ rule of relational database, "Application programs and ad hoc facilities are logically unaffected when changes are made to the table structures that preserve the original table values (changing order of columns or inserting columns)." A comprehensive data sublanguage B logical data independence C nonsubversion D integrity independence Correct Answer-B Only a single attribute, not multiple attributes, can define functional dependence.A False B True Correct Answer-A ____, also known as RESTRICT, yields values for all rows found in a table that satisfy a given condition. A SELECT B DIFFERENCE C UNION D INTERSECT Correct Answer-A The one to many (1:M) relationship is easily implemented in the relational model by putting the foreign key of the "1" side in the table of the "many" side as a primary key. A True B False Correct Answer-B _____ logic, used extensively in mathematics, provides a framework in which an assertion (statement of fact) can be verified as either true or false.A Database B Predicate C Index D Relational Correct Answer-B A null is created when you press the Enter key or the Tab key to move to the next entry without making a prior entry of any kind. A True B False Correct Answer-A When you define a table's primary key, the DBMS automatically creates a(n) _____ index on the primary key column(s) you declared. A primary B key C composite D unique Correct Answer-DThe word _______ , also known as a dataset in Microsoft Access, is based on the mathematical set theory from which Codd derived his model. Correct Answer-relation A(n) _____ is an orderly arrangement used to logically access rows in a table. A index B primary rule C superkey D relationship Correct Answer-A A primary key is a(n) _______ key selected to uniquely identify all other attribute values in any given row. Correct Answer-candidate _____ relationships can be implemented by creating a new entity in 1:M relationships with the original entities. A M:N B 1:1 C 1:N D M:1 Correct Answer-AAs rare as 1:1 relationships should be, certain conditions absolutely require their use. A False B True Correct Answer-B The DIVIDE operation uses one single column table (e.g., column "a") as the divisor and one two column table (e.g., columns "a" and "b") as the dividend. A False B True Correct Answer-B The _____ relationship is the "relational model ideal." A 1:1 B M:N C M:1 D 1:M Correct Answer-DA _____ is the primary key of one table that has been placed into another table to create a common attribute. A compos
Written for
- Institution
- WGU Course C170 -
- Course
- WGU Course C170 -
Document information
- Uploaded on
- April 24, 2023
- Number of pages
- 166
- Written in
- 2022/2023
- Type
- Exam (elaborations)
- Contains
- Questions & answers
Subjects
-
wgu course c170 data management applications quizlet by brian macfarlane document content and description below wgu course c170 data management applications quizlet by brian macfarlane a sales
Also available in package deal