SEMUA
SEMUA
ProductID Color
4545 Blue
4545 Green
4545 Purple
2. You combine data from three tables into one table. The new table includes redundancy to
optimize read performance
The data in the new table has been denormalized
Instructions. Review the underlined text. If it makes the statement correct, select “ No Change is
needed” if the statement incorrect, select the answer choice that makes the statement correct
A. Indexed
B. Truncated
C. Normalized
D. No change is needed
Instructions : Review the underlined text. If it makes the statement correct, select “ No Change
is needed” if the statement incorrect, select the answer choice that makes the statement
correct
A. No change is needed
B. Foreign keys
C. Duplicate rows
D. Composite keys
5. Which two keys establish a relationship between two tables ? choose two
A. Foreign
B. Primary
C. Local
D. Candidate
E. Superkey
FlightNumber Airline
1 Blue yonder airlines
2 Margie’s travel
3 Northwind trades
Instructions : use the drop-down menus to select the answers choice that completes each
statement based on the information presented in the graphic. Each correct selection is worth
one point
A. Adding a [answer choice] on the FlightNumber column physically sorts rows in the table by
FlightNumber . Clustered index
B. Adding a [answer choice] on the Airline column retrieves data faster, but will not physically
sort rows in the table by Airline. Foreign Key
Which two SQL keyword are valid to use in a CREATE TABLE statement? Choose two
A. PRIMARY KEY
B. INSERT INTO
C. ORDER BY
D. CONSTRAINT
12. Which permissions does a user need in order to run a stored procedure?
A. RUN
B. EXECUTE
C. ALLOW
D. CALL
13. You need to create a view to filter rows of data from an underlying table. Which type of clause
must be included in the CREATE VIEW statement?
A. CONSTARINT
B. WHERE
C. JOIN
D. FILTER
14. You create a table of recently released video games and their review scores.
To create a table recently a view that returns a list of game names that is alphabetically sorted
the completed SQL statement should be the following create view MyGames As select Name
from Games.
Instructions : Review the underlined text. If it makes the statement correct, select “ No Change
is needed” if the statement incorrect, select the answer choice that makes the statement
correct
A. No change is needed.
B. Select * from Games WHERE name BETWEEN ‘A’ AND ‘Z’
C. Select* from Games
D. Select name from games order by name
15. Views are database objects that contain all of the data in a database
Instructions : Review the underlined text. If it makes the statement correct, select “ No Change
is needed” if the statement incorrect, select the answer choice that makes the statement
correct
A. Quires
B. No change is needed
C. Stored procedures
D. Tables
16. Which command should you use
A. CREATE USER
B. ADD USER
C. INSERT USER
D. ALLOW USER
E. ALTER USER
17. Which command should you use to add a column to an exiting table?
A. MODIFY
B. INSERT
C. CHANGE
D. ALTER
E. UPDATE
18. The component that holds information for a single entry in a table is called a :
A. Data type
B. Column
C. Row
D. View
19. You have a table named student that contains 100 rows. Some of the rows have a NULL value in
the FirstName column.
You execute the following statement :
20. Which category of SQL statements is used to add, remove and modify database structure?
A. Data manipulation language (DML)
B. Data control language (DCL)
C. Data definition language (DDL)
D. Data acces language (DAL)
21. You are writing an SQL Statement to retrieve rows from a table.
Which data manipulation language (DML) command should you use?
A. GET
B. READ
C. OUTPUT
D. SELECT
Instructions : Review the underlined text. If it makes the statement correct, select “ No Change
is needed” if the statement incorrect, select the answer choice that makes the statement
correct
A. A unique constraint
B. Data definition language (DDL) statement
C. Data manipulation Languange (DML) statement
D. No change is needed
26.
ID GivenName
1 Tia
2 Susana
3 Joey
When volunteer information changes, you must update the table.
You need to change Tia’s name to Kimberly Which statement
should you choose?
A. UPDATE volunteer
SET GivenName = ‘Kimberly’
WHERE GivenName = ‘Tia’
B. SET volunteer
TO GivenName = ‘Kimberly’
WHERE GivenName = ‘Tia’
C. SET GivenName = ‘Kimberly’ FROM
volunteer
WHERE GivenName = ‘Tia’
D. UPDATE GivenName =’Kimberly’
FROM volunteer
WHERE GivenName = ‘Tia’
27. You execute a statement inside a transaction to delete 100 rows from a table. The transaction
fails after only 40 rows are deleted.
28. You accept an IT intership at a local charity. The charitu asks you to keep a record of its
volunteers by using a database table named Volunteer.
When volunteer ask to be removed from mailing lists, the table must be updated
You need to use a transaction to ensure that the database has data integrity and referential
integrity which statement should you use ?
A. All orders for CustomerID 209 are deleted from the Order table, and CustomerID 209 is
deleted from the customer table
B. CustomerID 209 is deleted from the Customer Table
C. The first order for customerID 209 is deleted from the order table
D. All orders for CustomerID 209 are deleted from the order table
1. Soal
ProductID ProductCategory
32 Books
25 Books
67 Movies
89 Movies
Which database term is used to describe the relationship between ProductID and
ProductCategory?
A. Compositional
B. Deterministic
C. Cohort
D. Functionally dependent
E. Relationally dependent
A. Foreign
B. Super key
C. Local
D. Primary
3. First normal form requires that a database excludes :
A. Composite keys
B. Duplicate rows
C. Foreign keys
D. Repeating groups
4. You combine data from three tables into one table. The new table includes redundancy to
optimize read performance
The data in the new table has been denormalized
Instructions. Review the underlined text. If it makes the statement correct, select “ No Change is
needed” if the statement incorrect, select the answer choice that makes the statement correct
A. Truncated
B. No change is needed
C. Normalized
D. Indexed
5. You have a table named Product that contains the following data
The ProductID Column is the primary key. The CategoryID column is a foreign key to a separate
table named Category.
What is te result?
A. A syntax error
B. A primary key constraint violation
C. A new row in the category table
D. A new row in the Product table
E. A foreign key constraint violation
6. Which two keys establish a relationship between two tables ? choose two
A. Foreign
B. Primary
C. Local
D. Candidate
E. Superkey
7. Which two SQL construct represent data manipulation language (DML) statement ? choose two
A. Remove table
B. Delete table
C. Update table
D. Drop table
9. The component that holds information for a single entry in a table is called a :
A. Data type
B. Row
C. View
D. Column
10. In SQL, an INSERT statement is used to add a :
A. User to a database
B. Row of data to a table
C. Column to a table definition
D. Table to a database.
11. You need to delete a database table
A. DELETE
B. ALTER
C. DROP
D. TRUNCATE
12. Which is one difference between an UPDATE statement and a DELETE statement?
14. You need to store the contact information for each student in your school database
A. Function
B. Stored procedure
C. Row
D. Variable
ID Name Quantity
1234 Spoon 33
2615 Fork 17
3781 Plate 20
4589 Cup 51
A. 2
B. 4
C. 1
D. 3
16. You have a table of products with fields for ProductID, Name , and Price
You need to write an UPDATE statement that sets the value in the InStock field to Yes for a
specific ProductID.
A. WHERE
B. GROUP BY
C. THAT
D. HAVING
17. You have a table named Employee that includes the following columns:
EmployeeID
EmployeeName
Which statement should you use to return the number of rows in the table?
SELECT *
FROM Employee
SELECT COUNT (*)
FROM Employee
SELECT COUNT (rows)
FROM Employee
SELECT SUM (*)
FROM Employee
18. Your database contains a table named Customer. You need to delete the record from the
customer table that has a CustomerID of 12345.
DELETE CustomerID
FROM Customer
WHERE CustomerID = 12345
UPDATE Customer
DELETE *
WHERE CustomerID = 12345
DELETE FROM Customer
WHERE CustomerID = 12345
UPDATE CustomerID
FROM Customer
DELETE *
WHERE CustomerID = 12345
19. You delete rows in a table named order. The corresponding rows in the Orderitem table are
automatically deleted.
A. Functional delete
B. Cascade delete
C. Waterfall delete
D. Domino delete
E. Inherited delete
20. Which keyword would you use in a SELECT statement to return rows that meet a specific
condition?
A. FROM
B. ORDER BY
C. WHERE
D. UNION
21. You need to add rows to a database table.
A. JOIN
B. INSERT
C. CREATE
D. UPDATE
22. The UNION Keyword combines the result of two queries and returns only rows that appear in
both result set .
Instructions. Review the underlined text. If it makes the statement correct, select “ No Change is
needed” if the statement incorrect, select the answer choice that makes the statement correct
A. No change is needed
B. ALL
C. JOIN
D. INTERSECT
23. You have a table that contains information about all students in your school
You use the INSERT SQL keyword to change a students’s given name in the table.
You use the INSERT SQL keyword to change a student’s given name in the table
Instructions. Review the underlined text. If it makes the statement correct, select “ No Change is
needed” if the statement incorrect, select the answer choice that makes the statement correct
A. UPDATE
B. No change is needed
C. CHANGE
D. SELECT
24. You need to populate a table named EmployeeCopy With data from an existing table named
Employee.
25. Instructions : for each of the following statements, select yes if the statement is true. Otherwise,
select No. Each correct selection is worth one point.
Statement YES NO
You can delete data by using a stored procedure o
A function must have a return value o
A stored procedure must have a return value o
26. You need to remove a view named EmployeeView from your database.
Instructions. Review the underlined text. If it makes the statement correct, select “ No Change is
needed” if the statement incorrect, select the answer choice that makes the statement correct
A. No change is needed
B. Limit access to specific rows of columns of data in a table
C. Save historical data before deleting it from the base table
D. Save an extra copy data stored in a separate table
28. You have the following table definition :
RoadID Distance
1234 22
1384 34
29. Instructions : for each of the following statements, select yes if the statement is true. Otherwise,
select No. Each correct selection is worth one point.
Statement YES NO
The VARCHAR data type contains only numeric o
characters
The NUMERIC data type contains only numbers o
that have decimal places
The INT data type contains only whole numbers o
32. Instructions : for each of the following statements, select yes if the statement is true. Otherwise,
select No. Each correct selection is worth one point.
Statement YES NO
A Full database backup is a copy of all of the data
in the entire database
A transaction log backup up all the data in the
database
A differential backup copies only data that was
changed before the last full backup
A file or filegroup restore specifies a portion of
the database to recover
33. Your assign user1 a set of permissions that include the WITH GRANT OPTION.
2. Which category of SQL statements is udes to add, remove, and modify database structures?
a. Data Control Language (DCL)
b. Data Definition Language (DDL)
c. Data Access Language (DAL)
d. Data Manipulation Language (DML)
5. This question requires that you evaluate the underlined text to if it is correct.
Use indexing to create, remove, or change database objects.
Instructions : Review the underliedn text. If it makes the statemen correct, select “No change is
needed.” If the statement is incorrect, select the answer choise that makes the statement correct
a. Data Manipulation Language (DML) Statements
b. No change is needed
c. Data Defnition Language (DDL) Statements
d. A unique constraint
12. This question requires that you evaluate the underlined text to determine if it is correct.
First normal form requires that a database excludes repeating groups
Instructions : Review the underliedn text. If it makes the statemen correct, select “No change is
needed.” If the statement is incorrect, select the answer choise that makes the statement correct
a. Foreign key
b. Composite keys
c. No change is needed
d. Duplicate rows
13. Which two elemets are require to define a column? Choose two
a. A key
b. An index
c. A data type
d. A name
14. Which permission does a user need in order to run a stored procedure?
a. Call
b. Execute
c. Allow
d. Run
15. One dfference between a function and a stored procedure is that a function:
a. Must be called from a trigger
b. Must return a value
c. Cannot accept parameters
d. Cannot contain a transaction
16. You need to create a view to filter rows of data from an underlying table Which type of clause must
be included in the CREATE VIEW statement?
a. Where
b. Join
c. Filter
d. Constraint
17. Which Keyword must be included in a CREATE VIEW statement?
a. Order By
b. Select
c. Update
d. Where
18. This question requires that you evaluate the underlined text to determine if it is correct.
Views are database objects that contain all of the data in a database
Instructions : Review the underliedn text. If it makes the statemen correct, select “No change is
needed.” If the statement is incorrect, select the answer choise that makes the statement correct
a. Tables
b. No change is needed
c. Stored procedures
d. Queries
19. You are developing a SQL Statement to create a table
Which two SQL keywords are calid to use in a CREAE TABLE statement? Choose two
a. Order By
b. Primary Key
c. Constraint
d. Insert Into
20. You need to enable a new employee to authenticate to your database
Which command should you use
a. Alter User
b. Add User
c. Allow User
d. Create User
e. Insert User
21. You need to list the name and price of each product, sorted by price from highest to lowest.
Which statement should you use?
a. Select Name, Price
From Product
ORDER BY Price ASC
23. You have a table named Product. The Product table has columns for productDescription and
ProductCategory.
You need to hange the ProdutCategory value for all the spoons in the Product table to 43.
Which statement should you use
a. UPDATE Product
SET ProductCategory = 43
WHERE ProductDescription = ‘spoon’
b. SET Product
WHERE ProductDescription = ‘spoon’
TO ProductCategory = 43
c. SET Product
TO ProductCategory = 43
WHERE ProductDescription = ‘spoon’
d. UPDATE Product
WHERE ProductDescription = ‘spoon’
SET ProductCategor = 43
24. You execute a statement inside a transaction to delete 100 rows froma table. The transaction fails
after only 40 rows are deleted.
What is the result of the database ?
a. The table will be corrupted
b. Forty (40) rows will be deleted from the table
c. No rows will be deleted from the table
d. The transaction will restart
25. 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.
When voluteers ask to be removed from mailing list, the table must be updated.
You need to use transaction to ensure that the database has data integrity and referential integrity.
Which statement should you use?
a. UPDATE TRANSACTION VolunteerDelete;
DELETE FROM Volunteer WHERE Id = 13;
END TRANSACTION VolunteerDelete;
b. OPEN TRANSACTION VolunteerDelete;
DELETE FROM Volunteer WHERE Id = 13;
CLOSE TRANSACTION VolunteerDelete;
c. WHERE TRANSACTION VolunteerDelete;
DELETE FROM Volunteer WHERE Id = 13;
CATCH TRANSACTION VolunteerDelete;
d. BEGIN TRANSACTION VolunteerDelete;
DELETE FROM Volunteer WHERE Id = 13;
COMMIT TRANSACTION VolunteerDelete;
ProductID Color
4545 Blue
4545 Green
4545 Purple
Instruction : Use the drop-down menus to select the answer choise that completes each statement
based on the information presented in the graphic. Each correct section is worth one point
29. This question requires that you evaluate the underlined text to determine if it is correct.
You create a table of recently released video games and their review scores
To create a view that returns a list of game names that is alphabetically sorted, the completed
SQL statement should be the following: create view MyGames select Name from Games Instructions
: Review the underliedn text. If it makes the statemen correct, select “No change is needed.” If the
statement is incorrect, select the answer choise that makes the statement correct
a. Select * from Games
b. No change is needed
c. Select Name from Games order by Name
d. Select * from Games WHERE Name BETWEEN ‘A’ AND ‘Z’
31. The 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 following columns and rows:
Id GivenName
1 Tia
2 Susana
3 Joey
c. UPDATE Volunteer
SET GivenName = ‘Kimberly’
WHERE GivenName = ‘Tia’
d. SET Volunteer
TO GivenName = ‘Kimberly’
WHERE GivenName = ‘Tia
You need to create a Structured Query Language (SQL) query to retrieve only the names of
songs that sold more than 1000 compact discs (CDs) Which query should you use?
a. SELECT Name
FROM CDsSold
WHERE CDsSold > 1000
b. SELECT *
FROM SongInformation
c. SELECT Name
FROM SongInformation
WHERE CDsSold > 1000
d. SELECT *
FROM SongInformation
WHERE CDsSold = 1000
34. Instructions: For each of the following statements, select Yes if the statement is true. Otherwise,
select No. Each correct selection is worth one point
Statement Yes No
You can insert data into a primary key column
You can insert multiple rows into a table by using one
INSERT statement
You cans insert data is in one table into another table
1. The component that holds information for a single entry in a table called a :
a. View.
b. Column
c. Row.
d. Data Type
2. Which category of SQL statements is used to add ,remove, and modify database
structures?
a. Modify
b. Change
c. Insert
d. Update
e. Alter
6. You have database tables as defined below. The first table contains information about
students. The second table contains informations about courses. The last tables are related
by CourseID
a. Data types
b. Tables
c. Queries
d. Stored procedures
8. You have a table named Student that contains 100 rows. Some of the rows have a NULL
value in FirstName column.
You execute the
following statement :
DELETE FROM Student
What the result ?
a. All rows containing a NULL value in the FirstName column will be delete.
b. All rows in the table will deleted.
c. All rows and he table definition will be deleted.
d. You will receive an error massage.
a. Indexed
b. No change is needed
c. Normalized
d. Truncated
11. Which two keys establish a relationship between two tables ? choose two a. Local
b. Foreign
c. Candidate
d. Superkey
e. Primary
13. First normal form requires that a database excludes repteating groups.
Intructions : review the underline text. If it makes the statement correct, select ““no
change is needed” if the statement is incorrect select the answer that makes statement
correct.
a. Foreign keys
b. Composite keys
c. No change is needed
d. Duplicate rows
14. You create a table of recently released video games and their review score
TO create a view that returns a list of game that is alphabetically sorted, the completed
SQL statement should be the following : craete view Mygames select name from games.
Intrucructions : review the underline text. If it makes the statement correct, select “ NO
Change is needed” if the statement is incorrect the answer that makes statement correct.
15. Which two element are required to define a column choose? Two
a. A key
b. An index
c. A data type
d. A name
16. Which permission does a user need in order to run astored produere
a. CALL
b. EXECUTE
c. ALLOW
d. RUN
17. One difference betwwen a function and a stored produre is that a function :
a. WHERE
b. JOIN
c. FILTER
d. CONTRAINT
a. ORDER BY
b. SELECT
c. UPDATE
d. WHERE
20. View are databases object that contain all of the data in database
Intructions : review the underline text, if its makes the statement correct select “no change
is needed” if the statement is incorrect select the answer that makes statement correct.
a. Tables
b. No changes is needed
c. Stored produres
d. Queiries
a. ORDER BY
b. PRIMARY KEY
c. CONSTRAINT
d. INSERT INTO
22. You need to enavbled a employee to authenticate to your database. Whsih command
should you use?
a. ALTER USER
b. ADD USER
c. ALLOW USER
d. CREATE USER
e. INSERT USER
23. You need to list the name and price of each product, sorted by price from highest to
lowest Which statement should you use?
24. You need retrieve data from two related database tables based on column that exists in
both table Which command should you use in query ?
a. UNION
b. JOIN
c. INTERSECT
d. TRUNCATE
25. You execure a statement inside a transaction to delete 100 rows from a table. The
transaction fails after only 40rows are deleted , what the result in database?\
27. A data base contains twoo tables named Customer and Orders
a. The first order for CustomerID 209 is deleted from the order table
b. All order for customerID 209 are deleted from order table.
c. All order for CustomerID 209 are deleted from the order table, and CustomerID
209 is deletd from the cutomer table
d. CustomerID is deleted from the customer table
a. CREATE
b. MERGE
c. ALTER
d. DROP
Which constraint ensures a unique value in the ID column for each customer?
A. DISTINCT
B. FOREIGN KEY
C. SEQUENTIAL
D. PRIMARY KEY
Answer: d
The component that holds information for a single entry in a table is called a:
A. data type.
B. row.
C. column.
D. view.
Answer: b
You are writing an SQL statement to retrieve rows from a table. Which data manipulation language
(DML) command should you use?
A. READ
B. SELECT
C. OUTPUT
D. GET
Answer: B
Which of the following operators is not supported when combining results between SELECT
statements?
a. UNION
b. EXCEPT
c. INTERSECT
d. AND
Answer: D