Professional Documents
Culture Documents
options
1. application programmer
2. sophisticated user
3. end user
4. database administrator
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
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
----------------------------------------------------------------------------------
-----------------
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
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
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
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
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
----------------------------------------------------------------------------------
-----------------
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
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
database administrator
2.
the three-level architecture of a dbms helps achieve ______.
data integrity
data security
data redundancy
3.
in which of the following models is data represented in the form of a tree?
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:
regular entities
subtypes
supertypes
6.
which data model has the database structured in fixed-format records of several
types?
network model
hierarchical model
7.
which of the following features is essential for two tables to be union
compatible?
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?
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
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?
select a dbms, purchase it, and populate the database with data.(dung)
2.
who performs the task of concurrency control in a dbms?
disk manager
file manager
database administrator
3.
in which of the following models is data represented in the form of a tree?
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
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
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?
13.
which data integrity constraint requires that a column contain a non-null value?
entity integrity
referential integrity
business rules
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?
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
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?
dts utility
bcp utility
16.
identify the statement that limits the number of rows returned in the result set.
group by
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?
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.
group by
22.
cts refers to:
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 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?
29.
which of the following statements is not true about parameter array?
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?
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?
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 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 acts like a virtual database containing tables, rows, and columns.
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.
36.
which of the followings is the benefit of disconnected data architecture?
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.
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.
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
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
options
1. primary key constraint
2. unique constraint
3. check constraint
4. default constraint
correct answer :-> 2
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
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'
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.
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.
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
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
options
1. sp_addlogin
2. sp_adduser
3. sp_srvaddrolemember
4. sp_addsrvrolemember
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
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')
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
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
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&g'
options
1. deletion successful
details of the publisher deleted:
pub_id pub_name city state country
------ ----------------------------------------------------
9901 ggg&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&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&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&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
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
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
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 )
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.
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
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
options
1. &
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
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.
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. &apostrophe
2. @apost
3. @aps
4. &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?
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?
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?
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?
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.
project
ecode
projcode
dept
depthead
hours
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
)
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
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:
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:
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�.
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:
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
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
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.
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
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
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.
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
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
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�.
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
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
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.
2.
question text
consider the statement given below::
statement b: multiple relationships can also exist between the same entities.
3.
question text
consider the following statements:
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
items and transaction. the items table containing the corresponding supplier_code.
5.
question text
which black box testing technique would you use to derive different test cases
based on different user inputs?
options
equivalence partitioning
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:
9.
question text
to store the details of books published by various publishers, the following
tables were created using the create table statement.
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 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
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:
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 *
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:
options
-1
13
correct answer :-> 3
15
question text
predict the output of the following sql statement:
displays the group-wise total of average year-to-date sales for the book type with
a price less than $10.
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:
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:
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:
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
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.
22
question text
consider the following sql statement:
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
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
25
question text
consider the following trigger on the sales table:
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.
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
28
question text
consider the following trigger on the sales table:
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.
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.
30
question text
predict the output of the following cursor:
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.
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
job scheduling
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
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
38
question text
which of the following systems requirement analysis method is a representation of
information hierarchy?
options
structured analysis
correct answer :-> 1
39
question text
identify the third step of object-oriented analysis.
options
defining subsystems
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
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.
2.
question text
consider the following unnormalized project table structure:
project
ecode
projcode
dept
depthead
hours
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:
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.
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 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.
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
10.
question text
identify the sql statement that describes all the following conditions.
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
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:
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:
displays the group-wise total of average year-to-date sales for the book type with
a price less than $10.
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 b: an outer join returns all records that do not match the rows in
related tables.
17
question text
predict the output of the following sql statement:
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:
which of the following sql statements will display the output as specified above?
options
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:
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.
22
question text
consider the following sql statement:
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:
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
25.
question text
consider the following trigger on the sales table:
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.
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 b: the sequence of execution of after triggers can be changed using the
sp_triggerorder system stored procedure.
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:
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.
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
job scheduling
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
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
38
question text
which of the following systems requirement analysis method is a representation of
information hierarchy?
options
structured analysis
correct answer :-> 1
39
question text
identify the definition of a data flow diagram.
options
data flow diagram depicts the relationships between the various data objects.
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
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