You are on page 1of 121

1) which dbms user performs only basic operations on the database?

options
1. application programmer
2. sophisticated user
3. end user
4. database administrator
correct answer :-> 3

2) the three-level architecture of a dbms helps achieve ______.


options
1. data independence
2. data integrity
3. data security
4. data redundancy
correct answer :-> 1

3) which of the following relationship types is demonstrated when a student


enrolls for two courses simultaneously?
options
1. one-to-one
2. many-to-one
3. one-to-many
4. many-to-many
correct answer :-> 3

4) what is the last stage in the ddlc?


options
1. requirements definition
2. database evaluation and maintenance
3. conceptual design
4. implementation
correct answer :-> 2

5) which of the following is a disadvantage of the conventional approach to


database processing?
options
1. consistent data
2. enforcement of standards
3. security restrictions
4. duplication of data
correct answer :-> 4

6) which of the following denotes an association between entity types?


options
1. relation
2. relationship
3. relationship type
4. relation type
correct answer :-> 3

7) a(n) ______ is a pool of values from which one or more attributes draw their
actual values.
options
1. relation
2. domain
3. entity
4. supertype
correct answer :-> 2

8) which of the following problems arise when a primary key is allowed null
values?
options
1. it becomes difficult to identify the rows uniquely.
2. it becomes difficult to identify the columns uniquely.
3. it becomes difficult to join tables.
4. it becomes difficult to identify foreign key.
correct answer :-> 1

9) which of the following types of relationship enables you to merge two tables
for faster access?
options
1. one-to-one
2. many-to-one
3. one-to-many
4. many-to-many
correct answer :-> 1

10) normalization reduces redundancy using_______.


options
1. e/r diagrams
2. primary and foreign keys
3. non-loss decomposition
4. top-down approach
correct answer :-> 3

11) each value of an attribute a in relation r is associated with precisely one


value of attribute b. what is this called?
options
1. top-down approach
2. normalization
3. denormalization
4. functional dependency
correct answer :-> 4

12) in a relation, every determinant is a candidate key. this relation is in which


normal form?
options
1. third normal form
2. fourth normal form
3. boyce-codd normal form
4. fifth normal form
correct answer :-> 3

13) for any event that causes a change in the contents of a table, a user can
specify an associated action that the dbms should carry out. what is this action
called?
options
1. log
2. trigger
3. integrity
4. relation
correct answer :-> 2
----------------------------------------------------------------------------------
-----------------

1) which dbms user performs only basic operations on the database?


options
1. application programmer
2. sophisticated user
3. end user
4. database administrator
correct answer :-> 3

2) who performs the task of concurrency control in a dbms?


options
1. disk manager
2. database manager
3. file manager
4. database administrator
correct answer :-> 2

3) in which of the following models is data represented in the form of a tree?


options
1. hierarchical model
2. relational model
3. entity-relationship model
4. network model
correct answer :-> 1

4) which of the following relational operators is used to extract specified


columns from a given relation?
options
1. restrict
2. product
3. divide
4. project
correct answer :-> 4

5) dependent entities are also called:


options
1. weak entities
2. regular entities
3. subtypes
4. supertypes
correct answer :-> 1

6) which data model has the database structured in fixed-format records of several
types?
options
1. relational model
2. object-based logical model
3. network model
4. hierarchical model
correct answer :-> 4

7) which of the following features is essential for two tables to be union


compatible?
options
1. attributes with same data types
2. attributes with same data
3. attributes with unique data
4. attributes with different data types
correct answer :-> 1

8) which of the following options is true?


options
1. the primary key of the supertype is the primary key of the subtype.
2. the foreign key of the supertype is the primary key of the subtype.
3. the primary key of the supertype is the foreign key of the subtype.
4. the foreign key of the supertype is the foreign key of the subtype.
correct answer :-> 3

9) functional dependencies represent _______ relationships.


options
1. one-to-one
2. one-to-many
3. many-to-one
4. many-to-many
correct answer :-> 3

10) normalization reduces redundancy using_______.


options
1. e/r diagrams
2. primary and foreign keys
3. non-loss decomposition
4. top-down approach
correct answer :-> 3

11) a table is said to be in the _____ when each cell of the table contains
precisely one value.
options
1. first normal form
2. second normal form
3. third normal form
4. fourth normal form
correct answer :-> 1

12) a _____ is a named, derived, virtual table that does not exist physically.
options
1. source table
2. query
3. view
4. base table
correct answer :-> 3

13) which type of view includes all rows but only some columns of the source
table?
options
1. joined
2. column subset
3. grouped
4. row subset
correct answer :-> 2
----------------------------------------------------------------------------------
----------

1) which of the following problems arise when a primary key is allowed null
values?
options
1. it becomes difficult to identify the rows uniquely.
2. it becomes difficult to identify the columns uniquely.
3. it becomes difficult to join tables.
4. it becomes difficult to identify foreign key.
correct answer :-> 1

2) which of the following specifies a key that is made up of more than one
attribute?
options
1. primary key
2. foreign key
3. alternate key
4. composite key
correct answer :-> 4

3) which of the following is the result of taking the union of two or more lower-
level entity sets to produce a higher-level entity set?
options
1. relationship
2. specialization
3. supertype
4. generalization
correct answer :-> 4

4) each value of an attribute a in relation r is associated with precisely one


value of attribute b. what is this called?
options
1. top-down approach
2. normalization
3. denormalization
4. functional dependency
correct answer :-> 4
5) in a relation, every determinant is a candidate key. this relation is in which
normal form?
options
1. third normal form
2. fourth normal form
3. boyce-codd normal form
4. fifth normal form
correct answer :-> 3

6) for any event that causes a change in the contents of a table, a user can
specify an associated action that the dbms should carry out. what is this action
called?
options
1. log
2. trigger
3. integrity
4. relation
correct answer :-> 2

7) which dbms user performs only basic operations on the database?


options
1. application programmer
2. sophisticated user
3. end user
4. database administrator
correct answer :-> 3

8) which of the following is defined as an association among entities?


options
1. e/r diagram
2. supertype
3. relationship
4. attribute
correct answer :-> 3

9) which of the following specifies the property of an entity?


options
1. subtype
2. attribute
3. e/r diagram
4. supertype
correct answer :-> 2

10) which of the following performs the task of replacing blocks of data?
options
1. database administrator
2. file manager
3. disk manager
4. database manager
correct answer :-> 3

11) which of the following is a pool of values from which one or more attributes
draw their actual values?
options
1. relationship
2. entity
3. domain
4. table
correct answer :-> 3

12) in an e/r diagram, an entity is represented as a ______.


options
1. diamond
2. line
3. box
4. oval
correct answer :-> 3

13) a(n) ______ is a pool of values from which one or more attributes draw their
actual values.
options
1. relation
2. domain
3. entity
4. supertype
correct answer :-> 2
----------------------------------------------------------------------------------
-----------------

1) which dbms user performs only basic operations on the database?


options
1. application programmer
2. sophisticated user
3. end user
4. database administrator
correct answer :-> 3

2) who performs the task of concurrency control in a dbms?


options
1. disk manager
2. database manager
3. file manager
4. database administrator
correct answer :-> 2

3) which of the following specifies the property of an entity?


options
1. subtype
2. attribute
3. e/r diagram
4. supertype
correct answer :-> 2

4) what is the last stage in the ddlc?


options
1. requirements definition
2. database evaluation and maintenance
3. conceptual design
4. implementation
correct answer :-> 2

5) which of the following is a disadvantage of the conventional approach to


database processing?
options
1. consistent data
2. enforcement of standards
3. security restrictions
4. duplication of data
correct answer :-> 4

6) which of the following denotes an association between entity types?


options
1. relation
2. relationship
3. relationship type
4. relation type
correct answer :-> 3

7) the scenario where a student can do only one project and no other student can
do the same project, the relationship between student and project is a ______
relationship.
options
1. one-to-one
2. one-to-many
3. many-to-one
4. many-to-many
correct answer :-> 1

8) a candidate key that does not become a primary key is called a(n) ______ key.
options
1. candidate key
2. foreign key
3. alternate key
4. composite key
correct answer :-> 3

9) which of the following keys is an attribute that is a candidate for the primary
key but is not the primary key?
options
1. alternate key
2. foreign key
3. candidate key
4. composite key
correct answer :-> 1

10) normalization reduces redundancy using_______.


options
1. e/r diagrams
2. primary and foreign keys
3. non-loss decomposition
4. top-down approach
correct answer :-> 3

11) a table is said to be in the _____ when each cell of the table contains
precisely one value.
options
1. first normal form
2. second normal form
3. third normal form
4. fourth normal form
correct answer :-> 1

12) which sql statements are used to create and delete tables?
options
1. ddl
2. dql
3. dml
4. dcl
correct answer :-> 1

13) which data integrity constraint requires that a column contain a non-null
value?
options
1. entity integrity
2. referential integrity
3. business rules
4. required data
correct answer :-> 4
----------------------------------------------------------------------------------
----------

rdd1.doc

1.
which dbms user performs only basic operations on the database?

application programmer

sophisticated user

end user (dung)

database administrator

2.
the three-level architecture of a dbms helps achieve ______.

data independence (dung)

data integrity

data security
data redundancy

3.
in which of the following models is data represented in the form of a tree?

hierarchical model (dung)

relational model

entity-relationship model

network model

4.
which of the following relational operators is used to extract specified columns
from a given relation?

restrict

product

divide

project (dung)

5.
dependent entities are also called:

weak entities (dung)

regular entities

subtypes

supertypes

6.
which data model has the database structured in fixed-format records of several
types?

relational model (dung)

object-based logical model

network model

hierarchical model

7.
which of the following features is essential for two tables to be union
compatible?

attributes with same data types (dung)

attributes with same data

attributes with unique data


attributes with different data types

8.
which of the following options is true?

the primary key of the supertype is the primary key of the subtype.

the foreign key of the supertype is the primary key of the subtype.

the primary key of the supertype is the foreign key of the subtype. (dung)

the foreign key of the supertype is the foreign key of the subtype.

9.
which of the following keys is an attribute that is a candidate for the primary
key but is not the primary key?

alternate key (dung)

foreign key

candidate key

composite key

10.
in which of the following normal forms every determinant in a relation is a
candidate key?

1 nf

2 nf

3 nf

bcnf (dung)

11.
each value of an attribute a in relation r is associated with precisely one value
of attribute b. what is this called?

top-down approach

normalization

denormalization

functional dependency (dung)

12.
which sql statements are used to create and delete tables?

ddl (dung)

dql

dml
dcl

13.
for any event that causes a change in the contents of a table, a user can specify
an associated action that the dbms should carry out. what is this action called?

log

trigger (dung)

integrity

relation
---------------------------------------------------------------------
rdd2.doc

1.
mary peterson is designing a database system for imc inc. she has performed the
activities involved in the first four stages of the ddlc. what activity does she
need to perform at the implementation stage?

evaluate the performance of the database.

create the conceptual schema of the database.

select a dbms, purchase it, and populate the database with data.(dung)

determine the feasibility of the database.

2.
who performs the task of concurrency control in a dbms?

disk manager

database manager (dung)

file manager

database administrator

3.
in which of the following models is data represented in the form of a tree?

hierarchical model (dung)

relational model

entity-relationship model

network model

4.
which of the following performs the task of replacing blocks of data?

database administrator

file manager
disk manager (dung)

database manager

5.
which of the following is a disadvantage of the conventional approach to database
processing?

consistent data

enforcement of standards

security restrictions

duplication of data (dung)

6.
in an e/r diagram, an entity is represented as a ______.

diamond

line

box (dung)

oval

7.
a(n) ______ is a pool of values from which one or more attributes draw their
actual values.

relation

domain (dung)

entity

supertype

8.
which of the following options is true?

the primary key of the supertype is the primary key of the subtype.

the foreign key of the supertype is the primary key of the subtype.

the primary key of the supertype is the foreign key of the subtype.(dung)

the foreign key of the supertype is the foreign key of the subtype.

9.
which of the following specifies a key that is made up of more than one attribute?

primary key

foreign key
alternate key

composite key (dung)

10.
which of the following is the result of taking the union of two or more lower-
level entity sets to produce a higher-level entity set?

relationship

specialization

supertype

generalization (dung)

11.
what is the term used for the intentional introduction of redundancy in a table in
order to improve performance?

normalization

denormalization (dung)

functional dependency

top-down approach

12.
in a relation, every determinant is a candidate key. this relation is in which
normal form?

third normal form

fourth normal form

boyce-codd normal form (dung)

fifth normal form

13.
which data integrity constraint requires that a column contain a non-null value?

entity integrity

referential integrity

business rules

required data (dung)


-------------------------------------------------------------
rdd3.doc

question text
the scope of the database is determined at which stage of the ddlc?
options
1. preliminary planning
2. conceptual design
3. feasibility study
4. requirements definition
correct answer :-> 4
your answer :-> you did not attempt the question

7.
question text
the three-level architecture of a dbms helps achieve ______.
options
1. data independence
2. data integrity
3. data security
4. data redundancy
correct answer :-> 1
your answer :-> you did not attempt the question

8.
question text
in which of the following models is data represented in the form of a tree?
options
1. hierarchical model
2. relational model
3. entity-relationship model
4. network model
correct answer :-> 1
your answer :-> you did not attempt the question

9.
question text
which of the following performs the task of replacing blocks of data?
options
1. database administrator
2. file manager
3. disk manager
4. database manager
correct answer :-> 3
your answer :-> you did not attempt the question

10.
question text
dependent entities are also called:
options
1. weak entities
2. regular entities
3. subtypes
4. supertypes
correct answer :-> 1
your answer :-> you did not attempt the question

11.
question text
which data model has the database structured in fixed-format records of several
types?
options
1. relational model
2. object-based logical model
3. network model
4. hierarchical model
correct answer :-> 4
your answer :-> you did not attempt the question

12.
question text
which of the following features is essential for two tables to be union
compatible?
options
1. attributes with same data types (dung)
2. attributes with same data
3. attributes with unique data
4. attributes with different data types
correct answer :-> 1
your answer :-> you did not attempt the question

13.
question text
a candidate key that does not become a primary key is called a(n) ______ key.
options
1. candidate key
2. foreign key
3. alternate key
4. composite key
correct answer :-> 3
your answer :-> you did not attempt the question
----------------------------------------------------------------------------
which function would you use to perform calculation on date datatype?
options
1. mathematical function
2. aggregate function
3. string function
4. date function
correct answer :-> 4
what abbreviation would you use to extract the week of the month from the
specified date?
options
1. dw
2. dy
3. ww
4. dd
correct answer :-> 3
which operator will you use to compare a value with a set of values from a single
column?
options
1. some
2. exists
3. like
4. in
correct answer :-> 1
when you need to retrieve summarized information from a column, you use:
options
1. aggregate functions
2. string functions.
3. mathematical functions.
4. date functions.
correct answer :-> 1
identify the select statement for data retrieval with incorrect syntax.
options
1. select all* from suppliers
2. select second suppliername, supplieraddress, from suppliers
3. select distinct suppliername, supplieraddress from suppliers
4. select suppliername, supplieraddress from suppliers
correct answer :-> 2
while specifying an alias with a space you use:
options
1. double quotes.
2. comma.
3. single quotes.
4. colon.
correct answer :-> 3
which mathematical function would you use to obtain the largest integer value of a
numeric expression?
options
1. exp
2. abs
3. ceiling
4.
correct answer :-> 4
which string function would you use to remove the leading blank spaces from the
result?
options
1. upper
2. rtrim
3. lower
4. ltrim
correct answer :-> 4
you use conversion functions when you need to:
options
1. retrieve data from columns having different data type.
2. combine the result sets of two select statements.
3. retrieve selective data from a table.
4. retrieve summarized information from a table.
correct answer :-> 1
which function would you use to convert data from one format to another to make it
user-friendly?
options
1. date function
2. aggregate function
3. mathematical function
4. string function
correct answer :-> 4
which string function would you use to extract character data from a character
string?
options
1. left
2. substring
3. right
4. len
correct answer :-> 2
which date function would you use to extract the part of the specified date as a
string value?
options
1. datepart
2. datename
3. dateadd
4. datediff
correct answer :-> 2
to obtain the total number of rows from a table including the duplicate records,
you use the:
options
1. count function.
2. count(*)function.
3. max function.
4. avg function.
correct answer :-> 2
which of the following statement is correct about union.
options
1. union is used to add columns.
2. union can combine any select list.
3. in a union statement headers for the columns are picked from the last select
statement.
4. in a union statement the number and sequence of columns should be same in
all the queries.
correct answer :-> 4
which command would you use to retrieve emp_name and emp_code columns from the
employees table?
options
1. select emp_name from employees
2. select emp_code from employees
3. select emp_name, emp_code from employees
4. select emp_name, emp_code
correct answer :-> 3
which mathematical function would you use to obtain the absolute value of the
numeric expression?
options
1. abs
2. exp
3. floor
4. ceiling
correct answer :-> 1
which command would you use to generate a list of students whose percentage falls
between 70 to 80?
options
1. select roll_num from student where percentage between 70 and 80
2. select from student roll_num where percentage between 70 and 80
3. select roll_num from student where percentage in 70 and 80
4. select roll_num from student where percentage = 70 to 80
correct answer :-> 1
to combine data of different data types, you use:
options
1. conversion functions.
2. logical functions.
3. string functions.
4. mathematical functions.
correct answer :-> 1
at quality software developers, anne forsythe is assigned the task of obtaining
the maximum salary drawn by an employee. the salary of employees is stored in
emp_sal column in the employee table. which command should anne forsythe use?
options
1. select max (emp_sal) from employee
2. max (emp_sal) from employee
3. select maximum (emp_sal) from employee
4. select max (empsal) from employee
correct answer :-> 1
which keyword would you use to change the column heading?
options
1. select
2. where
3. alias
4. from
correct answer :-> 3
what is the syntax for using the select statement?
options
1. select column_list
2. select from table_name
3. select table_name
4. select column_list from table_name
correct answer :-> 4
which string function is used to convert a character expression into upper case?
options
1. ltrim
2. rtrim
3. upper
4. lower
correct answer :-> 3
to retrieve data based on multiple search conditions, you use:
options
1. logical operators.
2. comparison operators.
3. union operators.
4. assignment operators.
correct answer :-> 1
lee mitchell at new tech books needs to display the total number of books
available in the bookshop. which function will he use to obtain the result?
options
1. avg
2. max
3. count
4. sum
correct answer :-> 3
when you convert ntext data type to nchar or nvarchar data types, you can specify
the maximum length of the data types as:
options
1. 3,000 characters.
2. 4,000 characters.
3. 8,000 characters.
4. 5,000 characters.
correct answer :-> 2
which of the following comparison operators are not used with the where clause?
options
1. equal
2. between
3. in
4. like
correct answer :-> 1
which mathematical function would you use to obtain the exponential value of a
numeric expression?
options
1. round
2. sqrt
3. exp
4. abs
correct answer :-> 3
which date function would you use to obtain the current system date and time?
options
1. dateadd
2. datediff
3. datepart
4. getdate
correct answer :-> 4
in the syntax, select column list from table_name where expression1 comparison
operator expression1, expression1 represents a:
options
1. column.

