Database Fundamentals exam Flashcards
(78 cards)
You need to store product quantities, and you want to minimise the amount of storage space that is used. Which data type should you use?
Integer
Which Statement will result in the creation of an index?
CREATE TABLE Employee
EmployeeID INTEGER PRIMARY KEY
You need to store product names that vary from three to 30 characters, while minimising the storage spaced used. Which data type should you use?
VARCHAR(30)
One reason to create a stored procedure is to?
Improve performance
Which permission does a user need in order to run a stored procedure?
EXECUTE
In SQL, an insert statement is used to add a:
Row of data to a table
You have two tables. Each table has three rows. How many rows will be included in the Cartesian product of these two tables?
9
You are writing an SQL statement to retrieve rows from a table. Which data manipulation language(DML) command can you use?
SELECT
Which constraint ensures a unique value in the ID column for each user?
PRIMARY KEY
The component that holds information for a single entry in a table is called a:
Row
Which keyword would you use in a select statement to return tows that meet a specific condition?
WHERE
What command should you use to remove a table from a database?
DROP TABLE
You need to store contact information for each student in your school database. You should store each student’s information in a:
Row
Which category of SQL statements is used to add, remove, and modify database structures?
Data definition language (DDL)
Data is a database is stored in:
Tables
Denormalization is performed in order to:
Improve query performance
How do you make a search by unique ID more efficient?
An index
Which two keys establish a relationship between two tables?
Foreign and Primary
One difference between a function and a stored procedure is that a function:
Must return a value
Which keyword must be included in a create view statement?
SELECT
You need to remove a view named EmployeeView from your database Which statement should you use?
DROP VIEW EmployeeView
A named group of SQL statements that can be executed in a database is called a:
Stored procedure
A view can be used to:
Limit access to specific rows or columns of data in a database
On which database structure does an update statement operate?
Table