You have a Department table and an Employee table in your database.
You need to ensure that an employee can be assigned to only an existing department.
What should you apply to the Employee table?
You need to store product quantities, and you want to minimize the amount of storage space that is used. Which data type should you use?
You have two tables. Each table has three rows.
How many rows will be included in the Cartesian product of these two tables?
You accept an IT internship at a local charity. The charity has two tables in their data model named Chapter and Language, as defined below:
You create a third table named ChapterLanguage to relate the Chapter table and the Language table.
You need to select columns from the Chapter and Language tables to create a composite primary key for the ChapterLanguage table.
Which two columns should you select? (Choose two.)
You have the following table definition:
CREATE TABLE Product
(ID INTEGER PRIMARY KEY,
Name VARCHAR(20),
Quantity INTEGER)
The Product table contains the following data.
You execute the following statement:
SELECT Name FROM Product WHERE Quantity IS NOT NULL
How many rows are returned?
This question requires that you evaluate the underlined text to determine if it is correct.
A view can be used to ensure referential integrity.
Instructions: Review the underlined text. If it makes the statement correct, select "No change is needed." If the statement is incorrect, select the answer choice that makes the statement correct
This question requires that you evaluate the underlined text to determine if it is correct.
You have two tables. Each table has three rows.
Nine rows will be included in the Cartesian product of these two tables.
Instructions: Review the underlined text. If it makes the statement correct, select "No change is needed." If the statement is incorrect, select the answer choice that makes the statement corrector.
You need to list the name and price of each product, sorted by price from highest to lowest. Which statement should you use?
A database contains two tables named Customer and Order.
You execute the following statement:
DELETE FROM Order
WHERE CustomerID = 209
What is the result?
You need to populate a table named EmployeeCopy with data from an existing table named Employee.
Which statement should you use?
The terms "bitmap," "b-tree," and "hash" refer to which type of database structure?
Instructions: For each of the following statements, select Yes if the statement is true. Otherwise, select No. Each correct selection is worth one point.
You accept an IT internship at a local charity. The charity asks you to keep a record of its volunteers by using a database table named Volunteer.
The table has the following columns and rows:
When volunteer information changes, you must update the table.
You need to change Tia's name to Kimberly.
Which statement should you choose?
You have a table that contains the following data.
You break the table into the following two tables.
This process is referred to as:
You need to store product names that vary from three to 30 characters. You also need to minimize the amount of storage space that is used.
Which data type should you use?
Instructions: For each of the following statements, select Yes if the statement is true. Otherwise, select No. Each correct selection is worth one point.
Which keyword can be used in a create table statement?
You need to set up a database to provide a view of North American mammals.
Match the Structured Query Language (SQL) statements to the SQL query.
Instructions: To answer, drag the appropriate SQL statement from the column on the left to its place in the SQL query on the right Each SQL statement may be used once, more than once, or not at all. Each correct match is worth one point.
You have the following table definition:
CREATE TABLE Road
(RoadID INTEGER NOT NULL,
Distance INTEGER NOT NULL)
The Road table contains the following data:
You execute the following statement:
INSERT INTO Road VALUES (1234, 36)
What is the result?