2. table.
3. row.
4. value.
correct answer :-> 1
when you convert image data type to binary or varbinary data types, you can
specify the maximum length of the data types as:
options
1. 8,000 characters.
2. 3,000 characters.
3. 4,000 characters.
4. 6,000 characters.
correct answer :-> 1
which function always returns the same values with a specific set of input values?
options
1. deterministic functions
2. non-deterministic functions
3. string functions
4. logical functions
correct answer :-> 1
identify the sql statement, which will retrieve a list of employees from the table
employees with the column heading for emp_id as employee identity number.
options
1. select distinct emp_id (employee identity number) from employees
2. select emp_id like employee identity number from employees
3. select emp_id as [employee identity number] from employees
4. select emp_id =employee identity number from employees
correct answer :-> 3
which clause would you use to retrieve data selectively from rows?
options
1. select
2. where
3. distinct
4. from
correct answer :-> 2
which mathematical function would you use to obtain the smallest integer value
from a numeric expression?
options
1. ceiling
2. floor
3. sqrt
4. round
correct answer :-> 1
which string function is used to convert a character expression into lower case?
options
1. ltrim
2. upper
3. lower
4. rtrim
correct answer :-> 3
which date function would you use to extract the day from the specified date?
options
1. datepart
2. dateadd
3. day
4. datediff
correct answer :-> 3
which date function would you use to extract a specified part, such as day, month,
or year from the specified date?
options
1. datepart
2. dateadd
3. datediff
4. datename
correct answer :-> 1
identify the valid set of operators.
options
1. =, <>, =!, >>
2. ==, ><, !=, !<
3. >, >=, !=, !<
4. ?.,!>,>==,(
correct answer :-> 3
which date function would you use to extract the month from the specified date?
options
1. dateadd
2. month
3. day
4. datepart
correct answer :-> 2
which command would you use to retrieve all the products stored in the product
table?
options
1. select * from product
2. select *
3. select products from product
4. select * from product
correct answer :-> 4
which function would you use to obtain the average age of employees?
options
1. avg(*)
2. avg
3. average(*)
4. average
correct answer :-> 2
while writing the sql the programmer came across columns, which were not very
meaningful to the end user. which of the following features of sql helped the
programmer save time:
options
1. short table names.
2. table aliases.
3. rename aliases.
4. column aliases.
correct answer :-> 4
which clause would you use to retrieve unique rows from a result?
options
1. select
2. where
3. distinct
4. from
correct answer :-> 3
which string function would you use to extract a part of a character string with
the specified number of characters from the left?
options
1. ltrim
2. lower
3. left
4. len
correct answer :-> 3
which symbol would you use to select all the columns from a table?
options
1. =
2. <
3. *
4. +
correct answer :-> 3
which command would you use to generate a list of items with minimum quantity less
than 500 from the goods table?
options
1. select * from goods where quantity<500
2. select items from goods where quantity=500
3. select items where quantity<500 from goods
4. select * where quantity =500 from goods
correct answer :-> 1
which string function would you use to extract a part of a character string with
the specified number of characters from the right?
options
1. rtrim
2. reverse
3. len
4. right
correct answer :-> 4
which date function would you use to obtain a date after adding a time period or
an interval to the specified date?
options
1. datepart
2. datename
3. datediff
4. dateadd
correct answer :-> 4
the two types of conversion functions are:
options
1. aggregate and convert.
2. string and cast.
3. cast and convert.
4. string and convert.
correct answer :-> 3
which function would you use to perform calculations on columns with different
datatypes?
options
1. string function
2. mathematical function
3. date function
4. aggregate function
correct answer :-> 2
which mathematical function would you use to round off the numeric expression?
options
1. floor
2. ceiling
3. round
4. sqrt
correct answer :-> 3
which keyword would you use to retrieve data from a table?
options
1. where
2. alias
3. from
4. select
correct answer :-> 4
which string function is used to remove trailing blanks from character expression?
options
1. rtrim
2. lower
3. upper
4. ltrim
correct answer :-> 1
to perform calculations on numeric data, you use:
options
1. arithmetic operators.
2. union operators.
3. assignment operators.
4. mathematical operators.
correct answer :-> 1
at presco, inc. jerry smith is assigned the task of calculating the cost of all
types of bottles. which function should jerry smith use?
options
1. max
2. count
3. avg
4. sum
correct answer :-> 4
which string function would you use to retrieve the number of characters in an
expression?
options
1. left
2. ltrim
3. len
4. lower
correct answer :-> 3
which operator you use to specify an inclusive range in the search condition?
options
1. between operator
2. in operator

3. range operator
4. list operator
correct answer :-> 1
---------------------------------------------------------------------
implementing business logic.doc
identify the correct code which uses the case statement to assign the correct
designation based on the emp_code?
options
1. select emp_name, designation=,
case emp_grade
when 'e1' then 'trainee'
when 'e2' then 'associate'
end
from employee
2. select emp_name, designation=,
case emp_grade
if 'e1' then 'trainee'
if 'e2' then 'associate'
end
from employee
3. select emp_name, designation=,
case emp_grade
when 'e1' then 'trainee'
when 'e2' then 'associate'
end
from employee
4. select emp_name, designation=,
case emp_grade
when 'e1' designation= 'trainee'
when 'e2' designation='associate'
end
from employee
correct answer :-> 1
randy wants to create a function that returns the order id and the cost of the
order from the orders and the sales tables. identify the correct code, which
creates the function?
options
1. create function dbo.fx_order_cost(@orderid )
returns table
as
return (select orderid,cost from orders,sales where orders.orderid=sales.orderid
and orderid=@orderid)
2. create function dbo.fx_order_cost(@orderid numeric(9))
returns table
as
return (select orderid,cost from orders,sales where orders.orderid=sales.orderid
and orderid=@orderid)
3. create function dbo.fx_order_cost(@orderid numeric(9))
returns table
as
(select orderid,cost from orders,sales where orders.orderid=sales.orderid and
orderid=@orderid)
4. create function dbo.fx_order_cost(@orderid numeric(9))
as
return (select orderid,cost from orders,sales where orders.orderid=sales.orderid
and orderid=@orderid)
correct answer :-> 2
which of the following arguments cannot be used while executing a stored
procedure?
options
1. output
2. default
3. with encryption
4. with recompile
correct answer :-> 3
joan wants to execute the stored procedure sp_employee_list after a certain time
period. identify the correct statement which executes a stored procedure after a
given time period?
options
1. waitfor delay �00:00:10�
exec sp_employee_list
2. waitfor delay �30:00:00�
exec sp_employee_list
3. waitfor delay �30�
exec sp_employee_list
4. waitfor delay �30 sec�
exec sp_employee_list
correct answer :-> 1
which of the following cannot be used to enforce data integrity?
options
1. rules
2. defaults
3. stored procedures
4. constraints
correct answer :-> 3
identify the valid range for specifying the severity in a raiserror statement.
options
1. 1-25
2. 25-50
3. 1-100
4. 1-127
correct answer :-> 1
lisa wants to add a check constraint to restrict the cities being added in the
supplier_city column and also wants to check the existing rows in the table for
any violation of this constraint. which option should she specify while creating
the constraint?
options
1. with nocheck
2. with check
3. with recompile
4. with encryption
correct answer :-> 2
andy wants to restrict the values to be entered in the emp_salary column to fall
between $5000 and $15000. which of the following statements provides him the
desired functionality?
options
1. alter table employee add constraint chkemp_sal check (emp_salary between
5000 and 15000)
2. alter table employee check (emp_salary between 5000 and 15000)
3. alter table employee add constraint chkemp_sal check (emp_salary in 5000 and
15000)
4. alter table employee add constraint chkemp_sal check (emp_salary like 5000
and 15000)
correct answer :-> 1
allen wants to delete the function dbo.fx_order_cost. which command deletes the
function from the database?
options
1. drop function
2. delete function
3. edit function
4. remove function
correct answer :-> 2
sam wants to use labels in the stored procedure he is creating.identify the
correct definition for a label so that he can use labels correctly?
options
1. a label is used to specify a point in an application after which the
processing of the t-sql statements begin if the goto statement is targeted at that
point
2. a label is used to describe the purpose of a stored_procedure
3. a label is used to specify a point in an application after which the
processing of the t-sql statements begin after the break statement
4. a label is used to include comments in a batch or stored procedure
correct answer :-> 1
which of the following statements is the correct explanation for domain integrity?

options
1. it ensures that the relationship defined between tables is preserved when
records are entered or deleted
2. it defines a row as a unique entity for a particular table and ensures that
each row in a table is unique and no row is duplicated
3. it ensures that the user enters only a valid range of values in a given
column
4. it allows the user to define specific rules according to his business
requirements
correct answer :-> 3
which of the following statements is not true for a stored procedure?
options
1. you use the procedure_name parameter to specify the name of the new stored
procedure. the name should be unique within the database
2. you use the number parameter to group the procedures of the same name. this
is an optional parameter
3. you use the parameter parameter to specify the name of the parameter along
with the procedure name. you can declare a maximum of 2,100 parameters in a create
procedure statement.
4. you use the with recompile parameter to specify that sql server recompile
the stored procedure first time it is executed
correct answer :-> 4
which of the following statements is incorrect about data integrity?
options
1. a primary key constraint ensures that there is no null or duplicate value in
a given column of a table.
2. a check constraint ensures that only a specific set of values is entered in
a given column of a table.
3. a unique key constraint ensures that similar columns across tables in a
database contain consistent values.
4. a default ensures that a constant value is entered in a column if the user
does not specify one.
correct answer :-> 3
david wants to define a unique constraint on the column emp_name. which of the
following successfully creates a unique constraint on the column?
options
1. alter table employee add constraint with nocheck (unkname) unique(emp_name).
2. alter table employee with nocheck add constraint (unkname) unique(emp_name).
3. alter table employee add constraint with check (unkname) unique(emp_name).
4. alter table employee add unique constraint with nocheck (emp_name).
correct answer :-> 2
which of the following statements is true to describe the continue statement?
options
1. you use the continue statement to exit the while statement. the control is
passed to the beginning of the while statement
2. you use the continue statement to restart the break statement. the control
is passed to the beginning of the while statement
3. you use the continue statement to restart the while statement. the control
is passed to the beginning of the while statement
4. you use the continue statement to restart the while statement. the control
is passed after the continue statement
correct answer :-> 3
which type of data integrity defines a row as a unique entity for a particular
table and also ensures that each row in a table is unique and no row is
duplicated?
options
1. entity integrity
2. domain integrity
3. referential integrity
4. user-defined integrity
correct answer :-> 1
which of the following statements is used to assign multiple conditions and return
one of the conditions as the result expression?
options
1. execute
2. print
3. set
4. case
correct answer :-> 4
how many parameters can be passed in a function?
options
1. 256
2. 1024
3. 2100
4. 64
correct answer :-> 2
sam wants to execute the stored procedure comp_proc writing the following code.
�exec comp_proc with encryption
go� ? upon execution the statement gives an error. what is the reason for the
error ?
options
1. encryption is not supported while executing a stored procedure
2. he needs to write �execute� instead of exec
3. he does not have rights to execute a stored procedure
4. go keyword is not required
correct answer :-> 1
identify the statement, which correctly creates a foreign key constraint in the
employee table?
options
1. alter table employee add constraint fkdepcode foreign key (dep_code)
references department(dep_code)
2. alter table employee add foreign key (dep_code) references
department(dep_code)
3. alter table employee add constraint fkdepcode foreign key (dep_code)
references department(emp_code)
4. alter table add constraint fkdepcode foreign key (dep_code) references
(dep_code)
correct answer :-> 1
elena, the hr executive at presco, wants to define a primary key on the employee
table that has the emp_code and the dept_code as the keys. to define the primary
key, you need to:
options
1. define emp_code as the primary key and the dept_code as the unique key.
2. define emp_code and the dept_code as composite unique keys.
3. define emp_code and the dept_code as the composite primary key
4. define emp_code and dept_code as unique keys
correct answer :-> 3
jenny needs to restrict the range of cities that can be entered into the
supplier_city field. which type of data integrity should she use to do so?
options
1. entity integrity
2. domain integrity
3. referential integrity
4. user-defined integrity
correct answer :-> 2
which of the following is not a type of a user-defined function?
options
1. scalar function
2. inline table-valued function
3. security function
4. multi statement table-valued function
correct answer :-> 3
which of the following statements is true to describe the break statement?
options
1. you use the break statement to exit from the while statement. the control is
passed to the statement following the continue statement
2. you use the break statement to terminate from the while statement. the
control is passed to the statement following the end statement
3. you use the break statement to start from the while statement. the control
is passed to the statement following the end statement
4. you use the break statement to exit from the while statement. the control is
passed to the statement following the end statement
correct answer :-> 4
james wants to display the current date on the report sheet he is generating using
the query analyzer. help him to identify the correct code which assign the current
date to the variable @hiredate?
options
1. declare @hiredate datetime
select @hiredate=getdate()
print@hiredate
2. declare hiredate
select hiredate=getdate()
print hiredate
3.
select @hiredate=getdate()
print@hiredate
4. declare @hiredate
select getdate()=@hiredate
print@hiredate
correct answer :-> 1
ron has created a stored procedure, which selects data from sales tables and
orders tables and creates a view to store the data. however this procedure does
not work because:
options
1. he does not have rights to create views and tables
2. the syntax is incorrect
3. the database does not allow users to create tables or views
4. you cannot create a table or a view using stored procedures
correct answer :-> 4
jason wants to use stored procedures to make his application more efficient. help
him to identify which of the following is not a benefit of using stored
procedures?
options
1. help in modular programming
2. streamline code execution
3. speedup web page download
4. provide security
correct answer :-> 1
which of the following is a valid script?
options
1. create database sales
go
create table items
(item_no int, item_price money))
go
2. create database sales
go
create table items
(item_no int, item_price money))
go
create default item_price as
200
go
3. create database sales
use database sales
create table items
(item_price money))
create default item_price as
200
go
4. create database sales
create table items
(item_no int, item_name
char(20), item_price money))
go
create default item_price as
200
go
correct answer :-> 0
which command successfully inserts the current date automatically in the column
hiredate in table employee?
options
1. alter table employees add default getdate()
2. alter table employees add constraint defdate ,getdate() for hiredate
3. alter table employees add default getdate() for hiredate
4. alter table employees add constraint defdate default getdate() for hiredate
correct answer :-> 4
which of the following is not a keyword used in the while statement?
options
1. end
2. break
3. when
4. continue
correct answer :-> 3
which of the following statements is used to assign a value to a variable?
options
1. execute
2. print
3. set
4. case
correct answer :-> 3
which system stored displays the text of the stored procedures, views and tables?
options
1. sp_server_info
2. sp_help
3. sp_databases
4. sp_helptext
correct answer :-> 4
richard wants to write a code to execute multiple t-sql statements. which control-
of-flow statements should richard use?
options
1. begin�..end
2. if�.else
3. case
4. while
correct answer :-> 1
which of the following is optional while defining a primary key constraint?
options
1. clestered|nonclustered keywords
2. constraint_name
3. keyword constraint
4. column_name.
correct answer :-> 1
network systems inc are supplied hardware items by finex hardware inc. for all
their purchases they require the supplier name to be added automatically as finex.
they can do this using the:
options
1. check constraint.
2. primary key constraint.
3. default.
4. unique constraint
correct answer :-> 3
which of the following statements is true for a foreign key constraint?
options
1. foreign key cannot be created within two columns of the same table
2. foreign key column cannot have duplicate values
3. only one column can be set as a foreign key in a table
4. a column set as the foreign key must have the same datatype as the primary
key column
correct answer :-> 4
adam wants to maintain referential integrity between the sales table and the
customer table on the column cust_id. he can do this using a:
options
1. primary key constraint.
2. foreign key constraint.
3. unique constraint.
4. check constraint.
correct answer :-> 2
lisa wants to view the performance statistics of sql server. which stored
procedure can she refer to, to obtain the details she requires ?
options
1. sp_server_info
2. sp_databases
3. sp_monitor
4. sp_help
correct answer :-> 3
which system stored procedure is used to obtain a list of all the databases in the
server?
options
1. sp_server_info
2. sp_databases
3. sp_password
4. sp_who
correct answer :-> 2
which of the following statements comprise of a correct batch?
options
1. use northwind
select * from employees
go.
2. use pubs
create table publisher_detils as select * from publisher
insert into publisher_details values(select * from publisher)
3. create view supp_details as select * from suppliers.
execute
4. create table employee_history(emp_id numeric,emp_name char)
insert into employee_history (select emp_id,emp_name from employee)
correct answer :-> 1
ron wants to store the current date as the date of joining automatically whenever
he creates a new record for an employee without entering the date. which method
enables him to do so?
options
1. check constraint
2. foreign key constraint
3. default
4. not null
correct answer :-> 3
which of the following is not a parameter for the declare statement?
options
1. @local_variable
2. data_type
3. [�.n]
4. return
correct answer :-> 4
which system-stored procedure is used to rename a database on a server?
options
1. sp_rename
2. sp_renamedb
3. sp_password
4. sp_who
correct answer :-> 2
linda wants to write a stored procedure where she can exit from the stored
procedure unconditionally. which keyword should she use to do so?
options
1. break
2. return
3. continue
4. goto
correct answer :-> 2
which of the following does hold true for a primary key constraint?
options
1. primary key constraint does not allow any null value to be entered in the
column.
2. primary keys are used with foreign keys to enforce referential integrity.
3. only one primary key constraint can be created on a table.
4. primary keys allow duplicate values in the column on which it is defined.
correct answer :-> 4
which of the following statements is not true for a non-clustered index?
options
1. a non-clustered index does not physically sort the data in a table but
creates a separate index structure
2. a non-clustered index is slower in performance than a clustered index
3. there can be as many as 249 non-clustered indexes for each table
4. the non-clustered index arranges the data in ascending order of the primary
key
correct answer :-> 4
which of the following statements is not true for a primary key constraint?
options
1. a primary key constraint does not allow null or duplicate values
2. you cannot have more than one primary keys in a table.
3. primary key constraint can be created on only one column in a table
4. a clustered index is automatically created when a primary key constraint is
defined on a table.
correct answer :-> 3
which of the following statements can be used within a batch?
options
1. create default.
2. create procedure
3. create trigger
4. select from <table>
correct answer :-> 4
which of the following is not a control of flow statement?
options
1. go to
2. execute
3. end�.if
4. while
correct answer :-> 2
sam wants to use make the code he has written more explanatory by using comments
within the code. help him to identify the correct symbols to insert comments
within a code?
options
1. --*
2. @@
3. (
4. /*�*/
correct answer :-> 4
which of the following does not allow duplicate values in a column but allows a
null value?
options
1. primary key constraint
2. foreign key constraint
3. check constraint
4. unique key constraint
correct answer :-> 4
which of the following is not a method to enforce domain integrity?
options
1. check constraint
2. not null constraint
3. default
4. foreign key constraint
correct answer :-> 4
which of the following is not a keyword of the case construct?
options
1. when
2. if
3. then
4. else
correct answer :-> 2
which of the following statements is used to raise user-defined errors while
executing a batch of sql statements?
options
1. raiserror
2. print
3. set
4. case
correct answer :-> 1
which of the following is not a valid value for the with option while writing a
raiserror statement?
options
1. nowait
2. return
3. log
4. seterror
correct answer :-> 2
which of the following rules is not correct for a stored procedure?
options
1. you can execute a procedure that calls another procedure. the called
procedure can access the objects created by your procedure.
2. you can reference an object in your stored procedure that does not exist in
the database. you need to ensure that the object exists at the time of executing
the stored procedure.
3. you can create, recreate, or drop objects within a stored procedure. you
can, therefore, use the create, drop, and select into statements in your stored
procedure.
4. you can create a private temporary table inside a stored procedure. this
temporary table exists only for the purposes of the stored procedure. the
temporary table disappears when you exit the stored procedure.
correct answer :-> 3
when records are entered or deleted?
options
1. entity integrity
2. domain integrity
3. referential integrity
4. user-defined integrity
correct answer :-> 3
john wants to add a check constraint without checking the existing rows in the
table. which option should he specify while creating the constraint?
options
1. with nocheck
2. with check
3. with recompile
4. with encryption
correct answer :-> 1
identify the statement that is used to display the value stored in a variable?
options
1. set
2. declare
3. print
4. execute
correct answer :-> 3
--------------------------------------------------------------------

idd1.doc

10.
a rule can be bound using the system-stored procedure named:

sp_bindrule

sp_help

sp_helptext

sp_unbindrule

11.
you are a sql database administrator. you are developing a database for your
company. you create a sales table as follow:
create table customer ( id int identity not null, lastname varchar (50) not null,
firstname varchar (50) not null, phone varchar (15) not null, email var char (255)
null )
you have successfully extracted all of the existing customer data from a legacy
database into a tab-delimited flat file. you now need to populate the sales table
with the customer information. currently the text file is in the following format:
name phone e-mail
adam green 301-555-1011 ab@adat.com karen blue 301-555-7111 kb@woodgrove.corn
what should you do to proceed with the transfer?

use the bcp utility

use the bulk insert statement

use the dts utility

use the select into statement

12.
gamefun inc. is a multinational organization that creates gaming software. the
head office of the organization has recently acquired some new products that will
help them increase the interactivity in their games. these products need to be
copied to the branch offices across the world. identify the kind of replication
that should be used in this scenario.

central publisher

central publisher with remote distributor

republisher

central subscriber

13.
which database is used by sql server to sort data before returning results to the
user?

master

msdb
tempdb

model

14.
which stored procedure is used to display information on a database object or a
user-defined datatype?

sp_lock

sp_helptext

sp_help

sp_helpuser

15.
jane is the chief publishing manager at deltasigma inc. needs to perform some
import and export tasks on the pubs database. she prefers to do things
graphically. which of the following tools may be useful for her?

select into statement

dts utility

bcp utility

bulk insert statement

16.
identify the statement that limits the number of rows returned in the result set.

the select statement with where clause

group by

the top clause used with the select statement

the distinct keyword in the select statement

17.
identify the comparison operators that controls precedence.

!>

!<

( )

!=

18.
which keyword in the where clause specifies an inclusive range to search?

between

not between
or

and

19.
which of the following sql statements will you use to retrieve the first ten rows
of the titles tables?

select * from titles where count(*) = 10

select count(10) from titles

select top(10) from titles

select top 10 * from titles

20.
identify the string function that removes leading blanks from the character
expression.

ltrim

lower

left

len

21.
identify the statement that limits the number of rows returned in the result set.

the select statement with where clause

group by

the top clause used with the select statement

the distinct keyword in the select statement

22.
cts refers to:

class type system

common type system

construction type system

component type system

23.
the default value of selectionmode property of listbox control is:

none

one
multisimple

multiextended

24.
clr enforces restrictions on managed code to provide code access security. this is
done through the use of objects. these objects are called

gac

cts

cls

permissions

25.
which of the following options correctly declare a variable in vc#?

int x = 5;

dim x as integer

dim x as integer;

dim int x = 5;

26.
you need to execute a data command. which of the following properties should you
set for specifying the connection?

connection, commandtext, and the parameters properties for the data command.

connection, commandtype, and the parameters properties for the data command

proposedvalue, commandtext, and the datarowversion properties for the data


command.

proposedvalue, commandtext, and the parameters properties for the data command.

27.
which access modifier can not be used with data members of a structure?

public

protected

friend

private

28.
which of the following statements is not true about procedures?

procedures are reusable.

procedures are the key to modular programming.


procedures do not help in debugging an application.

procedures can be called multiple times in a single program.

29.
which of the following statements is not true about parameter array?

parameter array cannot be used more than once in a procedure.

the parameter array must be passed by reference.

the parameter array is optional and the default value of a parameter array is an
empty one-dimensional array.

each element of the parameter array must be of the same data type as the data type
of paramarray.

30.
consider the following statements: statement a: there are two types of user
interfaces, character user interface and (cui) and graphical user interface (gui).
statement b: in cui, you can interact with an application by entering commands.
which of the following is correct with respect to the above statements?

both, statement a and statement b, are false.

a.both, statement a and statement b, are true.

statement a is true and statement b is false.

statement a is false and statement b is true.

31.
consider the following statements: statement a: a static variable is created in
memory each time a new object of the class is created. statement b: a static
variable is initialized automatically and the default value depends on its data
type. which of the following is correct with respect to the above statements?

both, statement a and statement b, are false.

both, statement a and statement b, are true.

statement a is true and statement b is false.

statement a is false and statement b is true.

32.
which of the following statements hold true for the goto statement?

the goto statement executes the block of code that is associated with the value of
the controlling expression.

the goto statement transfers the control to a statement that is identified by a


label.

the goto statement executes a block of code based on the value of a boolean
expression.
the goto statement consists of an initialization expression, a condition, and an
increment statement.

33.
which of the following statements is not true about dataset?

a dataset is a cached set of records that are retrieved from a database.

a dataset acts like a virtual database containing tables, rows, and columns.

by default, the table and column names in a dataset are case-insensitive.

data cannot be filtered in a dataset by setting its casesensitive property to true


or false.
34.
xsd refers to:

xml system data

xml system definition

xml schema definition

xml schema data

35.
which of the following statements is not true about currencymanager object?

if all the windows form controls are bound to a single data source, the form will
have only one currencymanager object associated with it.

for every data source that is bound to a windows form control, there exists a
currencymanager object.

the currencymanager object handles the binding to the data source by keeping a
pointer to the current item in the record list.

the currencymanager class is not derived from bindingmanagerbase class.

36.
which of the followings is the benefit of disconnected data architecture?

disconnected data architecture saves valuable system resources.

automatic memory management

standard type system

application interacts with database is for a long duration.

37.
which of the following statements hold true for table-based mapping?

table-based mapping is used for data transfer between an xml document and a
relational database.

in table-based mapping, the data in the xml document is organized in a


hierarchical manner.

table-based mapping is used for data transfer between xml documents.

table-based mapping is used for data transfer between non-relational databases.

38.
which of the following components can be used to retrieve data from a database
into a dataset?

data adapter

data set

data command

ole adapter

39.
_____________ event is raised by the datatable object.this event is raised after
the columnchanging event.

rowchanging

columnchanged

rowchanged

rowdeleted

40.
when the dataset is accessed for the first time, the datarowversion property has
the __________ version.

original

current

proposed

default

41.
which of the following is not a part of the edit relation dialog box?

parent element

child element

update rule

insert rule

42.
which of the following events is raised when the value of a column of the
datacolumn for a datarow object has been changed.
columnchanging

columnchanged

modified

rowchanging

43.
which of the following statements hold true for the pull model?

when pull model is used to access data from the data source, the developer writes
the code to connect to the data source and retrieve data from it.

the pull model allows filtered data access by crystal report

the pull model is generally useful for connection sharing scenarios

when pull model is used to access data from the data source, the database driver
directly retrieves the data from the data source.

--------------------------------------------------------------------------
question text
implementing database design

1.identify the statement that limits the number of rows returned in the result
set.

options
1. the select statement with where clause
2. group by
3. the top clause used with the select statement
4. the distinct keyword in the select statement
correct answer :-> 3

2.identify the operators that allow row retrieval from a table based on the
condition specified in the where clause.

options
1. logical operators
2. comparison operators
3. range operators
4. arithmetic operators
correct answer :-> 2

3.identify the operator that allows the selection of values that match any one of
the values in a list.

options
1. in
2. and
3. or
4. not
correct answer :-> 1

4.which of the following sql statements will you use to retrieve the first ten
rows of the titles tables?
options
1. select * from titles where count(*) = 10
2. select count(10) from titles
3. select top(10) from titles
4. select top 10 * from titles

correct answer :-> 4

5.identify the date function that returns datepart from the listed date as an
integer.

options
1. dateadd
2. datediff
3. datename
4. datepart
correct answer :-> 4

6.which join type enables you to display data from multiple tables after comparing
values present in a common column?

options
1. inner join
2. outer join
3. cross join
4. equi join
correct answer :-> 1

7.a join that includes more than one table without any condition in the on clause
is called :

options
1. inner join
2. outer join
3. cross join
4. equi join
correct answer :-> 3

8.which constraint is used to enforce uniqueness on non-primary key columns?

options
1. primary key constraint
2. unique constraint
3. check constraint
4. default constraint
correct answer :-> 2

9.a rule can be bound using the system-stored procedure named:

options
1. sp_bindrule
2. sp_help
3. sp_helptext
4. sp_unbindrule
correct answer :-> 1

10.which keyword is used to specify whether the existing data is to be checked for
a newly added constraint or a re-enabled constraint?

options
1. with check
2. with nocheck
3. add constraint
4. constraint
correct answer :-> 1
11.groups of sql statements submitted together to sql server for execution are
called:

options
1. batches
2. variables
3. comments
4. messages
correct answer :-> 1

12.which command is used to find out whether the table or index is heavily
fragmented?

options
1. dbcc showcontig
2. dbcc indexdefrag
3. create index
4. fill factor
correct answer :-> 1
13.identify the advantage of views.

options
1. providing relevant data for users
2. increasing data complexity
3. organizing data from homogeneous sources
4. creates a table
correct answer :-> 1

14.identify the correct option about nonclustered index.

options
1. in a nonclustered index, the data is physically sorted.
2. in a nonclustered index, logical order of the index, is the same as the
physically sorted order of the corresponding rows.
3. in a nonclustered index, logical order of the index does not match the
physically sorted order of the rows on the disk.
4. nonclustered index is not created on columns used in joins and where clauses.
correct answer :-> 3
15.during delete trigger processing, the deleted rows are stored in the:

options
1. inserted table
2. deleted table
3. #deleted table
4. updated table
correct answer :-> 2

16.which two tables does the update trigger makes use of?

options
1. the inserted table and the deleted table
2. the inserted table and the trigger table
3. the inserted table and the updated table
4. the deleted table and the trigger table
correct answer :-> 1
17.you need to create a stored procedure for retrieving all the rows from the
titles table where the title name is �the busy executive�s database guide�
identify the stored procedure for the problem described.

options
1. create procedure prctitles
as
select * from titles
where title = 'the busy executive''s database guide'

2. create proc prctitles


as
select * from titles
where title = 'the busy executive's database guide.'

3. create procedure prctitles


as
select * from titles
where title = 'the busy executive'sdatabase guide'

4. create proc prctitles


as
select * from titles
where title = 'the busy executive''s database guide.'

correct answer :-> 1


18.which of the following is true about cursors?
a. you need to set cursor attributes before opening a cursor.
b. you can modify the current row in the result set returned by a cursor.
c. you cannot view the data modified by other users in the result set returned by
a cursor.
d. you can navigate through the result set returned by a cursor, one row at a time
in a sequential manner.

options
1. a
2. b
3. c
4. d
correct answer :-> 1
19.you are a sql database administrator. you are developing a database application
for your
company's accounting department. this application includes many integrated
modules.
users frequently encounter deadlocks whenever someone performs a function that
integrates
data from multiple modules. how do you minimize these deadlocks?

options
1. you need to ensure that all transactions are modifying the tables in the same
order.

2. you need to ensure that all transactions are modifying the tables in the
reverse order.

3. you need to ensure that all transactions are modifying the tables in different
orders.

4. you need to ensure that all transactions are modifying the tables according to
the preset execution plan provided by the query optimizer.

correct answer :-> 1

20.which statement describes the atomicity property of transactions?

options
1. data modification made by a transaction is independent of the modifications
made
by other transactions.
2. all the data modifications are performed or none of them is performed.
3. any change in data by a completed transaction remains permanently in effect in
the system.
4. all data is in a constant state after a transaction is completed successfully.
correct answer :-> 2
21.which tool of enterprise manager is used to monitor various events that occur
in sql server?

options
1. sql profiler
2. generate sql script
3. sql query analyzer
4. sql server configuration properties
correct answer :-> 1
22.ed is the database administrator at flyfastcouriers.
the company is upgrading its sql server and wants to store details such as size
and data of
creation, of all its databases. help ed view the required information.

options
1. sp_helptext
2. sp_databases
3. sp_help
4. sp_helpdb
correct answer :-> 4
23.which stored procedure is used to display information on a database object or a

user-defined datatype?

options
1. sp_lock
2. sp_helptext
3. sp_help
4. sp_helpuser
correct answer :-> 3
24.a database cannot be made smaller than the:

options
1. master database
2. model database
3. tempdb database
4. msdb database
correct answer :-> 2
25.ed robbins is a sql database administrator. ed is developing a database for his
company.
this database will be based on sql 2000, and will be accessed by every user in the
company.
in within the database there is a table called emp. every user should be able to
only select
and insert into emp. john and mary are the only exceptions. they can issue any
sort of ddl to
emp. how do you quickly configure the required related permissions without
involving unnecessary
overheads?

options
1. create a new role called emp, and assign the appropriate permissions for the
users to this role. exclude john and mary from this role.

2. create a new role called emp, and assign the appropriate permissions for the
users to this role. include john and mary in this role.

3. create a new role called emp, and assign the appropriate permissions for the
users to this role. include john and mary in this role. individually add the
update permission to john and mary.

4. assign the select and insert permissions of emp to the public database role.
give john and mary the role db_ddladmin.

correct answer :-> 4


26.you are managing a sql server database for the trade department. jim who is the
trade
manager needs to perform data transfer between sql server and oracle. which of the
following
tools will you recommend jim to use?

options
1. select into statement
2. bcp utility
3. dts utility
4. bulk insert statement
correct answer :-> 3
27.which bcp option is used to manage the errors that take place during the
transfer of data?

options
1. -c
2. -m
3. -e
4. -b
correct answer :-> 2
28.which for xml clause option specifies the conversion of a multi table query
into a nested
set of xml statements?

options
1. raw
2. auto
3. explicit
4. elements
correct answer :-> 2
29.you are a database developer for the adatax corporation. you are creating a
database that
will store statistics for 16 different high school sports. this information will
be used by
53 companies that publish sports information on their web sites. what sql 2000
statement /
clause may be used?

options
1. the for xml clause

2. data transformation services

3. bulk copy utility


4. the group by and roll up clause
correct answer :-> 1
30.%23 is the hexadecimal value for:

options
1. #
2. $
3. %
4. @
correct answer :-> 1
31.identify the string function that removes leading blanks from the character
expression.

options
1. ltrim
2. lower
3. left
4. len
correct answer :-> 1
32.identify the system function that returns the current
host process id number of a client process.

options
1. host_id ()
2. host_name ()
3. user_name ([user_id])
4. db_id (['db_name'])
correct answer :-> 1
33.which operator is used to combine the result set of two or more queries?

options
1. union
2. in
3. having
4. group by
correct answer :-> 1
34.which keyword uses wildcard to ensure that the values entered in specific
columns are
of a certain pattern?

options
1. the like keyword
2. the between keyword
3. the null keyword
4. the not null keyword
correct answer :-> 1
35.consider the following statements:
single_user is the default state option for a database.
restricted_user allows only the members of the db_owner role to use the database.

options
1. statements a and b are true.
2. statements a and b are false.
3. statement a is true and statement b is false.
4. statement b is true and statement a is false.
correct answer :-> 2

36.you are a sql database administrator. you are developing a database for your
company.
you create a sales table as follow:
create table customer ( id int identity not null, lastname varchar (50) not null,
f
irstname varchar (50) not null, phone varchar (15) not null, email var char (255)
null )
you have successfully extracted all of the existing customer data from a legacy
database
into a tab-delimited flat file. you now need to populate the sales table with the
customer
information. currently the text file is in the following format:
name phone e-mail
adam green 301-555-1011 ab@adat.com karen blue 301-555-7111 kb@woodgrove.corn
what should you do to proceed with the transfer?

options
1. use the bcp utility
2. use the bulk insert statement
3. use the dts utility
4. use the select into statement
correct answer :-> 3

37.which stored procedure is used to add users to a server role?

options
1. sp_addlogin

2. sp_adduser
3. sp_srvaddrolemember
4. sp_addsrvrolemember

correct answer :-> 4


38.identify the system-stored procedure that is used to provide information about
a database
object or a user-defined datatype?

options
1. sp_help
2. sp_droptype
3. sp_bindrule
4. sp_unbindrule
correct answer :-> 1
39.how is xml data retrieved in sql server 2000?
options
1. by the opendatasource clause alone

2. by the for xml clause alone

3. by the select statement and the for xml clause

4. by the openxml rowset provider

correct answer :-> 3


41.which of the following is true about a trigger?

options
1. a trigger needs to be explicitly executed.
2. a trigger is fired when the truncate table statement is issued.
3. a trigger can monitor unauthorized changes in data.
4. a trigger can return data to the user.
correct answer :-> 3
42.you need to create a function that will return the names of all publishers who
live in
the country specified by the user at run time. which of the following functions
will display
the required result?

options
1. create function dispname(@country varchar(30))
returns table
as
begin
select * from publishers where country = @country
end
select * from dispname('germany')

2. create function dispname(@country varchar(30))


returns varchar(30)
as
begin
select * from publishers where country = @country
end
select * from dispname('germany')

3. create function dispname(@country varchar(30))


returns table
as
return(select * from publishers where country = @country)
select * from dispname('germany')

4. create function dispname(@country varchar(30))


returns table
as
begin
return(select * from publishers where country = @country)
end
select * from dispname('germany')

correct answer :-> 3


43.which of the following is true regarding the processing of rows in cursors?
options
1. you need to set cursor attributes before opening a cursor.
2. you can modify the current row in the result set returned by a cursor.
3. you cannot view the data modified by other users in the result set returned by
a cursor.
4. you can navigate through the result set returned by a cursor, one row at a time
in a
sequential manner.

correct answer :-> 1


44.you are a database developer for trender research. you create two transactions
to support
the data entry of employee information into the company's database.
one transaction inserts employee name and address information into the database.
the other transaction inserts employee demographics information into the database.

this transaction is less important than the first transaction. the database
administrator
has notified you that the database server occasionally encounters errors during
periods of
high usage. each time this occurs, the database server randomly terminates one of
the
transactions. which of the following might need to be set?

options
1. deadlock_priority for the transaction

2. rowlock locking hint

3. set the read repeatable isolation level

4. set the serializable isolation level

correct answer :-> 1


45.gamefun inc. is a multinational organization that creates gaming software. the
head
office of the organization has recently acquired some new products that will help
them
increase the interactivity in their games. these products need to be copied to the
branch
offices across the world. identify the kind of replication that should be used in
this scenario.

options
1. central publisher
2. central publisher with remote distributor
3. republisher
4. central subscriber
correct answer :-> 1
46.what is the minimum size of a transaction log file?

options
1. 602k
2. 512k
3. 256k
4. 450k
correct answer :-> 2
47.identify the datatype that is used to store fixed length unicode data.

options
1. binary
2. varbinary
3. nchar
4. nvarchar
correct answer :-> 3
48.identify the comparison operators that controls precedence.

options
1. !>
2. !<
3. ( )
4. !=
correct answer :-> 3
-----------------------------------------------
1.identify the operators that allow row retrieval from a table based on the
condition
specified in the where clause.

options
1. logical operators
2. comparison operators
3. range operators
4. arithmetic operators
correct answer :-> 2

3.which keyword in the where clause specifies an inclusive range to search?

options
1. between
2. not between
3. or
4. and
correct answer :-> 1

4.identify the string function that removes leading blanks from the character
expression.

options
1. ltrim
2. lower
3. left
4. len
correct answer :-> 1

5.a join that includes more than one table without any condition in the on clause
is called :

options
1. inner join
2. outer join
3. cross join
4. equi join
correct answer :-> 3
6.identify the category of data integrity that ensures that each row can be
uniquely identified
by an attribute called the primary key.

options
1. entity integrity
2. domain integrity
3. referential integrity
4. user-defined integrity
correct answer :-> 1
9.partial syntax to table creation is given below:
create table table_name
(
column_name datatype [null | not null]
[identity (seed, increment)],
column_name datatype �
)
[on {filegroup} | default]
what does seed indicate in the given syntax?

options
1. the starting or the initial value for the identity column.
2. the step value used to generate the next value for the column.
3. columns that need automatically generated unique system values.
4. keywords that specify whether or not null values are allowed for the column.
correct answer :-> 1
10.identify the system-stored procedure that is used to provide information about
a database object or a user-defined datatype?

options
1. sp_help
2. sp_droptype
3. sp_bindrule
4. sp_unbindrule
correct answer :-> 1
12.which command is used to find out whether the table or index is heavily
fragmented?

options
1. dbcc showcontig
2. dbcc indexdefrag
3. create index
4. fill factor
correct answer :-> 1
13.identify the option that forces the data modification statements to meet the
criteria
given in the select statement defining the view.

options
1. with check
2. with encryption
3. not null
4. null
correct answer :-> 1
14.identify the global system variable that returns total number of errors that
have occurred
during the current sql server session.

options
1. @@total_errors
2. @@error
3. @@connections
4. @@version
correct answer :-> 1
15.which of the following is true about a trigger?

options
1. a trigger needs to be explicitly executed.
2. a trigger is fired when the truncate table statement is issued.
3. a trigger can monitor unauthorized changes in data.
4. a trigger can return data to the user.
correct answer :-> 3
16.which integrity can be implemented using the delete trigger?

options
1. entity
2. domain
3. user-defined
4. referential
correct answer :-> 4
17.the following triggers are created on the publishers table:
create trigger trgdeletepublishers on publishers
after
delete
as
print 'deletion successful'
create trigger trgdeletedpublishers on publishers
after
delete
as
print 'details of the publisher deleted:'
select * from deleted
create trigger trgdeletepublisher on publishers
after
delete
as
print 'one publisher deleted'
what will the output be when the following delete statement is issued?
delete publishers
where pub_name = 'ggg&amp;g'

options
1. deletion successful
details of the publisher deleted:
pub_id pub_name city state country
------ ----------------------------------------------------
9901 ggg&amp;g m�nchen null germany
(1 row(s) affected)
one publisher deleted

2. deletion successful
one publisher deleted
details of the publisher deleted:
pub_id pub_name city state country
------ ----------------------------------------------------
9901 ggg&amp;g m�nchen null germany
(1 row(s) affected)
3. one publisher deleted
details of the publisher deleted:
pub_id pub_name city state country
------ ----------------------------------------------------
9901 ggg&amp;g m�nchen null germany
(1 row(s) affected)
deletion successful

4. deletion successful
details of the publisher deleted:
one publisher deleted
pub_id pub_name city state country
------ ----------------------------------------------------
9901 ggg&amp;g m�nchen null germany
(1 row(s) affected)
correct answer :-> 1
18.the row being fetched from the cursor result set is missing.
what value is stored in the @@fetch_status variable?

options
1. 0
2. -1
3. -2
4. 1
correct answer :-> 3
19.which stored procedure is used to view lock information?

options
1. sp_helptext
2. sp_lock
3. sp_help
4. sp_helplock
correct answer :-> 2
19.which of the following statements are true?
1. a shared lock is used to establish a lock hierarchy.
2. an intent lock allows concurrent transactions to read a resource.
3. an exclusive lock prevents a common form of deadlock that occurs when
transactions are
reading, locking, and updating.
4. an intent lock placed at the table level implies that shared locks are to be
placed on
the pages and rows within that table.
5. an update lock is used for data modification operations.
6. a sch-s lock is placed while compiling queries.

options
1. 1,5
2. 1,3,5
3. 2,4,5
4. 4,6
correct answer :-> 4
21.which tool of enterprise manager is used to monitor various events that occur
in sql server?

options
1. sql profiler
2. generate sql script
3. sql query analyzer
4. sql server configuration properties
correct answer :-> 1
22.what is the minimum size of a transaction log file?

options
1. 602k
2. 512k
3. 256k
4. 450k
correct answer :-> 2
23.which stored procedure is used to display information on a database object or
a user-defined datatype?

options
1. sp_lock
2. sp_helptext
3. sp_help
4. sp_helpuser
correct answer :-> 3
24.a database cannot be made smaller than the:

options
1. master database
2. model database
3. tempdb database
4. msdb database
correct answer :-> 2
25.you are a sql database administrator. you are developing a database for your
company.
you create a sales table as follow:
create table customer
( id int identity not null,
lastname varchar (50) not null,
firstname varchar (50) not null,
phone varchar (15) not null,
email var char (255) null )
you have successfully extracted all of the existing customer data from a legacy
database
into a tab-delimited flat file. you now need to populate the sales table with the
customer
information. currently the text file is in the following format:
name phone e-mail
adam green 301-555-1011 ab@adat.com karen blue 301-555-7111 kb@woodgrove.corn
what should you do to proceed with the transfer?

options
1. use the bcp utility
2. use the bulk insert statement
3. use the dts utility
4. use the select into statement
correct answer :-> 3
26.chris forsythe is a database administrator at great graphics corp.
there are four database roles in the organization namely customers, admin,
technology and
marketing database roles. the technology role is denied access to the products
table.
bill is transferred to the admin department from the technology department and is
added to
the admin role. all members of the admin department except for bill,
have select permission on the products table. help chris assign select permissions

for bill on the products table.

options
1. sp_droprolemember 'technology', 'bill'
2. sp_addrolemember 'db_owner', 'bill'
3. grant select on products to bill
4. sp_addrolemember 'admin', 'bill'
correct answer :-> 1
27.which bcp option is used to manage the errors that take place during the
transfer of data?

options
1. -c
2. -m
3. -e
4. -b
correct answer :-> 2

28.the # symbol is used to:

options
1. denote special characters
2. indicate bookmarks
3. separate parameters in a url
4. separate directories and subdirectories
correct answer :-> 2
29.how is xml data retrieved in sql server 2000?

options
1. by the opendatasource clause alone

2. by the for xml clause alone

3. by the select statement and the for xml clause

4. by the openxml rowset provider

correct answer :-> 3


30.jim wants to display the title information for all the books on the web.
he wants each row to be displayed as a single element on the web page.
which for xml option will enable him to do so?

options
1. raw
2. auto
3. elements
4. explicit
correct answer :-> 1
---------------------------------------------------
1.identify the statement that limits the number of rows returned in the result
set.

options
1. the select statement with where clause
2. group by
3. the top clause used with the select statement
4. the distinct keyword in the select statement
correct answer :-> 3
2.identify the comparison operators that controls precedence.

options
1. !>
2. !<
3. ( )
4. !=
correct answer :-> 3
3.identify the operator that allows the selection of values that match any one of
the values
in a list.

options
1. in
2. and
3. or
4. not
correct answer :-> 1
4.identify the wildcard that represents any single character within the specified
range.

options
1. %
2. -
3. []
4. [^]
correct answer :-> 3
5.identify the string function that removes leading blanks from the character
expression.

options
1. ltrim
2. lower
3. left
4. len
correct answer :-> 1
6.which join type enables you to display data from multiple tables after comparing
values
present in a common column?

options
1. inner join
2. outer join
3. cross join
4. equi join
correct answer :-> 1
7.a join that uses an asterisk (*) sign in the select list and displays redundant
column data
in the result set is termed as:

options
1. inner join
2. outer join
3. cross join
4. equi join
correct answer :-> 4
8.which keyword uses wildcard to ensure that the values entered in specific
columns
are of a certain pattern?

options
1. the like keyword
2. the between keyword
3. the null keyword
4. the not null keyword
correct answer :-> 1
9.a rule can be bound using the system-stored procedure named:

options
1. sp_bindrule
2. sp_help
3. sp_helptext
4. sp_unbindrule
correct answer :-> 1
10.identify the category of data integrity that ensures that the values of the
foreign key
match with the value of the corresponding primary key.

options
1. entity integrity
2. domain integrity
3. referential integrity
4. user-defined integrity
correct answer :-> 3
11.which conditional statement evaluates a list of conditions and returns one of
the various
possible results?

options
1. the case statement
2. the if�else statement
3. the begin�end statement
4. the while statement
correct answer :-> 1
12.which command is used to find out whether the table or index is heavily
fragmented?

options
1. dbcc showcontig
2. dbcc indexdefrag
3. create index
4. fill factor
correct answer :-> 1
13.which of the following cannot be included in the view definition?

options
1. the top clause.
2. the group by clause
3. the order by clause.
4. the distinct clause.
correct answer :-> 3
15.during delete trigger processing, the deleted rows are stored in the:

options
1. inserted table
2. deleted table
3. #deleted table
4. updated table
correct answer :-> 2
16.which integrity can be implemented using the delete trigger?

options
1. entity
2. domain
3. user-defined
4. referential
correct answer :-> 4
17.paul executes the following sql statements:
select customers.name, customers.ord_id, orders.ord_date from customers inner join
orders
where customers.cust_id = orders.cust_id
where both the tables have 10,000 rows each. the query takes a long time to
execute.
which of the following will help improve the query performance?

options
1. triggers
2. stored procedures
3. views
4. batches
correct answer :-> 2
18.the row being fetched from the cursor result set is missing. what value is
stored
in the @@fetch_status variable?

options
1. 0
2. -1
3. -2
4. 1
correct answer :-> 3
19.which stored procedure is used to view lock information?

options
1. sp_helptext
2. sp_lock
3. sp_help
4. sp_helplock
correct answer :-> 2
20.which of the following statements are true?
1. a shared lock is used to establish a lock hierarchy.
2. an intent lock allows concurrent transactions to read a resource.
3. an exclusive lock prevents a common form of deadlock that occurs when
transactions are reading, locking, and updating.
4. an intent lock placed at the table level implies that shared locks are to be
placed on the pages and rows within that table.
5. an update lock is used for data modification operations.
6. a sch-s lock is placed while compiling queries.
options
1. 1,5
2. 1,3,5
3. 2,4,5
4. 4,6
correct answer :-> 4
21.which of the following is a replication model?

options
1. subscription
2. distributor
3. publication
4. article
correct answer :-> 2
22.ed is the database administrator at flyfastcouriers. the company is upgrading
its sql server
and wants to store details such as size and data of creation, of all its
databases.
help ed view the required information.

options
1. sp_helptext
2. sp_databases
3. sp_help
4. sp_helpdb
correct answer :-> 4
23.you need to create the toys database with at least 50mb of free space for data
with 15mb
start size for the transaction log. which of the following statements should you
use to
create the database?

options
1. create database toys on (
name = toys_dat,
size = 50 )
log on (
name = toys_log,
size = 15 )

2. create database toys on (


name = toys_dat,
filename = 'd:\microsoft sql server\mssql\data\toys.mdf',
size = 60 )

3. create database toys on (


filename = 'd:\microsoft sql server\mssql\data\toys.mdf',
size = 51200 )
log on (
filename = 'd:\microsoft sql server\mssql\data\toys.ldf',
size = 15360 )

4. create database toys on (


name = toys_dat,
filename = 'd:\microsoft sql server\mssql\data\toys.mdf',
size = 50 )

correct answer :-> 2


24.the __________ database manages all server-specific configuration information.

options
1. master
2. msdb
3. tempdb
4. model
correct answer :-> 1
25.ed robbins is a sql database administrator. ed is developing a database for his
company.
this database will be based on sql 2000, and will be accessed by every user in the
company.
in within the database there is a table called emp. every user should be able to
only select
and insert into emp. john and mary are the only exceptions. they can issue any
sort
of ddl to emp. how do you quickly configure the required related permissions
without
involving unnecessary overheads?

options
1. create a new role called emp, and assign the appropriate permissions for the
users to this role. exclude john and mary from this role.

2. create a new role called emp, and assign the appropriate permissions for the
users to this role. include john and mary in this role.

3. create a new role called emp, and assign the appropriate permissions for the
users to this role. include john and mary in this role. individually add the
update permission to john and mary.

4. assign the select and insert permissions of emp to the public database role.
give john and mary the role db_ddladmin.

correct answer :-> 4


26.jane is the chief publishing manager at deltasigma inc. needs to perform some
import and
export tasks on the pubs database. she prefers to do things graphically. which of
the following
tools may be useful for her?

options
1. select into statement
2. dts utility
3. bcp utility
4. bulk insert statement
correct answer :-> 2
27.which stored procedure is used to add users to a server role?

options
1. sp_addlogin

2. sp_adduser
3. sp_srvaddrolemember

4. sp_addsrvrolemember

correct answer :-> 4


28.the # symbol is used to:

options
1. denote special characters
2. indicate bookmarks
3. separate parameters in a url
4. separate directories and subdirectories
correct answer :-> 2
29you are a database developer for the adatax corporation. you are creating a
database that
will store statistics for 16 different high school sports. this information will
be used by 53
companies that publish sports information on their web sites. what sql 2000
statement /
clause may be used?

options
1. the for xml clause

2. data transformation services

3. bulk copy utility


4. the group by and roll up clause
correct answer :-> 1
30.which symbol is used to separate the url and the parameters?

options
1. &amp;
2. ?
3. %
4. |
correct answer :-> 2
31.identify the operators that are used to combine multiple search conditions.

options
1. logical operators
2. comparison operators
3. range operators
4. arithmetic operators
correct answer :-> 1
31.what is the maximum size of the nvarchar datatype?

options
1. 255
2. 1000
3. 2000
4. 4000
correct answer :-> 4
32.identify the mathematical function that returns the largest integer less than
or equal to
the specified value.

options
1. floor
2. log
3. log10
4. rand
correct answer :-> 1
33.which constraint is used to assign a constant value to a column?

options
1. primary key constraint
2. unique constraint
3. check constraint
4. default constraint
correct answer :-> 4
34.the fillfactor clause is used to:

options
1. improve performance of the system by minimizing the amount of page splitting
that occurs
each time an index page becomes full.
2. sort data stored in table in ascending order.
3. skip statements after continue inside the loop.
4. exit from the while loop.
correct answer :-> 1
35.which is the default role assigned to all users in sql?

options
1. db_datareader
2. guest
3. db_datawriter
4. public
correct answer :-> 4
36.how is xml data written in sql server 2000?

options
1. by the openrowquery clause alone

2. by the for xml clause alone

3. by the select statement and the for xml clause

4. by the openxml rowset provider

correct answer :-> 4


37.you are a sql database administrator. you are developing a database for your
company.
your peer peter runs an order entry application that requires select, update, and
insert
permissions on the products tables to work. access to the other tables in the
database
should not be restricted. he should not have any select, insert, or update
permissions
when accessing the table directly. what needs to be done in the described
scenario?

options
1. create one group account that denies select, insert, or update permissions on
the products
table. add peter as a member of that group.

2. create one user account that denies select, insert, or update permissions
on the products table. add peter as a member of that account.

3. create one user-database role that denies select, insert, or update permissions
on the
products table. add peter as a member of that database role. then create an
application role
with select, insert, and update permissions on the products tables.

4. create one user-database role that denies select, insert, or update permissions
on the entire
order entry database. add peter as a member of that database role. then create an
application
role with select, insert, and update permissions on the products tables.

correct answer :-> 3


38.identify the string function that converts lower case character data to upper
case.

options
1. upper
2. lower
3. left
4. len
correct answer :-> 1
39.identify the system-stored procedure that is used to create a user-defined
datatype.

options
1. sp_addtype
2. sp_droptype
3. sp_bindrule
4. sp_unbindrule
correct answer :-> 1
40.the following sql batch is created to modify a stored procedure,
prcprintstorelist.
alter procedure prcprintstorelist @state char(15)
as
begin
if exists(select * from stores
where state=@state)
begin
print 'list of stores'
select stor_id,stor_name,stor_address,city
from stores
where state = state
return 0
end
else
begin
print 'no records found for given state'
return 1
end
end
identify the output.

options
1. compile-time error
2. run-time error
3. 0
4. 1
correct answer :-> 1
41.what is the implication of null in unique indexes?

options
1. null values are treated as duplicate values when indexed.
2. null values ensure that the indexed column contains no duplicate values.
3. null values ensure that each combination of values in the indexed column is
unique.
4. columns can contain null in more than one row.
correct answer :-> 1
42.triggers can be nested up to ___________ levels.

options
1. 32
2. 10
3. 7
4. 20
correct answer :-> 1
43.the with encryption option encrypts the data in the:

options
1. sysdatabases table
2. syscomments table
3. sysobjects table
4. sysfiles table
correct answer :-> 2
44.which sql server statement can be used to display fragmentation information for
the data
and indexes of the specified table?

options
1. fill factor
2. dbcc showcontig
3. dbcc indexdefrag
4. dbcc dbreindex
correct answer :-> 2
45.which global variable returns number of currently active transactions for a
user?

options
1. @@trancount
2. @@max_connections
3. @@total_errors
4. @@connections
correct answer :-> 1
46.arrange the following resources in order of increasing granularity.
1. table
2. key
3. extent
4. rid
5. database
6. page

options
1. 6,4,5,3,2,1

2. 3,1,2,5,4,6
3. 4,2,6,3,1,5
4. 2,1,3,4,6,5
correct answer :-> 3
47.don has to add a new user ,�myuser�, to the system administrators role.
which of these statements will give the required outcome?

options
1. exec sp_addsrvrolemember 'myuser', 'sysadmin'
2. exec sp_addsrvrolemember 'myuser', 'db_ddl_admin'
3. exec sp_srvaddrolemember 'sysadmin', 'myuser'
4. exec sp_srvaddrolemember 'db_ddl_admin', 'myuser'
correct answer :-> 1
48.and, or, and not are:

options
1. logical operators
2. comparison operators
3. range operators
4. arithmetic operators
correct answer :-> 1
49.identify the datatype that is used to store variable length character data.

options
1. binary
2. varbinary
3. char
4. varchar(n)
correct answer :-> 4
50.the hexadecimal value for an apostrophe (�) in xml is:

options
1. &amp;apostrophe
2. @apost
3. @aps
4. &amp;apos
correct answer :-> 4
51.which database is used by sql server to sort data before returning results to
the user?

options
1. master
2. msdb
3. tempdb
4. model
correct answer :-> 3
----------------------------------------------------------------
review1_idd.doc (chua co tra loi)

1.
you need to create a function that will return the names of all publishers who
live in the country specified by the user at run time. which of the following
functions will display the required result?

create function dispname(@country varchar(30))


returns table
as
begin
select * from publishers where country = @country
end
select * from dispname('germany')

create function dispname(@country varchar(30))


returns varchar(30)
as
begin
select * from publishers where country = @country
end
select * from dispname('germany')

create function dispname(@country varchar(30))


returns table
as
return(select * from publishers where country = @country)
select * from dispname('germany')

create function dispname(@country varchar(30))


returns table
as
begin
return(select * from publishers where country = @country)
end
select * from dispname('germany')

viewed and attempted


viewed but not attempted
bookmarked and attempted
bookmarked but not attempted
not viewed not attempted

click on a number to navigate


2.
which of the following is true regarding the processing of rows in cursors?

you need to set cursor attributes before opening a cursor.

you can modify the current row in the result set returned by a cursor.
you cannot view the data modified by other users in the result set returned by a
cursor.

you can navigate through the result set returned by a cursor, one row at a time
in a sequential manner.

3.
which statement describes the atomicity property of transactions?

data modification made by a transaction is independent of the modifications made


by other transactions.
all the data modifications are performed or none of them is performed.
any change in data by a completed transaction remains permanently in effect in
the system.
all data is in a constant state after a transaction is completed successfully.
4.
gamefun inc. is a multinational organization that creates gaming software. the
head office of the organization has recently acquired some new products that will
help them increase the interactivity in their games. these products need to be
copied to the branch offices across the world. identify the kind of replication
that should be used in this scenario.

central publisher
central publisher with remote distributor
republisher
central subscriber
5.
which database is used by sql server to sort data before returning results to the
user?

master
msdb
tempdb
model
6.
which stored procedure is used to display information on a database object or a
user-defined datatype?

sp_lock
sp_helptext
sp_help
sp_helpuser
7.
the __________ database manages all server-specific configuration information.

master
msdb
tempdb
model
8.
you are a sql database administrator. you are developing a database for your
company. you create a sales table as follow:
create table customer ( id int identity not null, lastname varchar (50) not null,
firstname varchar (50) not null, phone varchar (15) not null, email var char (255)
null )
you have successfully extracted all of the existing customer data from a legacy
database into a tab-delimited flat file. you now need to populate the sales table
with the customer information. currently the text file is in the following format:
name phone e-mail
adam green 301-555-1011 ab@adat.com karen blue 301-555-7111 kb@woodgrove.corn
what should you do to proceed with the transfer?

use the bcp utility


use the bulk insert statement
use the dts utility
use the select into statement
9.
jane is the chief publishing manager at deltasigma inc. needs to perform some
import and export tasks on the pubs database. she prefers to do things
graphically. which of the following tools may be useful for her?
select into statement
dts utility
bcp utility
bulk insert statement
10.
identify the datatype that is used to store fixed length unicode data.

binary
varbinary
nchar
nvarchar
11.
identify the operators that allow row retrieval from a table based on the
condition specified in the where clause.

logical operators
comparison operators
range operators
arithmetic operators
12.
which keyword in the where clause specifies an inclusive range to search?

between
not between
or
and
13.
what is the maximum size of the nvarchar datatype?

255
1000
2000
4000
14.
identify the string function that removes leading blanks from the character
expression.

ltrim
lower
left
len
15.
identify the system function that returns the current host process id number of a
client process.

host_id ()
host_name ()
user_name ([user_id])
db_id (['db_name'])
16.
which operator is used to combine the result set of two or more queries?
union
in
having
group by
17.
which constraint is used to enforce uniqueness on non-primary key columns?

primary key constraint


unique constraint
check constraint
default constraint
18.
which constraint is used to assign a constant value to a column?

primary key constraint


unique constraint
check constraint
default constraint
19.
identify the category of data integrity that ensures that the values of the
foreign key match with the value of the corresponding primary key.

entity integrity
domain integrity
referential integrity
user-defined integrity
20.
groups of sql statements submitted together to sql server for execution are
called:

batches
variables
comments
messages
21.
which command is used to find out whether the table or index is heavily
fragmented?

dbcc showcontig
dbcc indexdefrag
create index
fill factor
22.
which of the following is a replication model?

subscription
distributor
publication
article
23.
what is the minimum size of a transaction log file?

602k
512k
256k
450k
24.
which stored procedure is used to display information on a database object or a
user-defined datatype?

sp_lock
sp_helptext
sp_help
sp_helpuser
25.
consider the following statements:
single_user is the default state option for a database.
restricted_user allows only the members of the db_owner role to use the database.

statements a and b are true.


statements a and b are false.
statement a is true and statement b is false.
statement b is true and statement a is false.
-------------------------------------------------------------------
sql test 1 (chua co tra loi)

1/ consider the statement given below:


�a computer institute enrolls students for any number of courses. however, a
student cannot be enrolled for the same course more than once. the same course can
be undertaken by many students.�
identify the type of relationship that exists between the two entities, the course
and the student.
options
a. one-to-one
b. one-to-many
c. many-to-one
d. many-to-many
2/ consider the following scenario:
�a manufacturer transacts with two types of suppliers. one type of supplier allows
credit, while the other type insists on payment in cash before delivery. the
manufacturer wants to maintain separate information on these two types of
suppliers. for example, for the credit supplier, �credit period� and �credit
limit� need to be recorded. identify the supertype and subtype entities along with
their attributes.
options
a. supertype � supplier
subtypes � credit_supplier and cash_supplier
credit_supplier will have the following attributes: credit period and credit limit
b. supertype � credit_supplier
subtypes � supplier and cash_supplier
credit_supplier will have the following attributes: credit period and credit limit
c. supertype � cash_supplier
subtypes � supplier and credit_supplier
credit_supplier will have the following attributes: credit period and credit
limit.
d. there will be only one entity supplier with supplier_type storing the type
of supplier, credit period, and credit limit as its fields.
3/ consider the following unnormalized project table structure:

project

ecode
projcode
dept
depthead
hours

after applying normalization rules, we derive the following three tables:

employee

ecode
dept

project

ecode
projcode
hours

department

dept
depthead

identify which normalization rule that has been applied to derive the given table
structure.
options
a. 1 nf
b. 2 nf
c. 3 nf
d. bcnf
4/ which of the following is a product operations factor according to mccall�s
theory?
options
a. efficiency
b. maintainability
c. flexibility
d. testability
5/ which of the following is a configuration management activity?
options
a. measurement
b. baseline control
c. sqa audits
d. software testing
6/ which integrity ensures that each row in a table is uniquely identified by an
attribute called the primary key?
options
a. referential integrity
b. domain integrity
c. entity integrity
d. user-defined integrity
7/ which integrity ensures that only a valid range of values is allowed to be
stored in a column?
options
a. referential integrity
b. domain integrity
c. entity integrity
d. user-defined integrity
8/ which of the following statement should you use to create a user-defined
datatype named typemailid that can accept 20 characters, and does not allow email-
id to be left blank?
options
a. sp_addtype typemailid , 'varchar(20)', 'not null'
b. sp_addtype typemailid , varchar(20), not null
c. sp_addtype typemailid 'not null', 'varchar(20)'
d. sp_addtype typemailid 'int(20)', 'not null'
9/ to store the details of books published by various publishers, the following
tables were created using the create table statement.
create table books
(
cbookid char(4) not null,
cpublisherid char(6) not null,
cbookname char(30) not null,
ibookprice int not null
)

create table publisher


(
cpublisherid char(6) not null,
cpublishername char(30) not null,
cpublisheraddress char(40) not null,
cpublishercity char(35) not null,
cpublisherstate char(40) not null,
cpublisherphone char(15) not null
)

identify the correct step that will help maintain referential integrity between
the books and publisher tables.
options
a. create a user-defined datatype typpublisher of char(4) type and use it in only
the books table for the cpublisherid attribute.
b. create a primary key constraint on the cpublisherid attribute of the publisher
table and a foreign key constraint on the cpublisherid attribute of the books
table.
c. create a primary key constraint on the cpublisherid attribute of the books
table and a foreign key constraint on the cpublisherid attribute of the publisher
table.
d. create a user-defined datatype typpublisher of the char(6) type and use it in
both the books and publisher tables for the cpublisherid attribute.
10/ identify the sql statement that describes all the following conditions.
condition 1: item no should be unique.
condition 2: qoh and rol can accept null values.
condition 3: a constraint should be defined to ensure that the quantity_on_hand is
never less than the reorder level.
condition 4: item no should start with 100 and should decrement consecutively on
successive inserts.
options
a. create table items
(
itemno int identity(100,-1),
qoh int,
rol int,
constraint chkqrol check (qoh < rol)
)
b. create table items
(
itemno int constraint chkpk primary key,
qoh int null,
rol int null,
constraint chkqrol check (qoh < rol)
)
c. create table items
(
itemno int identity(100,-1) constraint chkpk primary key,
qoh int null,
rol int null constraint chkqrol check (qoh < rol)
)
d. create table items
(
itemno int constraint chkpk primary key,
qoh int,
rol int constraint chkqrol check (qoh < rol)
)
11/ a table called employee needs to be created. a datatype called typemployeecode
has been created for the cemployeecode attribute of the employee table.
which of the following actions would you take in order to use the datatype in the
employee table?
options
a. use the sp_bindefault command to bind the datatype to the cemployeecode
attribute of the employee table.
b. use the sp_bindrule command to bind the datatype to the attribute of the table.
c. use the datatype in the create table statement of the employee table.
d. use the sp_addtype command to add the datatype to the employee table.
12/ consider the following table:
create table employee
(
empcode int identity(100,-1),
deptname char(25) null
)
predict the output of the following sql statements

insert employee default values


insert employee default values
options
a. sql server inserts two rows in the employee table with 100 and 99 as the
employee code and null as the department name.
b. sql server inserts a row in the employee table with 99 as the employee code and
null as the department name.
c. sql server displays an error stating that no default is defined for the filed
deptname.
d. sql server inserts two rows in the employee table with 99 and 100 as the
employee codes and null as the department name.
13/ which of the following objects in a database constitutes a set of t-sql
statements that get activated in response to certain actions?
options
a. view
b. index
c. stored procedure
d. trigger
14/ which of the following queries would display all rows from the publishers
table?
options
a. select pub_name, substring(au_fname,1,1)+ �. �+au_lname from publishers p left
outer join authors a on p.city=a.city
b. select pub_name, substring(au_fname,1,1)+ �. �+au_lname from publishers p right
outer join authors a on p.city=a.city
c. select pub_name, substring(au_fname,1,1)+ �. �+au_lname from publishers p join
authors a on p.city=a.city
d. select pub_name, substring(au_fname,1,1)+ �. �+au_lname from publishers p join
authors a
15/ identify the query that will display the titles of all books for which the
advance amount is more than the average advance paid for business-related books.
options
a. select title from titles where advance > (select advance from titles where type
= �business�)
b. select title from titles where advance > (select avg(advance) from titles where
type = �business�)
c. select title from titles where advance >= (select avg(advance) from titles
where type = �business�)
d. select title from titles where advance > avg (advance) and type = �business�
16/ predict the output of the following statement:
select stor_id, count(stor_id) from sales group by stor_id having avg(qty)>=20 and
countstor_id)>3
options
a. the query will display the details of those stores with whom the order is
placed more than 3 times with the average quantity ordered greater than equal to
20.
b. the query will display the details of those stores with whom the average
quantity ordered is greater than equal to 20.
c. the query will display the details of those stores with whom the order is
placed more than 3 times.
d. the query will display the details of those stores with whom the order is
placed more than 3 times and the quantity ordered is greater than equal to 20.
17/ predict the output of the following sql statement:
select * from publishers
where city like 'b%' and not city = 'boston'
options
a. the query will display the details of publishers who live in the city that has
its name starting with the alphabet b.
b. the query will display the details of publishers who do not live in the city
that has its name starting with the alphabet b.
c. the query will display the details of publishers who live in the city that has
its name starting with the alphabet b, other than boston.
d. the query will display the details of publishers who do not live in boston.
18/ which of the following statements are true about indexes?

