Question 2
Question 2
Q.1
Which one of the following keywords is used when a subquery returns a list of values and a column
value in the outer query needs to be matched with any of these values? ( 1 M)
o IN
o ANY
o EXIST
o ALL
Q.2
A table named Project has the attributes, EmpID, projectID , and HrsAllocated.The table stores the ID
of the employees and the projects they are working upon.It also stores the total number of working
hours allocated for each project.One employee can work on one or more than one project.In
addition ,a single project can have one or more than one employee. Identify the attributes that are
suitable candidates for the primary key. (2 M)
o ProjectID+HrsAllocated
o EmpID
o ProjectID
o EmpID+ProjectID
Q.3
Which one of the following characteristics of the database approach is used to display the data stored
in the database in a format that differs from its actual form of storage? (1 M)
o Self-describing nature of a database system
o Support of multiple views of data
o Sharing of data and multiuser transaction processing
o Insulation between programs and data, and data abstraction
Q.4
Which one of the following components is used to display links to relevant information while the users
working in the management studio environment? (1 M)
o Template Explorer
o Dynamic Help
o Solution Explorer
o Query Editor
Q.5
Steve has been assigned the task of creating Web-based reports based on the data that is stored in
the data warehouse.Also these reports should get published in different formats. Which one of the
following SQL Server components will enable Steve implement the desired task? (2 M)
o Integration Services
o Microsoft SQL Server Reporting Services
o Replication Services
o Analysis Services
Q.6
You can embed the .NET code in database objects such as stored procedure, function, or trigger.
What is such a database object know as? (1 M)
o Unmanaged database object
o Server object
o CLR object
o Managed database object
Q.7
Steve is working as a database developer with Global Software. He has been provided some crucial
data files.But these files are in different formats.Steve needs to gather the entire data that is available
in different formats and put in a common database in a consistent format.Which component of SQL
Server will help Steve to implement the desired functionality? (2 M)
o Database Engine
o Reporting
o Integration
o Master Data
Q.8
Which one of the following levels of database architecture describes the database entities and the
relationships among them while hiding the physical storage of data? (1 M)
o Conceptual Level
o External Level
o Physical Level
o Internal Level
Q.9
Consider two tables, A and B . You want to retrieve all the rows from the first table but only the
matching rows from the other table. Which of the following options should you use to perform the
preceding task? ( 2 M)
o Outer join
o Right outer join
o Left outer join
o Full outer join
Q.10
Consider the following Employees tables (3 M)
Emp_ID Emp_Salary
1 2000
2 4000
3 5000
4 5000
5 6000
6 6000
7 9000
8 9000
Write a query that displays the IDs and salaries of those employees who earn their salaries within the
top 3 Salaries among of the employees
o SELECT TOP(3) WITH TIES Emp_ID,Emp_Salary
FROM Employees
ORDER BY Emp_Salary DESC
o SELECT TOP(30) PERCENT WITH TIES Emp_ID,Emp_Salary
FROM Employees
Order by Emp_Salary
o SELECT TOP(3) Emp_ID,Emp_Salary
FROM Employees
Order by Emp_Salary
o SELECT Emp_ID
FROM Employees
Where Emp_ID in (Select TOP 3 Emp_ID From Employees)
Q.11
You are a database developer and you work on SQL Server .Your database architecture requires you
to implement the SPARSE column on the Product_Transaction table .Which one of the following T-
SQL statements execute successfully to create a table with the SPARSE column? ( 4 M )
o Create table Product_Transaction(
ID INT SPARSE NULL IDENTITY(1,1), Transaction_Date datetime, Product_ID INT, Quality
INT, Product_Type varchar(100), Product_Details varchar(max))
o Create table Product_Transaction(
ID INT IDENTITY(1,1), Transaction_Date datetime, Product_ID INT SPARSE NULL, Quality
INT, Product_Type varchar(100), Product_Details varchar(max))
o Create table Product_Transaction(
ID INT IDENTITY(1,1), Transaction_Date datetime, Product_ID INT, Quality INT,
Product_Type varchar(100), Product_Details varchar(max) FILESTREAM SPARSE)
o Create table Product_Transaction(
ID INT IDENTITY(1,1), Transaction_Date datetime, Product_ID INT SPARSE NOT NULL,
Quality INT, Product_Type varchar(100), Product_Details varchar(max))
Q.12
You are a database developer on an instance of SQL Server .You have a table named emp_details
with the following structure. ( 3M)
Create table emp_details ( emp_name varchar(100), emp_dept nvarchar(2) )
Q.13
Which one of the following hints is used to control the locking mechanism of tables? ( 1 M)
o Hash Join hints
o Table hints
o Merge Join hints
o Query hints
Q.14
Working with indexes, you want to leave extra gaps and reserve a percentage of free space on each
leaf level page of the index to accommodate future expansion. Which one of the followings options
should be used while creating the index to accomplish this requirement? ( 2 M)
o PAD_INDEX
o SORT_IN_TEMPDB
o FILLFACTOR
o ONDEFAULT
Q.15
You are a databe developer on an instance of SQL Server .Your Sales database contains the
following SalesOrderDetail table. ( 3 M)
CREATE TABLE [SalesOrderDetail] ( [SalesOrderID] [int] NOT NULL, [SalesOrderDetailID] [int]
IDENTITY (1,1) NOT NULL,
[CarrierTrackingNumber] [nvarchar](25) NULL, [OrderQty] [smallint] NOT NULL, [ProductID] [int] NOT
NULL, [SpecialOfferID] [int] NOT NULL, [UnitPrice] [Money] NOT NULL, [UnitPriceDiscount] [Money]
NOT NULL, [LineTotal]AS ([(UnitPrice]*((1,0).[UnitPriceDiscount]))*[OrderQty](0,0))),
[rowguid] [uniqueidentifier] ROWGUIDCOL NOT NULL, [ModifiedDate] [datetime] NOT NULL )
The Sales OrderDetail table has a unique non clustered index on the SalesOrderDetailID named
PK_SlaesOrderID (===the following query === of the time and the client==that the query
performs................
SELECT * FROM sales .SalesOrderDetail WHERE UnitPrice > 10 AND UnitPrice < 200 AND
CarrierTrackingNumber = 491-403C-98
What should you do to improve the query performance
o Create a plan guide with FORCE SCAN option
o Use the BETWEEN operator instead of AND for the UnitPrice in the WHERE clause
o Create a nonclustered index on the Carrier Tracking Number
o Create a clustered index on the Carrier Tracking Number and Unit Price column
Q.16
You are a database developer. You plan to design a database solution by using SQL Server.A
database contains a table named Employee.The structure of the table is: (4 M)
Create table Employee (
Emp_ID int primary key,
Emp_Band varchar(2),
First_Name varchar(50),
Last_Name varchar(50) )
The table has the following indexes:
-A unique clustererd index on the PersonID column named PK_Employee_Emp_ID -A nonclustered
index on the First_Name and Last_Name columns named NCI_Employee_FirstName_LastName