


































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



































Which action should be used to translate this data into third normal form?......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?......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?......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?......ANSWER.......Cascaded delete
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?......ANSWER.......PRIMARY KEY (event_id));
What does the clause PRIMARY KEY followed by a field name in parentheses mean in a CREATE TABLE statement?......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?......ANSWER.......FOREIGN KEY (customer_name) REFERENCE table_name (customer_name)
Which command creates a database only if it does not already exist?......ANSWER.......CREATE DATABASE IF NOT EXISTS db_name;
Refer to the given SQL statement.
Which line, when added to the end of the statement, returns the total number of each kind of product by product number?......ANSWER.......GROUP BY PRODNUM;
Which data definition language statement affects databases or objects in them?......ANSWER.......ALTER
What does the DELETE statement do?......ANSWER.......It removes from a table
Which condition must be in effect to use the INSERT INTO ... VALUES syntax for an INSERT statement?......ANSWER.......The VALUES list must contain a value for each non-null column in the table
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?......ANSWER.......Decimal
Which two SQL data types can represent images or sounds?......ANSWER.......BINARY; TINYBLOB
Refer to the given SQL statement.
(CustomerID INT 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?......ANSWER.......CUSTOMER
ADD FOREIGN KEY (par_id) REFERENCES parent (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?......ANSWER.......The restrict delete rule
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?......ANSWER.......The cascade delete rule
Refer to the given SQL statement.
INSERT INTO student VALUES('John','S',NULL),('Mary','S',NULL);
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?......ANSWER.......Many-to-many
Which two examples are attributes?......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?......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,
suffix VARCHAR(5) NULL,
expiration DATE NULL,
email VARCHAR(100) NULL,
street VARCHAR(50) NULL,
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.
What do the parentheses denote?......ANSWER.......The column values for two individual rows
What happens in an UPDATE statement if the WHERE clause is omitted?......ANSWER.......Every row in the table is updated
Which action deletes all rows from a table?......ANSWER.......Omitting the WHERE clause from a DELETE statement
What is the purpose of using a SELECT statement?......ANSWER.......To retrieve data
Which SQL statement retrieves all of the columns from the Owners table?......ANSWER.......SELECT * FROM Owners;
Which SQL statement tallies the number of different cities in which record companies have been founded?......ANSWER.......SELECT COUNT(DISTINCT city) FROM recordcompany;
Which task does ORDER BY perform by default?......ANSWER.......Sorting rows in ascending 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?......ANSWER.......SELECT YEAR, TITLE FROM MOVIE GROUP BY YEAR;
A database manager plans to create a view of a table and has these two elements:
How does Table 2 affect the returned results from Table 1 in a left join?......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?......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?......ANSWER.......It selects all of the rows in Table 1 and the matching rows in Table 2.
What is the difference between COUNT() and COUNT(col_name) for specified column names?......ANSWER.......COUNT() counts every row selected, and COUNT(col_name) counts only non-null values.
Which function determines the total value for a column?......ANSWER.......SUM()
How does a row subquery differ from a table subquery?......ANSWER.......A row subquery returns a single row of one or more values.
Refer to the given SQL statement.
What is missing from the subquery at the beginning of line 4?......ANSWER.......(SELECT SPNUM
Refer to the diagram of an index table.
Salesperson Table
Record
Address Salesperson
Number Salesperson
Name City
Hire Date
Which clause in a CREATE TABLE statement creates an index on a field?......ANSWER.......INDEX index_name (index_columns)
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?......ANSWER.......ALTER INDEX IDX_NAME ON CUSTOMER(NAME, TELEPHONE);
Which syntax is the correct way to use the DROP INDEX command to drop a primary key from a table?......ANSWER.......DROP INDEX PRIMARY ON tbl_name ;
A symbol that can be used as a general substitute for: (1) all columns in a table (*) when used in an attribute list of a SELECT statement or, (2) zero or more characters in a SQL LIKE clause condition ( % and _ ). ......ANSWER.....wildcard character
The table on which a view is based. ......ANSWER.....base tables
A routine that pools transactions into a single group to update a master table in a single operation. ......ANSWER.....batch update routine
A subquery that executes once for each row in the outer query. ......ANSWER.....correlated subquery
A SQL command that creates a logical, "virtual" table. The view can be treated as a real table. ......ANSWER.....CREATE VIEW
A join that performs a relational product (or Cartesian product) of two tables. ......ANSWER.....cross join
Dealing with or related to sets, or groups of things. In the relational model, SQL operators are set-oriented because they operate over entire sets of rows and columns at once. ......ANSWER.....set-oriented
A view that can update attributes in base tables that are used in the view. ......ANSWER.....updatable view
A named physical storage space that stores a database's data. It can reside in a different directory on a hard disk or on one or more hard disks. All data in a database is stored in data files. A typical enterprise database is normally composed of several data files. A data file can contain rows from one or more tables. ......ANSWER.....data files
A column distribution of values or the number of different values a column can have. ......ANSWER.....data sparsity
A set of activities and procedures designed to reduce the response time of a database system—that is, to ensure that an end-user query is processed by the DBMS in the minimum amount of time. ......ANSWER.....database performance tuning
In query optimization, measurements about database objects, such as the number of rows in a table, number of disk blocks used, maximum and average row length, number of columns in each row, and number of distinct values in each column. Such statistics provide a snapshot of database characteristics. ......ANSWER.....database statistics
Activities to ensure that clients' requests are addressed as quickly as possible while making optimum use of existing resources. ......ANSWER.....DBMS performance tuning
The process of determining the SQL access strategy at run time, using the most up-to-date information about the database. ......ANSWER.....dynamic query optimization
In a DBMS, the capability to automatically evaluate and update the database access statistics after each data access operation. ......ANSWER.....dynamic statistical generation mode
In a DBMS environment, refers to the ability of data files to expand in size automatically using predefined increments. ......ANSWER.....extents
See table space. ......ANSWER.....file group
An index based on an ordered list of hash values. ......ANSWER.....hash index
A low-level data access operation that reads or writes data to and from computer devices. ......ANSWER.....input/output (I/O) request