statement a: indexes help improve query performance.


statement b: indexes help enforce the uniqueness of data.
statement c: indexes help speed the joins between tables.
statement d: indexes help consume less disk space.
statement e: indexes improve the performance of query on which data manipulation
is high.
options
a. a, b, and c.
b. a, c, and d.
c. b, c, and e.
d. a, b, c, and e.
19/ which of the following statements is correct about nonclustered indexes?
options
a. nonclustered indexes are typically created on foreign keys.
b. there can be only one nonclustered index per table.
c. a nonclustered index should be created before creating a clustered index.
d. a nonclustered index does not enforce the uniqueness of rows.
20/ consider the following table:
room

croomcode
croomdesc
mroomrented
itimesrented

the room table is mainly used for queries based on the croomcode attribute, which
is a unique field. to improve the performance of the queries, which type of index
would you create on the croomcode attribute?
options
a. a clustered index on the croomcode attribute of the room table
b. a non-clustered index on the croomcode attribute of the room table
c. a unique clustered index on the croomcode attribute of the room table
d. a unique non-clustered index on the croomcode attribute of the room table
21/ consider the following statements:
statement a: a view can be modified without dropping it, by using the alter
statement.
statement b: if a view with a select * statement has been defined and the
structure of the underlying tables is altered by adding new columns, the new
columns do not appear in the view. which of the following is correct the
statements?
options
a. both statements are true.
b. both statements are false.
c. statement a is true, and statement b is false.
d. statement b is true, and statement a is false.
22/ consider the following sql statement:
create index idxrno
on student(irno)

