

















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
53 exam questions with answers related to data management applications. The questions cover topics such as binary relationships, attributes, delete rules, primary keys, referential integrity, SQL statements, data types, and joins. useful for students studying data management applications and preparing for exams or assignments.
Typology: Exams
1 / 25
This page cannot be seen from the preview
Don't miss anything!
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? One-to-one One-to-many Many-to-many One-to-one binary - Answer: Many-to-many Which two examples are attributes?
Choose 2 answers A person attending a meeting An employee number A sales meeting A meeting code - Answer: An employee number A meeting code Which delete rule sets column values in a child table to a missing value when the matching data is deleted from the parent table? Restrict Cascade Matching Set-to-Null - Answer: Set-to-Null Refer to the given SQL statement. CREATE TABLE member ( member_id INT UNSIGNED NOT NULL AUTO_INCREMENT, PRIMARY KEY (member_id), last_name VARCHAR(20) NOT NULL, first_name VARCHAR(20) NOT NULL,
12342 Jacob 54123 Main Street 12346 Michael 354 Center Avenue 12846 Ethan 54123 Main Street 12887 Joshua 54123 Main Street 12894 Daniel 354 Center Avenue 13097 Alexander 354 Center Avenue 13112 Anthony 54123 Main Street 13411 William 354 Center Avenue 13987 Christopher 354 Center Avenue 13998 Matthew 54123 Main Street 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? Move the data from the third column into the first column. Move the data from the third column into its own table. Move the data from the first two columns into separate tables. Move the data from the second column into the third column. - Answer: Move the data from the third column into its own table.
A 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? First normal form Second normal form Third normal form Fourth normal form - Answer: Second normal form 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? Foreign Primary Compound Composite - Answer: Foreign 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?
The column, in parentheses, is the primary key for the table. The foreign key, in parentheses, is linked to the primary key. The row, in parentheses, can be inserted as the foreign key. - Answer: The column, in parentheses, is the primary key for the table. Which statement should be used so that it assigns a foreign key to the customer name? FOREIGN KEY ( customer_name ) REFERENCES table_name ( customer_name ) FOREIGN KEY = customer_name REFERENCES table_name ( customer_name ) FOREIGN KEY ( customer_name ) ( index_columns ) FOREIGN KEY [ table_name ] ( customer_name ) - Answer: FOREIGN KEY ( customer_name ) REFERENCES table_name ( customer_name ) Which command creates a database only if it does not already exist? IF NOT EXISTS db_name ; CREATE DATABASE IF NEW db_name ; CREATE DATABASE IF NOT EXISTS db_name ; IF NOT EXISTS CREATE DATABASE db_name ; - Answer: IF NOT EXISTS CREATE DATABASE db_name ; Refer to the given SQL statement. SELECT PRODNUM, PRODNAME
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? WHERE PRODCOST=20; AND PRODCOST=20; WHERE PRODCOST>=20; AND PRODCOST>=20; - Answer: WHERE PRODCOST=20; What does WHERE identify in a basic SQL SELECT statement? The associative entity The rows to be included A table's intersection data A range of included columns - Answer: The rows to be included 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?
What does the DELETE statement do? It removes views. It removes rows from a table. It removes columns from a table. It removes columns not named in the column list. - Answer: It removes rows from a table. Which condition must be in effect to use the INSERT INTO ... VALUES syntax for an INSERT statement? 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 row 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 kind of data type is FLOAT in this statement? Decimal Integer String Data - Answer: Decimal Which two SQL data types can represent images or sounds? Choose 2 answers INT FLOAT BINARY TERNARY TINYBLOB SOUNDBLOB - Answer: BINARY TINYBLOB Refer to the given SQL statement. CREATE TABLE CUSTOMER (CustomerID INT NOT NULL AUTO_INCREMENT,
Choose 2 answers Adding rows Dropping indexes Changing storage space Changing column data types - Answer: Dropping indexes Changing column data types Which command eliminates a table? TRUNCATE TABLE DELETE TABLE REMOVE TABLE DROP TABLE - Answer: DROP TABLE Why is a view used to give controlled access to data? To add complexity to encryption techniques To move complicated security routines to subqueries To restrict access to persons retrieving and modifying sensitive information To limit many-to-many relationships between various entities and attributes - Answer: To restrict access to persons retrieving and modifying sensitive information
Which ALTER TABLE statement adds a foreign key constraint to a child table? ALTER TABLE child ADD FOREIGN KEY (par_id) REFERENCES parent (par_id) ON DELETE CASCADE; ALTER TABLE child ADD FOREIGN KEY (par_id) WHERE parent (par_id) ON DELETE CASCADE; ALTER TABLE child ADD FOREIGN KEY WHERE parent (par_id) ON DELETE CASCADE; ALTER TABLE child ADD FOREIGN KEY (par_id) ON DELETE CASCADE; - Answer: ALTER TABLE child ADD FOREIGN KEY (par_id) ON DELETE CASCADE; 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? The default delete rule The restrict delete rule The cascade delete rule The set-to-null delete rule - Answer: The restrict delete rule
Only the first row in the table is updated. Every column in the table is updated. Every row in the table is updated. Returns an error. - Answer: Every row in the table is updated. Which action deletes all rows from a table? Omitting the WHERE clause from a DELETE statement Adding an ALL statement to a DELETE statement Omitting the table name in a DELETE statement Adding an asterisk to a DELETE statement - Answer: Omitting the WHERE clause from a DELETE statement What is the purpose of using a SELECT statement? To retrieve data To update data To delete data To index data - Answer: To retrieve data Which SQL statement retrieves all of the columns from the Owners table? SELECT * FROM Owners; SELECT ALL FROM Owners; RETRIEVE COMPLETE FROM Owners;
RETRIEVE ALL COLUMNS FROM Owners; - Answer: SELECT * FROM Owners; Which SQL statement tallies the number of different cities in which record companies have been founded? SELECT COUNT(DISTINCT city) FROM recordcompany; GROUP BY *(DISTINCT city) FROM recordcompany; SELECT DISTINCT city FROM recordcompany; GROUP BY(city) FROM recordcompany; - Answer: SELECT COUNT(DISTINCT city) FROM recordcompany; Which task does ORDER BY perform by default? Sorting rows in ascending order Sorting rows in descending order Sorting columns in ascending order Sorting columns in descending order - Answer: Sorting columns in descending order 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? SELECT MOVIE, YEAR FROM MOVIE BY TITLE;
VIEW viewprod: ALTER viewprod AS WHERE VIEW viewprod IS CREATE VIEW viewprod AS - Answer: CREATE VIEW viewprod AS What is the proper command to change a view? ALTER VIEW CHANGE VIEW MODIFY VIEW UPDATE VIEW - Answer: ALTER VIEW 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? The data is discarded. The view is discarded. The viewing of data is prohibited. Unauthorized access to the view is restricted. - Answer: The view is discarded.
How does Table 2 affect the returned results from Table 1 in a left join? Records are dropped from the results where a match is found between Table 1 and Table 2. All Table 1 results are returned, regardless of whether a match is found in Table 2. Results are only returned where a match is found between Table 1 and Table 2. Table 1 results are prioritized where a match with Table 2 exists. - Answer: All Table 1 results are returned, regardless of whether a match is found in Table 2. Which command functions as a RIGHT JOIN with the roles of the tables reversed? INNER JOIN OUTER JOIN LEFT JOIN FULL JOIN - Answer: LEFT JOIN Refer to the given SQL statement. SELECT t1., t2. FROM t1 LEFT JOIN t2 ON t1.i1 = t2.i What does the LEFT JOIN statement do? It selects the rows in Table 1 numbered the same as Table 2. It selects only the rows in Table 1 that are the same as Table 2. It selects all of the rows in Table 1 and the matching rows in Table 2.