Ensurepass

Question 11

Which relational algebraic operation is used to select specific columns (attributes) from a relation?

 

A. Union

B. Difference

C. Projection

D. Intersection

 

Answer: C

 

 

Question 12

Your enterprise has created a database and database application. The testing phase for the project has started. Which of the following best describes white-box testing of the projects software?

 

A. The database designer tests the software because he or she is able to make necessary changes to the underlying code for the software.

B. A user who has no knowledge of the softwares underlying code tests the software.

C. Someone other than the database designer tests the software. This person has no access to the underlying code and attempts to use the

software only in ways not considered by the software designers.

D. A person tests the software and submits suggestions to the software’s underlying code. This person is someone other than the database

designer, but has access to the softwares underlying code.

 

Answer: D

 

 

Question 13

Which security technique limits access by unauthorized users to parts of an enterprise database?

 

A. Views

B. Concurrency

C. Locking

D. Integrity controls

 

Answer: A

 

 

Question 14

Which of the following ACID properties requires that a transaction be executed in its entirety or not all?

 

A. Durability

B. Consistency

C. Isolation

D. Atomicity

 

Answer: D

 

 

Question 15

Consider the relations shown in the exhibit. Which of the following SQL statements would enter data from the Customers relation into the Atlanta_Customers relation?

clip_image002

A. INSERT INTO Atlanta_Customers VALUES(

SELECT *

FROM Customer s

WHERE Sales_Office = Atlanta);

B. INSERT INTO Atlanta_Customers SELECT *

FROM Customers

WHERE Sales_Office = Atlanta;

C. INSERT INTO Atlanta_Customers

SELECT Cust_No, Cust_Name, Satisfaction_Rate, Sales_Rep_No FROM Customers

WHERE Sales_Office = Atlanta;

D. INSERT INTO Atlanta_Customers

SELECT Cust_No, Cust_Name, Sales_Office, Sales_Rep_No FROM Customers

WHERE Sales_Office = Atlanta;

 

Answer: C

 

 

Question 16

Which statement is used to define a named group of related tables, views, domains and other database objects?

 

A. CREATE ENTITY

B. CREATE INDEX

C. CREATE DOMAIN

D. CREATE SCHEMA

 

Answer: D

 

 

Question 17

To create a view, what are the minimal privileges that a user must have for the relations used to make the view?

 

A. GRANT

B. REVOKE

C. SELECT

D. CREATE VIEW

 

Answer: C

 

 

Question 18

Consider the relation shown in the exhibit. Which of the following SQL statements would return a relation that excludes all customers with a Satisfaction_Rate of less than or equal to 80 unless the Sales_Office is located in Atlanta?

clip_image004

A. SELECT * FROM Customers

WHERE Satisfaction_Rate > 80 OR Sales_Office = Atlanta;

B. SELECT * FROM Customers

WHERE Satisfaction_Rate <= 80 AND Sales_Office = Atlanta;

C. SELECT * FROM Customers

WHERE Satisfaction_Rate >= 80;

D. SELECT * FROM Customers

WHERE Satisfaction_Rate >= 80 AND NOT Sales_Office = Atlanta;

 

Answer: A

 

 

Question 19

Consider the Information Engineering diagram shown in the exhibit for a building

management company. Referential integrity must be maintained such that a building cannot be deleted when it has residents. Building_ID, R_ID, Room_Count and Room_Num are integer numbers, whereas Bldg_Name, Location and Res_Name are all represented by variable-length strings with a maximum of 20 characters. Which SQL statement best implements the relations shown in this diagram?

clip_image006

 

A. CREATE TABLE BUILDING (

Building_ID INTEGER NOT NULL PRIMARY KEY,

Bldg_Name VARCHAR (20),

Location VARCHAR (20), Room_Count INTEGER ); CREATE TABLE RESIDENT ( R_ID NOT NULL PRIMARY KEY,

Room_Num INTEGER, Res_Name VARCHAR (20), Building_ID INTEGER NOT NULL,

FOREIGN KEY Building_ID REFERENCES RESIDENT (Building_ID) ON DELETE NO CHECK);

B. CREATE TABLE BUILDING (

Building_ID INTEGER NOT NULL PRIMARY KEY,

Bldg_Name VARCHAR (20),

Location VARCHAR (20), Room_Count INTEGER ); CREATE TABLE RESIDENT ( R_ID NOT NULL PRIMARY KEY,

Room_Num INTEGER, Res_Name VARCHAR (20), Building_ID INTEGER NOT NULL,

FOREIGN KEY Building_ID REFERENCES BUILDING (Building_ID) ON DELETE NO CHECK

ON UPDATE CASCADE);

C. CREATE TABLE BUILDING (

Building_ID INTEGER NOT NULL PRIMARY KEY,

Bldg_Name VARCHAR (20),

Location VARCHAR (20), Room_Count INTEGER ); CREATE TABLE RESIDENT ( R_ID NOT NULL PRIMARY KEY,

Room_Num INTEGER, Res_Name VARCHAR (20), Building_ID INTEGER NOT NULL,

FOREIGN KEY Building_ID REFERENCES BUILDING (Building_ID) ON DELETE NO CHECK

ON UPDATE CASCADE);

D. CREATE TABLE BUILDING (

Building_ID INTEGER NOT NULL PRIMARY KEY,

Bldg_Name VARCHAR (20),

Location VARCHAR (20), Room_Count INTEGER ); CREATE TABLE RESIDENT ( R_ID NOT NULL PRIMARY KEY,

Room_Num INTEGER, Res_Name VARCHAR (20), Building_ID INTEGER NOT NULL,

FOREIGN KEY Building_ID REFERENCES BUILDING (Building_ID) ON DELETE NO CHECK

ON UPDATE CASCADE);

 

Answer: C

 

 

Question 20

Consider the relational database shown in the exhibit. What is the foreign key in this database?

clip_image008

A. Employee.Dept_ID

B. Dept_Mngr

C. Dept_Name

D. Department.Dept_ID

 

Answer: A

 

 

Comments are closed.