which of the following commands will you use to verify that the index has been
created on the student table?

options
a. sp_helptext idxrno
b. sp_helpindex idxrno
c. sp_helpindex idxrno
d. sp_helptext idxrno
23/ consider the following stored procedure:

create procedure prcsales (@ord_no1 varchar(20), @ord_no2 varchar(20), @qty ord


int)
as
begin tran trntran1
update sales
set qty= qty-@qtyord
where ord_num = @ord_no1
commit tran

update sales
set qty = qty+@qtyord
where ord_num = @ord_no2
return

while executing the procedure, there is a system failure after the first update
statement and before the second update statement is executed. after the server
starts up, which of the following statements is correct for the updates?
options
a. after querying the table, the update done by only the first update statement is
reflected in the table.
b. after querying the table, the update done by the first update statement is not
reflected in the table.
c. after querying the table, the updates done by both the update statements are
reflected correctly.
d. after querying the table, the updates done by both the update statements are
reflected. however, the update done by the first update statement is reflected
incorrectly.
24/ which magic table(s) would you query for validating the updation of a primary
key?
options
a. inserted
b. deleted
c. inserted and deleted
d. updated
25/ consider the following trigger on the sales table:

create trigger trgdelsales


on sales for delete
as
rollback transaction

predict the output when the following command is issued:

delete sales
where datepart(yy,tran_dt) < 1990
options
a. sales details for items sold in the year 1990 will be deleted from the sales
table.
b. no records will be deleted from the sales table.
c. the sales details for the items sold in and before the year 1990 will be
deleted from the sales table.
d. sales details of items sold before the year 1990 will be deleted from the sales
table.
26/ which of the following system stored procedure helps determine the objects
referenced by a trigger?
options
a. sp_help
b. sp_helptext
c. sp_helpdb
d. sp_depends
27/ consider the following table:
items

itno i001
qoh 30
price 10

predict the output of the following trigger when the sales of 30 units are
accepted for the item code �i001�.

create trigger trginssales


on sales for insert
as
begin
declare @var1 int,@var2 int
select @var1=qoh from items, inserted
where items.itno=inserted.itno
select @var2=@var1-qty_reqd
from inserted
if @var2 <=10
begin
print �low stocks�
rollback transaction
end
update items
set qoh=qoh-@var1
from items, inserted
where items.itno=inserted.itno
end
options
a. the trigger will fire when a record is inserted in the sales table. the
transaction will be rejected because of low stocks.
b. the trigger will fire when a record is inserted in the sales table. the
insertion in the sales table and the updation of the items table will be
successfully accomplished.
c. the trigger will fire when a record is inserted in the sales table. the record
in the sales table will be successfully inserted but the items table will not be
updated because of low stocks.
d. the trigger will fire when a record is inserted in the sales table. however,
because of low stocks, the insertion in the sales table will be rejected while the
items table will get updated to represent the current stocks.
28/ consider the following trigger on the sales table:

create trigger trgdelsales


on sales for delete
as
rollback transaction

predict the output when the following command is issued:

delete sales
where datepart(yy,tran_dt) < 1990
options
a. sales details for items sold in the year 1990 will be deleted from the sales
table.
b. no records will be deleted from the sales table.
c. the sales details for the items sold in and before the year 1990 will be
deleted from the sales table.
d. sales details of items sold before the year 1990 will be deleted from the sales
table.
29/ identify the database object that is used to access and manipulate the data of
a resultset row-by-row?
options
a. procedure
b. trigger
c. view
d. cursor
30/ which kind of locking is implemented by sql server when two transactions apply
locks on separate objects and each transaction keeps on waiting for a lock to be
released by the transaction?
options
a. shared with intent exclusive lock
b. shared lock
c. exclusive lock
d. deadlock
31/ which of the following database objects can be used to print a report in the
following format:

publisher id: xxxx publisher name: xyz


state:xxxxx city:xxxxxx
options
a. procedure
b. triggers
c. cursor
d. batches
32/ which of the following is not the type of replication model supported by sql
server?
options
a. central publisher
b. central publisher with remote distributor
c. republisher
d. resubscriber
33/ identify the first step that you should follow before administering sql server
using the enterprise manager?
options
a. start sql server
b. register sql server
c. authenticate users for sql server
d. define permissions on objects.
34/ consider the given situations:

a) a site uses data for summary reporting or trend reporting on sales activity for
the current year.
b) oltp activity is to be separated from decision-support activity.
c) location-specific information has to be distributed from a centralized location
to multiple locations.
d) data changes often and the changed information has to be replicated.
in which of the above situations should you apply the strategy of data
replication?
options
a. a, b, c, d
b. a, b, c
c. a, b, d
d. a, c, d
35/ in which phase of sdlc will you create the project request form?
options
a. conception
b. analysis
c. design
d. initiation
36/ you are developing a system by using the rad model. in which phase will you
determine the information generated by the processes of the system?
options
a. the business modeling phase
b. the data modeling phase
c. the process modeling phase
d. the testing and turnover phase
37/ your client needs a system for an automobile firm. your client finds it
difficult to explain the requirements for the system. which process model is
appropriate to develop the system?
options
a. the waterfall model
b. the linear sequential model
c. the spiral model
d. the prototyping model
38/ your client needs a system for an automobile firm but finds it difficult to
explain the requirements. you decide to develop the system in increments and
revise each version of the project after showing it to your client. which process
model are you using?
options
a. the waterfall model
b. the linear sequential model
c. the prototyping model
d. the evolutionary model
39/ identify the third step of object-oriented analysis.
options
a. creating a class responsibility collaborator model
b. defining subsystems
d. defining structures and hierarchies
c. creating scenarios to identify the usage of software
40/ which phase of the waterfall model establishes the requirements for each
system element, such as software, hardware, and people, associated with software
development?
options
a. system engineering and analysis
b. software requirements analysis
c. maintenance
d. coding

-----------------------------------------------------------------------
sql test 2

1/ which of the following is used to represent the missing or unknown piece of


information in an rdbms?
options
a. space
b. zero
c. comma
d. null (dung)

2/ consider the statement given below::


statement a: a relationship can associate an entity with itself.
statement b: multiple relationships can also exist between the same entities.
which of the following is correct for the statements given above?
options
a. both statements are true.
b. both statements are false.
c. statement a is true, and statement b is false.
d. statement a is false, and statement b is true. (dung)

3/ consider the following unnormalized project table structure:


project(ecode, projcode, dept, depthead, hours)
after applying normalization rules, we derive the following three tables:
employee(ecode, dept)
project(ecode, projcode, hours)
department(dept, depthead)
identify which normalization rule that has been applied to derive the given table
structure.
options
a. 1 nf
b. 2 nf
c. 3 nf (dung)
d. bcnf

4/ consider the following statement:


� a supplier ships certain parts. a particular part is not necessarily shipped by
only one supplier. no supplier ships only a single part.�
identify the tables that will be created when an e/r diagram is mapped to tables
based on the above statement?
options
a. supplier, items, and transaction
b. supplier and items
c. supplier and transaction. the supplier table containing the corresponding
item_code.
d. items and transaction. the items table containing the corresponding
supplier_code.

5/ which black box testing technique would you use to derive different test cases
based on different user inputs?
options
a. data flow testing
b. equivalence partitioning (dung)
c. boundary value analysis
d. comparison testing

6/ which integrity ensures that each row in a table is uniquely identified by an


attribute called the primary key?
options
a. referential integrity
b. domain integrity
c. entity integrity
d. user-defined integrity

7/ which integrity ensures that only a valid range of values is allowed to be


stored in a column?
options
a. referential integrity
b. domain integrity
c. entity integrity
d. user-defined integrity

8/ consider the following statements:


statement a: rules do not apply to data that has already been inserted into a
table.
statement b: rules do not apply to data that has already been inserted into a
table if they are bound as futureonly.
which of the following is correct about the above statements?
options
a. both statements are true.
b. both statements are false.
c. statement a is true, and statement b is false.
d. statement a is false, and statement b is true.

9/ which of the following statements are correct about user-defined datatype?


statement a: a user-defined datatype is created by a user and is based on a system
datatype.
statement b: a user-defined datatype is created using the sp_addtype system stored
procedure.
statement c: a user-defined datatype can be dropped using the sp_droptype system
stored procedure.
statement d: sp_help provides information about a user-defined datatype.
options
a. statements a, b, c, and d
b. statements a, b, and c
c. statements a, c, and d
d. statements b, c, and d

10/ identify the sql statement that describes all the following conditions.
condition 1: item no should be unique.
condition 2: qoh and rol can accept null values.
condition 3: a constraint should be defined to ensure that the quantity_on_hand is
never less than the reorder level.
condition 4: item no should start with 100 and should decrement consecutively on
successive inserts.
options
a. create table items
(
itemno int identity(100,-1),
qoh int,
rol int,
constraint chkqrol check (qoh < rol)
)
b. create table items
(
itemno int constraint chkpk primary key,
qoh int null,
rol int null,
constraint chkqrol check (qoh < rol)
)
c. create table items
(
itemno int identity(100,-1) constraint chkpk primary key,
qoh int null,
rol int null constraint chkqrol check (qoh < rol)
)
d. create table items
(
itemno int constraint chkpk primary key,
qoh int,
rol int constraint chkqrol check (qoh < rol)
)
11/ a table called employee needs to be created. a datatype called typemployeecode
has been created for the cemployeecode attribute of the employee table.
which of the following actions would you take in order to use the datatype in the
employee table?
options
a. use the sp_bindefault command to bind the datatype to the cemployeecode
attribute of the employee table.
b. use the sp_bindrule command to bind the datatype to the attribute of the table.
c. use the datatype in the create table statement of the employee table.
d. use the sp_addtype command to add the datatype to the employee table.

12/ consider the following table:


create table employee
(
empcode int identity(100,-1),
deptname char(25) null
)
predict the output of the following sql statements
insert employee default values
insert employee default values
options
a. sql server inserts two rows in the employee table with 100 and 99 as the
employee code and null as the department name.
b. sql server inserts a row in the employee table with 99 as the employee code and
null as the department name.
c. sql server displays an error stating that no default is defined for the filed
deptname.
d. sql server inserts two rows in the employee table with 99 and 100 as the
employee codes and null as the department name.

13/ which of the following objects in a database constitutes a set of t-sql


statements that get activated in response to certain actions?
options
a. view
b. index
d. stored procedure
c. trigger

14/ predict the output of the following sql statement if the date of sale for the
given product is july 13, 2000 and the order date is july 1, 2000:
select datediff(yy, sale_dt, order_dt)
from transaction
where prod_id = �10202�
options
a. 1
b. -1
c. 0
d. 13

15/ consider the following statements:


statement a: a join without any condition creates a cartesian product between two
or more tables and is called an inner join.
statement b: a join that displays redundant column data in a result set is termed
as an equi join.
which of the following is correct about the above statements?
options
a. both statements are true.
b. both statements are false.
c. statement a is false, and statement b is true.
d. statement b is false, and statement a is true.

16/ consider the following statements:


statement a: an outer join is possible only between two tables.
statement b: an outer join returns all records that do not match the rows in
related tables.
which of the following is correct about the above statements?
options
a. both statements are true.
b. both statements are false.
c. statement a is true, and statement b is false.
d. statement a is false, and statement b is true.

17/ predict the output of the following sql statement:


select * from publishers
where city like 'b%' and not city = 'boston'
options
a. the query will display the details of publishers who live in the city that has
its name starting with the alphabet b.
b. the query will display the details of publishers who do not live in the city
that has its name starting with the alphabet b.
c. the query will display the details of publishers who live in the city that has
its name starting with the alphabet b, other than boston.
d. the query will display the details of publishers who do not live in boston.

18/ predict the output of the following query:


select title, type, advance
from titles t1
where t1.advance > (select avg(t2.advance)
from titles t2 where t1.type = t2.type)
options
a. the query will display the details of books whose advance is greater than the
average advance paid for the books of the same type.
b. the query will display the details of books whose advance is greater than the
average advance paid.
c. the query will display the details of books whose advance is less than the
average advance paid for the books of the same type.
d. the query will display the details of books whose advance is greater than equal
to the average advance paid for the books of the same type.

19/ consider the following statements:


a) use of fillfactor reduces the page splitting overhead for statements like
�insert� and �update� in a table.
b) a fillfactor helps reserve a percentage of free space on each data page of the
index to accommodate future expansion.
c) a fillfactor of 100 percent is suggested to improve transaction processing.
d) a fillfactor can range from 1 to 100 percent.
identify the set of statements that are correct for fillfactor.
options
a. a, b, c
b. a, b, d
c. b, c, d
d. a, b, c, d

20/ identify the structure that is used by sql server to store data when a table
does not have a clustered index.
options
a. stack
b. queue
c. heap
d. linked list

21/ consider the following statements:


statement a: a view can be modified without dropping it, by using the alter
statement.
statement b: if a view with a select * statement has been defined and the
structure of the underlying tables is altered by adding new columns, the new
columns do not appear in the view.
which of the following is correct the statements?

options
a. both statements are true.
b. both statements are false.
c. statement a is true, and statement b is false.
d. statement b is true, and statement a is false.

22/ consider the specified statements:


statement a: index tuning wizard is used to capture events from a server to
diagnose slow-running queries.
statement b: you can enforce the index to be used by including the name of the
indexed column in the where clause for query optimization.
which of the following is correct for the specified statements?
options
a. both statements are true.
b. both statements are false.
c. statement a is true, and statement b is false.
d. statement a is false, and statement b is true.

23/ consider the following stored procedure:


create procedure prcsales (@ord_no1 varchar(20), @ord_no2 varchar(20), @qty ord
int)
as
begin tran trntran1
update sales
set qty= qty-@qtyord
where ord_num = @ord_no1

update sales
set qty = qty+@qtyord
where ord_num = @ord_no2
commit tran
return

while executing the procedure, there is a system failure after the first update
statement and before the second update statement is executed. after the server
starts up, which of the following statements is correct for the updates?
options
a. after querying the table, the update done by only the first update statement is
reflected in the table.
b. after querying the table, the update done by the first update statement is not
reflected in the table.
c. after querying the table, the updates done by both the update statements are
reflected correctly.
d. after querying the table, the updates done by both the update statements are
reflected. however, the update done by the first update statement is reflected
incorrectly.

24/ titles and publishers are two tables in the pubs database. there exists the
following types of indexes on both the tables:

titles
- clustered index on title_id
- nonclustered index on pub_id, ytd_sales, title

publishers
- clustered index on pub_id
- nonclustered index on city, state

identify the indexes that will be used when you execute the following sql
statement:
select pubname, city, state, title
from titles join publishers
on publishers.pub_id = titles.pub_id
options
a. titles � nonclustered index on pub_id
publishers � clustered index on pub_id
b. titles � clustered index on title_id
publishers � clustered index on pub_id
titles � clustered index on title_id
c. publishers � nonclustered index on pub_id, city, state
titles � nonclustered index on pub_id, title
d. publishers � nonclustered index on pub_id, city, state

25/ consider the following trigger on the sales table:


create trigger trgdelsales
on sales for delete
as
rollback transaction
predict the output when the following command is issued:
delete sales
where datepart(yy,tran_dt) < 1990
options
a. sales details for items sold in the year 1990 will be deleted from the sales
table.
b. no records will be deleted from the sales table.
c. the sales details for the items sold in and before the year 1990 will be
deleted from the sales table.
d. sales details of items sold before the year 1990 will be deleted from the sales
table.

26/ in the absence of locking, a problem may occur when two or more transactions
try to modify the same row based on the originally selected value. identify the
type of problem?
options
a. lost updates
b. dirty read
c. inconsistent analysis
d. phantom reads

27/ consider the following table:


items

itno i001
qoh 30
price 10

predict the output of the following trigger when the sales of 30 units are
accepted for the item code �i001�.

create trigger trginssales


on sales for insert
as
begin
declare @var1 int,@var2 int
select @var1 = qoh from items, inserted
where items.itno = inserted.itno
select @var2=@var1 � qty_reqd
from inserted
if @var2 <= 10
begin
print �low stocks�
rollback transaction
end
update items
set qoh = qoh � @var1
from items, inserted
where items.itno = inserted.itno
end
options
a. the trigger will fire when a record is inserted in the sales table. the
transaction will be rejected because of low stocks.
b. the trigger will fire when a record is inserted in the sales table. the
insertion in the sales table and the updation of the items table will be
successfully accomplished.
c. the trigger will fire when a record is inserted in the sales table. the record
in the sales table will be successfully inserted but the items table will not be
updated because of low stocks.
d. the trigger will fire when a record is inserted in the sales table. however,
because of low stocks, the insertion in the sales table will be rejected while the
items table will get updated to represent the current stocks.

28/ consider the following statements:


statement a: the after trigger is executed even if constraints defined on the
table are violated.
statement b: the sequence of execution of after triggers can be changed using the
sp_triggerorder system stored procedure.

which of the following is correct for the above statements?


options
a. both statements are true.
b. both statements are false.
c. statement a is true, and statement b is false.
d. statement a is false, and statement b is true.

29/ identify the database object that is used to access and manipulate the data of
a resultset row-by-row?
options
a. procedure
b. trigger
c. view
d. cursor
30/ consider the following statements:
statement a: a cursor is a database object that allows access to rows one at a
time.
statement b: a cursor can be used to display the formatted output.
which of the following is correct for the statements given above?
options
a. both statements are true.
b. both statements are false.
c. statement a is true, and statement b is false.
d. statement a is false, and statement b is true.

31/ which of the following database objects can be used to print a report in the
following format:
publisher id: xxxx publisher name: xyz
state:xxxxx city:xxxxxx
options
a. procedure
b. triggers
c. cursor
d. batches

32/ identify the correct order of steps to be performed while using a cursor in
sql server.
step 1: closing the cursor
step 2: opening the cursor
step 3: fetching the row
step 4: releasing the cursor
step 5: declaring the cursor
options
a. step 5, step 2, step 3, step 1, and step 4
b. step 5, step 4, step 1, step 2, and step 3
c. step 1, step 2, step 3, step 4, and step 5
d. step 2, step 5, step 3, step 1, and step 4

33/ which of the following tools available in enterprise manager helps automate
administrative tasks by scheduling them to execute at a particular time?
options
a. data transformation services
b. job scheduling
c. database maintenance planner
d. sql server configuration properties

34/ consider the given situations:


a) a site uses data for summary reporting or trend reporting on sales activity for
the current year.
b) oltp activity is to be separated from decision-support activity.
c) location-specific information has to be distributed from a centralized location
to multiple locations.
d) data changes often and the changed information has to be replicated.
in which of the above situations should you apply the strategy of data
replication?
options
a. a, b, c, d
b. a, b, c
c. a, b, d
d. a, c, d
35/ in which document will you find the alternative solutions?
options
a. project request form
b. design specifications
c. system proposal
d. function specifications

36/ in which phase will you determine the scope of a project?


options
a. initiation
b. design
c. analysis
d. conception

37/ a client requests you to develop a system as soon as possible. the system to
be developed will be used to issue tickets. which process model will you use?
options
a. the waterfall model
b. the linear sequential model
c. the spiral model
d. the rapid application development model

38/ which of the following systems requirement analysis method is a representation


of information hierarchy?
options
a. data structured systems development
b. object oriented analysis
c. structured analysis and design technique
d. structured analysis

39/ in which era of software development was the object-oriented approach


introduced?
options
a. first era
b. second era
c. third era
d. fourth era

40/ which of the following is a correct description of a data dictionary?


options
a. a data dictionary consists of information about the behavior of the system as
depicted in the state transition diagram.
b. a data dictionary is a collection of all elements used or produced by the
software and gives a detailed description of each element in the software.
c. a data dictionary consists of a description of each process specified in the
data flow diagram.
d. a data dictionary is a document that describes the attributes of each data
object present in the entity relationship diagram.
------------------------------------------------------------------------
test1.doc

question text
consider the following statement:

statement a: one important property of a relation is that its rows are unordered.
therefore, a row cannot be identified by its position in the table.

statement b: a table where every row is different from all other rows is called a
relation.

which of the following is correct for the statements given above?


options

both statements are true.

both statements are false.

statement a is true, and statement b is false.

statement a is false, and statement b is true.


correct answer :-> 1

2.
question text
consider the statement given below::

statement a: a relationship can associate an entity with itself.

statement b: multiple relationships can also exist between the same entities.

which of the following is correct for the statements given above?


options

both statements are true.

both statements are false.

statement a is true, and statement b is false.

statement a is false, and statement b is true.


correct answer :-> 1

3.
question text
consider the following statements:

statement a: a table is said to be in 3 nf when every non-key attribute is


functionally dependent only on the primary key.

statement b: a table can be directly derived into 3 nf from 1 nf.

which of the following is correct for the above statements?


options

both statements are true.

both statements are false.

statement a is true, and statement b is false.

statement b is true, and statement a is false.


correct answer :-> 3

4.
question text
consider the following statement:
� a supplier ships certain parts. a particular part is not necessarily shipped by
only one supplier. no supplier ships only a single part.�

identify the tables that will be created when an e/r diagram is mapped to tables
based on the above statement?
options

supplier, items, and transaction

supplier and items

supplier and transaction. the supplier table containing the corresponding


item_code.

items and transaction. the items table containing the corresponding supplier_code.

correct answer :-> 1

5.
question text
which black box testing technique would you use to derive different test cases
based on different user inputs?
options

data flow testing

equivalence partitioning

boundary value analysis

comparison testing
correct answer :-> 2

6.
question text
which of the following best describes the software quality metrics?
options

software quality metrics are some implicit characteristics that are expected of
all professionally developed software.

software quality metrics are a number of factors affect the quality of software.

software quality metrics are a planned and systematic approach to the evaluation
of the quality of software products.

software quality metrics are a mathematical definition or function that you can
use to obtain the quantitative measurement of a software product.
correct answer :-> 4
7.
question text
which integrity ensures that the values in the foreign key match with the values
of the corresponding primary key?
options

referential integrity

domain integrity
entity integrity

user-defined integrity
correct answer :-> 1

8.
question text
consider the following statements:

statement a: the default can be bound to a column or a user-defined datatype.

statement b: the default cannot be bound to a column with existing default


constraint unless the constraint is dropped using the alter table statement.

which of the following is correct about the above statements?


options

both statements are true.

both statements are false.

statement a is true, and statement b is false.

statement a is false, and statement b is true.


correct answer :-> 1

9.
question text
to store the details of books published by various publishers, the following
tables were created using the create table statement.

create table books


(
cbookid char(4) not null,
cpublisherid char(6) not null,
cbookname char(30) not null,
ibookprice int not null
)

create table publisher


(
cpublisherid char(6) not null,
cpublishername char(30) not null,
cpublisheraddress char(40) not null,
cpublishercity char(35) not null,
cpublisherstate char(40) not null,
cpublisherphone char(15) not null
)

identify the correct step that will help maintain referential integrity between
the books and publisher tables.
options

create a user-defined datatype typpublisher of char(4) type and use it in only the
books table for the cpublisherid attribute.

create a primary key constraint on the cpublisherid attribute of the publisher


table and a foreign key constraint on the cpublisherid attribute of the books
table.

create a primary key constraint on the cpublisherid attribute of the books table
and a foreign key constraint on the cpublisherid attribute of the publisher table.

create a user-defined datatype typpublisher of the char(6) type and use it in both
the books and publisher tables for the cpublisherid attribute.
correct answer :-> 2

10.
question text
identify the correct sql statement to remove the student table from a database.
options

delete student

drop student

delete table student

drop table student


correct answer :-> 4

11.
question text
a table called employee needs to be created. a datatype called typemployeecode has
been created for the cemployeecode attribute of the employee table.

which of the following actions would you take in order to use the datatype in the
employee table?
options

use the sp_bindefault command to bind the datatype to the cemployeecode attribute
of the employee table.

use the sp_bindrule command to bind the datatype to the attribute of the table.

use the datatype in the create table statement of the employee table.

use the sp_addtype command to add the datatype to the employee table.
correct answer :-> 3

12.
question text
consider the following table:

create table employee


(empcode int identity(100,-1),
deptname char(25) null)

predict the output of the following sql statements

insert employee default values


insert employee default values
options

sql server inserts two rows in the employee table with 100 and 99 as the employee
code and null as the department name.

sql server inserts a row in the employee table with 99 as the employee code and
null as the department name.

sql server displays an error stating that no default is defined for the filed
deptname.

sql server inserts two rows in the employee table with 99 and 100 as the employee
codes and null as the department name.
correct answer :-> 1

13
question text
which of the following sql queries would display the titles that have the same
price?
options

select t1.title, t2.title, t1.price


from titles t1
join titles t2 on t1.price=t2.price
where t1.title_id<t2.title_id

select t1.title, t2.title, t1.price


from titles t1
join titles t2 on t1.price=t2.price

select title, price


from titles t1
join titles t2 on t1.price=t2.price

select *
from titles t1
join titles t2 on t1.price=t2.price
correct answer :-> 1

14
question text
predict the output of the following sql statement if the date of sale for the
given product is july 13, 2000 and the order date is july 1, 2000:

select datediff(yy, sale_dt, order_dt)


from transaction
where prod_id = �10202�

options

-1

13
correct answer :-> 3

15
question text
predict the output of the following sql statement:

select type, average=avg(ytd_sales)


from titles
where type in
(select type
from titles
where price <10)
group by type
options

displays the group-wise total of average year-to-date sales for the book type with
a price less than $10.

displays the group-wise total of average year-to-date sales by book type.

displays the total average year-to-date sales for all books with price less than
$10.

displays an error because one of the rule states that the group by clause cannot
be used in a subquery.
correct answer :-> 1

16
question text
predict the output of the following statement:

select stor_id, count(stor_id)


from sales
group by stor_id
having avg(qty)>=20
and countstor_id)>3
options

the query will display the details of those stores with whom the order is placed
more than 3 times with the average quantity ordered greater than equal to 20.

the query will display the details of those stores with whom the average quantity
ordered is greater than equal to 20.

the query will display the details of those stores with whom the order is placed
more than 3 times.

the query will display the details of those stores with whom the order is placed
more than 3 times and the quantity ordered is greater than equal to 20.
correct answer :-> 1

17
question text
predict the output of the following sql statement:

select * from publishers


where city like 'b%' and not city = 'boston'
options

the query will display the details of publishers who live in the city that has its
name starting with the alphabet b.
the query will display the details of publishers who do not live in the city that
has its name starting with the alphabet b.

the query will display the details of publishers who live in the city that has its
name starting with the alphabet b, other than boston.

the query will display the details of publishers who do not live in boston.
correct answer :-> 3

18
question text
predict the output of the following query:

select title, type, advance


from titles t1
where t1.advance > (select avg(t2.advance)
from titles t2 where t1.type = t2.type)
options

the query will display the details of books whose advance is greater than the
average advance paid for the books of the same type.

the query will display the details of books whose advance is greater than the
average advance paid.

the query will display the details of books whose advance is less than the average
advance paid for the books of the same type.

the query will display the details of books whose advance is greater than equal to
the average advance paid for the books of the same type.
correct answer :-> 1

19
question text
which of the following statements is correct about nonclustered indexes?
options

nonclustered indexes are typically created on foreign keys.

there can be only one nonclustered index per table.

a nonclustered index should be created before creating a clustered index.

a nonclustered index does not enforce the uniqueness of rows.


correct answer :-> 1

20
question text
identify the structure that is used by sql server to store data when a table does
not have a clustered index.
options

stack

queue

heap
linked list
correct answer :-> 3

21
question text
consider the following statements:

statement a: a view can be modified without dropping it, by using the alter
statement.

statement b: if a view with a select * statement has been defined and the
structure of the underlying tables is altered by adding new columns, the new
columns do not appear in the view.

which of the following is correct the statements?


options

both statements are true.

both statements are false.

statement a is true, and statement b is false.

statement b is true, and statement a is false.


correct answer :-> 1

22
question text
consider the following sql statement:

create index idxrno


on student(irno)

which of the following commands will you use to verify that the index has been
created on the student table?

options

sp_helptext idxrno

sp_helpindex idxrno

sp_helpindex idxrno

sp_helptext idxrno
correct answer :-> 2

23
question text
consider the table:
product
product_id
product_name
price
quantity_on_hand
which batch statement will ensure that the price of the products is increased by
$2 until the average price for all products is less than $30 or the maximum price
is less than $40?
options

while (select avg(pr) from sal)<30


begin
update sal
set pr=pr+2
select max(pr) from sal
if (select max(pr) from sal)>40
break
else
continue
end

while (select avg(pr) from sal)<30


begin
update sal
set pr=pr+2
select max(pr) from sal
if (select max(pr) from sal)<40
break
else
continue
end

while (select avg(pr) from sal)>30


begin
update sal
set pr=pr+2
select max(pr) from sal
if (select max(pr) from sal)>40
break
else
continue
end

while (select avg(pr) from sal)<30


begin
update sal
set pr=pr*.02
select max(pr) from sal
if (select max(pr) from sal)>40
break
else
continue
end
correct answer :-> 1

24.
question text
consider the following table:

subscriber
cemailid char(50)
cname char(30)
caddress char(50)
ccity char(60)
cstate char(70)
cpassword char(90)
ddateofsubscription datetime
ddateofexpiry datetime
mamountpaid money

which of the following procedures will you create to accept the e-mail id and
return the name and the password of the person to whom that e-mail id belongs?
options

create procedure prcsubscriber


@emailid char(50),
@name char(30),
@password char(90)
as
select @name=cname, @password=cpassword
from subscriber
where cemailid=@emailid

create procedure prcsubscriber


@emailid char(50),
@name char(30) null,
@password char(90) null
as
select @name=cname, @password=cpassword
from subscriber
where cemailid=@emailid

create procedure prcsubscriber


@emailid char(50),
@name char(30) output,
@password char(90) output
as
select @name=cname, @password=cpassword
from subscriber
where cemailid=@emailid

create procedure prcsubscriber


@emailid char(50) output,
@name char(30),
@password char(90)
as
select @name=cname, @password=cpassword
from subscriber
where cemailid=@emailid
correct answer :-> 3

25
question text
consider the following trigger on the sales table:

create trigger trgdelsales


on sales
for delete
as
rollback transaction

predict the output when the following command is issued:

delete sales
where datepart(yy,tran_dt) < 1990
options

sales details for items sold in the year 1990 will be deleted from the sales
table.

no records will be deleted from the sales table.

the sales details for the items sold in and before the year 1990 will be deleted
from the sales table.

sales details of items sold before the year 1990 will be deleted from the sales
table.
correct answer :-> 2

26
question text
in the absence of locking, a problem may occur when two or more transactions try
to modify the same row based on the originally selected value. identify the type
of problem?
options

lost updates

dirty read

inconsistent analysis

phantom reads
correct answer :-> 1

27
question text
which of the following triggers should be created to ensure automatic updation of
the quantity_on_hand field in the products table when a new row is inserted in the
sales table?
options

an insert trigger on the products table

an update trigger on the orders table

an insert trigger on the orders table

an update trigger on the products table


correct answer :-> 3

28
question text
consider the following trigger on the sales table:

create trigger trgdelsales


on sales
for delete
as
rollback transaction

predict the output when the following command is issued:

delete sales
where datepart(yy,tran_dt) < 1990
options

sales details for items sold in the year 1990 will be deleted from the sales
table.

no records will be deleted from the sales table.

the sales details for the items sold in and before the year 1990 will be deleted
from the sales table.

sales details of items sold before the year 1990 will be deleted from the sales
table.
correct answer :-> 2

29
question text
consider the following statements:

statement a: a schema lock is exercised whenever an alter statement for any object
in a database is defined.

statement b: the sp_lock stored procedure is used to view the information on


locks.

which of the following is correct about the above statements?


options

both statements are true.

both statements are false.

statement a is true, and statement b is false.

statement a is false, and statement b is true.


correct answer :-> 1

30
question text
predict the output of the following cursor:

declare @var1 char(10)


declare @var2 int
declare cur1 scroll cursor
for
select title_id, ytd_sales from titles
order by ytd_sales desc
open cur1
fetch absolute -5 from cur1 into @var1,@var2
while (@@fetch_status = 0)
begin
select 'title id is'+space(5)+@var1 +' yearly sales is'+space(5)
+convert(char(10),@var2)
fetch cur1 into @var1, @var2
end
close cur1
deallocate cur1
options

the cursor will print only the first five records from the resultset.

the sql server will print an error that �-5� is unrecognized field.

the cursor will print only the last five records from the resultset.

the sql server will print an error that the fetch type absolute cannot be used
with forward-only cursors.
correct answer :-> 3

31
question text
which type of locking mode is implemented when a select command is executed on a
table?
options

shared

update

exclusive

schema
correct answer :-> 1

32
question text
consider the following statements:

statement 1: you can fetch a specific row from the result set if the cursor is
defined as scrollable.

statement 2: you can only fetch the next row from the result set if the cursor is
defined as a forward-only cursor.

which of the following is correct about the above statements?


options

both statements are true.

both statements are false.

statement 1 is true and statement 2 is false.

statement 1 is false and statement 2 is true.


correct answer :-> 1

33
question text
which of the following tools available in enterprise manager helps automate
administrative tasks by scheduling them to execute at a particular time?
options

data transformation services

job scheduling

database maintenance planner

sql server configuration properties


correct answer :-> 2

34
question text
sql server replication helps maintain data consistency by synchronizing
information between databases. which of the following ways is used to implement
replication in batch files and scripts?
options

replication wizards and properties

replication programming interfaces

replication system stored procedures

windows synchronization manager


correct answer :-> 3

35
question text
in which phase of sdlc will you define how the system should work?
options

construction

analysis

initiation

design
correct answer :-> 4

36
question text
in which phase will you determine the scope of a project?
options

initiation

design

analysis

conception
correct answer :-> 4

37
question text
you have to develop a system to guide the flight of a spacecraft. this will
involve a large amount of algorithms and data. the system has to be very accurate.
which is the appropriate process model?
options

the waterfall model

the linear sequential model

the spiral model

the prototyping model


correct answer :-> 3

38
question text
which of the following systems requirement analysis method is a representation of
information hierarchy?
options

data structured systems development

object oriented analysis

structured analysis and design technique

structured analysis
correct answer :-> 1

39
question text
identify the third step of object-oriented analysis.
options

creating a class responsibility collaborator model

defining subsystems

defining structures and hierarchies

creating scenarios to identify the usage of software


correct answer :-> 1

40
question text
which phase of the waterfall model establishes the requirements for each system
element, such as software, hardware, and people, associated with software
development?
options

system engineering and analysis

software requirements analysis

maintenance

coding
correct answer :-> 1
-----------------------------------------------
test2.doc

1.
question text
consider the following statement:

statement a: one important property of a relation is that its rows are unordered.
therefore, a row cannot be identified by its position in the table.

statement b: a table where every row is different from all other rows is called a
relation.

which of the following is correct for the statements given above?


options

both statements are true.

both statements are false.

statement a is true, and statement b is false.

statement a is false, and statement b is true.


correct answer :-> 1

2.
question text
consider the following unnormalized project table structure:
project

ecode
projcode
dept
depthead
hours

after applying normalization rules, we derive the following two tables:


employeedept

ecode
dept
depthead
project

ecode
projcode
hours

identify the normalization rule that has been applied to derive the given table
structure.
options

1 nf

2 nf
3 nf

bcnf
correct answer :-> 2

3.
question text
consider the following statements:

statement a: a table is said to be in 3 nf when every non-key attribute is


functionally dependent only on the primary key.

statement b: a table can be directly derived into 3 nf from 1 nf.

which of the following is correct for the above statements?


options

both statements are true.

both statements are false.

statement a is true, and statement b is false.

statement b is true, and statement a is false.


correct answer :-> 3

4.
question text
consider the following statements:

statement a: the union of two or more lower-level entity sets to produce a higher-
level entity set is called specialization.

statement b: generalization states that every higher-level entity must also be a


lower-level entity.

which of the following is correct for the above statements?


options

both statements are true.

both statements are false.

statement a is true, and statement b is false.

statement b is true, and statement a is false.


correct answer :-> 4

5.
question text
which of the following is a configuration management activity?
options

measurement

baseline control
sqa audits

software testing
correct answer :-> 2

6.
question text
which of the following best describes the software quality assurance?
options

software quality assurance is an activity that ensures that the development team
follows documented steps to carry out a process.

software quality assurance is an activity that looks at a process and/or a product


in detail, comparing them with established procedures and standards.

software quality assurance is a planned and systematic approach to the evaluation


of the quality of a software product.

software quality assurance is an activity that helps the analyst to achieve high
quality design specifications and helps the designer to develop high quality
software design.
correct answer :-> 3

7.
question text
which integrity ensures that only a valid range of values is allowed to be stored
in a column?
options

referential integrity

domain integrity

entity integrity

user-defined integrity
correct answer :-> 2

8.
question text
consider the following statements:

statement a: rules do not apply to data that has already been inserted into a
table.

statement b: rules do not apply to data that has already been inserted into a
table if they are bound as futureonly.

which of the following is correct about the above statements?


options

both statements are true.

both statements are false.

statement a is true, and statement b is false.


statement a is false, and statement b is true.
correct answer :-> 3

9.
question text
create a table to store the following details of customers:
customer id,
name,
address,
password

while storing the details of customers, their ids, names, and passwords must be
stored. however, if their addresses are not known, they need not be stored. the id
of each customer should be unique and one null value should be acceptable.

which of the following statements should you use to create the customer table?
options

create table customer


(
ccustomerid char(6) constraint pkcustomerid primary key,
cname char(40) null,
caddress char(30) not null,
cpassword char(10) null
)

create table customer


(
ccustomerid char(6) constraint fkcustomerid foreign key,
cname char(40) null,
caddress char(30) not null,
cpassword char(10) null
)

create table customer


(
ccustomerid char(6) constraint pkcustomerid unique key,
cname char(40) not null,
caddress char(30) null,
cpassword char(10) not null
)

create table customer


(
ccustomerid char(6) constraint fkcustomerid foreign key,
cname char(40) not null,
caddress char(30) null,
cpassword char(10) not null
)
correct answer :-> 3

10.
question text
identify the sql statement that describes all the following conditions.

condition 1: item no should be unique.


condition 2: qoh and rol can accept null values.
condition 3: a constraint should be defined to ensure that the quantity_on_hand is
never less than the reorder level.
condition 4: item no should start with 100 and should decrement consecutively on
successive inserts.
options

create table items


(
itemno int identity(100,-1),
qoh int,
rol int,
constraint chkqrol check (qoh < rol)
)

create table items


(
itemno int constraint chkpk primary key,
qoh int null,
rol int null,
constraint chkqrol check (qoh < rol)
)

create table items


(
itemno int identity(100,-1) constraint chkpk primary key,
qoh int null,
rol int null constraint chkqrol check (qoh < rol)
)

create table items


(
itemno int constraint chkpk primary key,
qoh int,
rol int constraint chkqrol check (qoh < rol)
)
correct answer :-> 1

11.
question text
consider the table:
product

product_id
product_name
price
quantity_on_hand

which statement ensures that the quantity of products that are available is always
positive?
options

alter table product


add constraint chkqoh check (quantity_on_hand <0)

alter table product


add constraint chkqoh check (quantity_on_hand >0)
alter table product
add constraint chkqoh check (quantity_on_hand <=0)

alter table product


add constraint chkqoh check (quantity_on_hand >=0)
correct answer :-> 1

12.
question text
which of the following string functions is used to compare two strings to evaluate
the similarity between them?
options

difference

patindex

charindex

reverse
correct answer :-> 1

13.
question text
which of the following objects in a database constitutes a set of t-sql statements
that get activated in response to certain actions?
options

view

index

stored procedure

trigger
correct answer :-> 4

14.
question text
predict the output of the following sql statement:

select * from sales


where tran_date >= dateadd(dd,-3, getdate())
options

displays all the rows for which the date of sale is 3 days after the current
system date.

displays all the rows for which the date of sale is 3 days before the current
system date.

displays all the rows for which the date of sale is the current system date.

displays all the rows for which the date of sale is 3 weeks after the current
system date.
correct answer :-> 2
15.
question text
predict the output of the following sql statement:

select type, average=avg(ytd_sales)


from titles
where type in
(select type
from titles
where price <10)
group by type
options

displays the group-wise total of average year-to-date sales for the book type with
a price less than $10.

displays the group-wise total of average year-to-date sales by book type.

displays the total average year-to-date sales for all books with price less than
$10.

displays an error because one of the rule states that the group by clause cannot
be used in a subquery.
correct answer :-> 1

16.
question text
consider the following statements:

statement a: an outer join is possible only between two tables.

statement b: an outer join returns all records that do not match the rows in
related tables.

which of the following is correct about the above statements?


options

both statements are true.

both statements are false.

statement a is true, and statement b is false.

statement a is false, and statement b is true.


correct answer :-> 3

17
question text
predict the output of the following sql statement:

select * from publishers


where city like 'b%' and not city = 'boston'
options

the query will display the details of publishers who live in the city that has its
name starting with the alphabet b.
the query will display the details of publishers who do not live in the city that
has its name starting with the alphabet b.

the query will display the details of publishers who live in the city that has its
name starting with the alphabet b, other than boston.

the query will display the details of publishers who do not live in boston.
correct answer :-> 3

18.
question text
richard henry wants to display a detailed report from the titles table in the
specified format:

type title price


business xyz 3000
abc 200
========================================
sum 3200 (groupwise sum total)

modcook def 4000


ijk 500
========================================
sum 4500 (groupwise sum total)
========================================
sum 7700 (grand total)

which of the following sql statements will display the output as specified above?
options

select type, title, price


from titles
order by type
compute sum (price) by type
compute sum (price)

select type, title, price


from titles
compute sum (price) by type
compute sum (price)

select type, title, price


from titles
group by type

select type, title, price


from titles
order by type
compute sum (price)
correct answer :-> 1

19
question text
identify the system table that contains the address of a root page of an index.
options

sysobjects
sysreferences

sysdepends

sysindexes
correct answer :-> 4

20
question text
predict the output when the sql command given below is executed:

create view vwsales


as
select title_id, sum(qty)
from sales
group by title_id

options

the sql server will create a view, vwsales, which will display a summarized report
by title_id.

the sql server will not create a view, vwsales, because the group by clause cannot
be used within the create view statement.

the sql server will not create a view, vwsales, because no heading has been
defined for the aggrgate column.

the sql server will create a view, vwsales, and display an unorganized summary
report because the rows in the table have not been ordered using the order by
clause.
correct answer :-> 3

21
question text
consider the following statements:

statement a: a view can be modified without dropping it, by using the alter
statement.

statement b: if a view with a select * statement has been defined and the
structure of the underlying tables is altered by adding new columns, the new
columns do not appear in the view.

which of the following is correct the statements?


options

both statements are true.

both statements are false.

statement a is true, and statement b is false.

statement b is true, and statement a is false.


correct answer :-> 1

22
question text
consider the following sql statement:

create index idxrno


on student(irno)

which of the following commands will you use to verify that the index has been
created on the student table?

options

sp_helptext idxrno

sp_helpindex idxrno

sp_helpindex idxrno

sp_helptext idxrno
correct answer :-> 2

23
question text
consider the following stored procedure:

create procedure prcsales (@ord_no1 varchar(20), @ord_no2 varchar(20), @qty ord


int)
as
begin tran trntran1
update sales
set qty= qty-@qtyord
where ord_num = @ord_no1

update sales
set qty = qty+@qtyord
where ord_num = @ord_no2
commit tran

return

while executing the procedure, there is a system failure after the first update
statement and before the second update statement is executed. after the server
starts up, which of the following statements is correct for the updates?
options

after querying the table, the update done by only the first update statement is
reflected in the table.

after querying the table, the update done by the first update statement is not
reflected in the table.

after querying the table, the updates done by both the update statements are
reflected correctly.

after querying the table, the updates done by both the update statements are
reflected. however, the update done by the first update statement is reflected
incorrectly.
correct answer :-> 2

24
question text
consider the following table:

subscriber
cemailid char(50)
cname char(30)
caddress char(50)
ccity char(60)
cstate char(70)
cpassword char(90)
ddateofsubscription datetime
ddateofexpiry datetime
mamountpaid money

which of the following procedures will you create to accept the e-mail id and
return the name and the password of the person to whom that e-mail id belongs?
options

create procedure prcsubscriber


@emailid char(50),
@name char(30),
@password char(90)
as
select @name=cname, @password=cpassword
from subscriber
where cemailid=@emailid

create procedure prcsubscriber


@emailid char(50),
@name char(30) null,
@password char(90) null
as
select @name=cname, @password=cpassword
from subscriber
where cemailid=@emailid

create procedure prcsubscriber


@emailid char(50),
@name char(30) output,
@password char(90) output
as
select @name=cname, @password=cpassword
from subscriber
where cemailid=@emailid

create procedure prcsubscriber


@emailid char(50) output,
@name char(30),
@password char(90)
as
select @name=cname, @password=cpassword
from subscriber
where cemailid=@emailid
correct answer :-> 3

25.
question text
consider the following trigger on the sales table:

create trigger trgdelsales


on sales
for delete
as
rollback transaction

predict the output when the following command is issued:

delete sales
where datepart(yy,tran_dt) < 1990
options

sales details for items sold in the year 1990 will be deleted from the sales
table.

no records will be deleted from the sales table.

the sales details for the items sold in and before the year 1990 will be deleted
from the sales table.

sales details of items sold before the year 1990 will be deleted from the sales
table.
correct answer :-> 2

26
question text
in the absence of locking, a problem may occur when two or more transactions try
to modify the same row based on the originally selected value. identify the type
of problem?
options

lost updates

dirty read

inconsistent analysis

phantom reads
correct answer :-> 1

27
question text
which type of property is possessed by a transaction when a log is made to manage
all transactions?
options

atomicity

consistency

isolation
durability
correct answer :-> 4

28
question text
consider the following statements:

statement a: the after trigger is executed even if constraints defined on the


table are violated.

statement b: the sequence of execution of after triggers can be changed using the
sp_triggerorder system stored procedure.

which of the following is correct for the above statements?


options

both statements are true.

both statements are false.

statement a is true, and statement b is false.

statement a is false, and statement b is true.


correct answer :-> 4

29
question text
which type of locking indicates that sql server wants to acquire a shared or
exclusive lock on some of the resources at a lower level in the hierarchy?
options

shared

exclusive

update

intent
correct answer :-> 4

30
question text
consider the following statements:

statement a: a cursor is a database object that allows access to rows one at a


time.

statement b: a cursor can be used to display the formatted output.

which of the following is correct for the statements given above?


options

both statements are true.

both statements are false.


statement a is true, and statement b is false.

statement a is false, and statement b is true.


correct answer :-> 1

31
question text
which type of locking mode is implemented when a select command is executed on a
table?
options

shared

update

exclusive

schema
correct answer :-> 1

32
question text
consider the following statements:

statement 1: you can fetch a specific row from the result set if the cursor is
defined as scrollable.

statement 2: you can only fetch the next row from the result set if the cursor is
defined as a forward-only cursor.

which of the following is correct about the above statements?


options

both statements are true.

both statements are false.

statement 1 is true and statement 2 is false.

statement 1 is false and statement 2 is true.


correct answer :-> 1

33.
question text
which of the following tools available in enterprise manager helps automate
administrative tasks by scheduling them to execute at a particular time?
options

data transformation services

job scheduling

database maintenance planner

sql server configuration properties


correct answer :-> 2
34
question text
consider the given situations:

a) a site uses data for summary reporting or trend reporting on sales activity for
the current year.
b) oltp activity is to be separated from decision-support activity.
c) location-specific information has to be distributed from a centralized location
to multiple locations.
d) data changes often and the changed information has to be replicated.

in which of the above situations should you apply the strategy of data
replication?
options

a, b, c, d

a, b, c

a, b, d

a, c, d
correct answer :-> 2

35
question text
in which phase of sdlc will you define how the system should work?
options

construction

analysis

initiation

design
correct answer :-> 4

36
question text
you are developing a system by using the rad model. in which phase will you
determine the information generated by the processes of the system?
options

the business modeling phase

the data modeling phase

the process modeling phase

the testing and turnover phase


correct answer :-> 1

37
question text
your client needs a system for an automobile firm. your client finds it difficult
to explain the requirements for the system. which process model is appropriate to
develop the system?
options

the waterfall model

the linear sequential model

the spiral model

the prototyping model


correct answer :-> 4

38
question text
which of the following systems requirement analysis method is a representation of
information hierarchy?
options

data structured systems development

object oriented analysis

structured analysis and design technique

structured analysis
correct answer :-> 1

39
question text
identify the definition of a data flow diagram.
options

data flow diagram is a graphical representation of information flow and


transformation of data that occurs when data moves from an input device to an
output device.

data flow diagram depicts the relationships between the various data objects.

data flow diagram indicates the behavior of a system as a result of external


events.

data flow diagram consists of the description of each process specified in the
state transition diagram.
correct answer :-> 1

40
question text
which of the following is a correct description of a data dictionary?
options

a data dictionary consists of information about the behavior of the system as


depicted in the state transition diagram.

a data dictionary is a collection of all elements used or produced by the software


and gives a detailed description of each element in the software.

a data dictionary consists of a description of each process specified in the data


flow diagram.
a data dictionary is a document that describes the attributes of each data object
present in the entity relationship diagram.
correct answer :-> 2

test 2
1.1
2.2
3.3
4.4
5.2
6.3
7.2
8.3
9.3
10.1
11.1
12.1
13.4
14.2
15.1
16.3
17.3
18.1
19.4
20.3

21.1
22.2
23.2
24.3
25.2
26.1
27.4
28.4
29.4
30.1
31.1
32.1
33.2
34.2
35.4
36.1
37.4
38.1
39.1
40.2

You might also like