dbms 2
dbms 2
3. In order to undo the work of transaction after last commit which one should be
used?(c)
a) View
b) Commit
c) Rollback
d) Flashback
TRANSACTION.....
Commit;
ROLLBACK;
5. In case of any shut down during transaction before commit which of the following
statement is done automatically?(c)
a) View
b) Commit
c) Rollback
d) Flashback
d) Maintaining a data
9. Which of the following is used to get back all the transactions back after rollback?
(c)
a) Commit
b) Rollback
c) Flashback
d) Redo
5. Foreign key is the one in which the ________ of one relation is referenced in
another relation.(b)
a) Foreign key
b) Primary key
c) References
d) Check constraint
6.
Which of the following is used to delete the entries in the referenced table when the
tuple is deleted in course table?(b)
3
a) Delete
b) Delete cascade
c) Set null
d) All of the mentioned
3.
4
Here which one denotes the relation for which index is created?(d)
a) StudentID_index
b) ID
c) StudentID
d) Student
6. Values of one type can be converted to another domain using which of the
following?(a)
a) Cast
b) Drop type
c) Alter type
d) Convert
7.
In order to ensure that an instructor’s salary domain allows only values greater than
a specified value use(c)
a) Value>=30000.00
b) Not null;
c) Check(value >= 29000.00);
d) Check(value)
9. In contemporary databases, the top level of the hierarchy consists of ______ each
of which can contain _____(a)
a) Catalogs, schemas
5
b) Schemas, catalogs
c) Environment, schemas
d) Schemas, Environment
10. Which of the following statements creates a new table temp instructor that has
the same schema as an instructor.(b)
a) create table temp_instructor;
b) Create table temp_instructor like instructor;
c) Create Table as temp_instructor;
d) Create table like temp_instructor;
1. The database administrator who authorizes all the new users, modifies the
database and takes grants privilege is(d)
a) Super user
b) Administrator
c) Operator of operating system
d) All of the mentioned
b)
c)
d)
4. Which of the following statement is used to remove the privilege from the user
Amir?(b)
a) Remove update on department from Amir
b) Revoke update on employee from Amir
c) Delete select on department from Raj
d) Grant update on employee from Amir
b)
c)
7. If we wish to grant a privilege and to allow the recipient to pass the privilege on to
other users, we append the __________ clause to the appropriate grant command.(d)
a) With grant
b) Grant user
c) Grant pass privelege
d) With grant option
9. Which of the following is used to avoid cascading of authorizations from the user?
(b)
a) Granted by current role
b) Revoke select on department from Amit, Satoshi restrict;
c) Revoke grant option for select on department from Amit;
d) Revoke select on department from Amit, Satoshi cascade;
.
10. The granting and revoking of roles by the user may cause some confusions when
that user role is revoked. To overcome the above situation(a)
a) The privilege must be granted only by roles
b) The privilege is granted by roles and users
c) The user role cannot be removed once given
d) By restricting the user access to the roles
1. Which of the following is used to access the database server at the time of
executing the program and get the data from the server accordingly?(b)
a) Embedded SQL
b) Dynamic SQL
c) SQL declarations
d) SQL data analysis
5. Which of the following function is used to find the column count of the particular
resultset?(a)
a) getMetaData()
8
b) Metadata()
c) getColumn()
d) get Count()
8. Which of the following is used to distinguish the variables in SQL from the host
language variables?(c)
a) .
b) –
c) :
d) ,
10. Which of the following is used to access large objects from a database ?(d)
a) setBlob()
b) getBlob()
c) getClob()
d) all of the mentioned
3. Which of the following is used to input the entry and give the result in a variable in
a procedure?(d)
a) Put and get
b) Get and put
c) Out and In
d) In and out
6.
9
Repeat
sequence of statements;
__________________
end repeat
3. The CREATE TRIGGER statement is used to create the trigger. THE _____ clause
specifies the table name on which the trigger is to be attached. The ______ specifies
that this is an AFTER INSERT trigger.(b)
a) for insert, on
b) On, for insert
c) For, insert
d) None of the mentioned
1. Any recursive view must be defined as the union of two subqueries: a _______
query that is nonrecursive and a __________ query.(a)
a) Base, recursive
b) Recursive, Base
c) Base, Redundant
d) View, Base
4. The __________ function that does not create gaps in the ordering.(d)
a) Intense_rank()
b) Continue_rank()
c) Default_rank()
d) Dense_rank()
5.
6. If there are n tuples in the partition and the rank of the tuple is r, then its ________
is defined as (r −1)/(n−1).(c)
a) Ntil()
b) Cum_rank
c) Percent_rank
d) rank()
12
7. Inorder to simplify the null value confusion in the rank function we can specify(d)
a) Not Null
b) Nulls last
c) Nulls first
d) Either Nulls last or first
9. The functions which construct histograms and use buckets for ranking is(c)
a) Rank()
b) Newtil()
c) Ntil()
d) None of the mentioned
10. The command ________________ such tables are available only within the
transaction executing the query and are dropped when the transaction finishes.(b)
a) Create table
b) Create temporary table
c) Create view
d) Create label view
2. Data that can be modeled as dimension attributes and measure attributes are
called _______ data.(a)
a) Multidimensional
b) Singledimensional
c) Measured
d) Dimensional
4. The process of viewing the cross-tab (Single dimensional) with a fixed value of one
attribute is(a)
a) Slicing
b) Dicing
c) Pivoting
d) Both Slicing and Dicing
a) Rollup
b) Drill down
c) Dicing
d) Pivoting
9.
10. Which one of the following is the right syntax for DECODE?(d)
a) DECODE (search, expression, result [, search, result]… [, default])
b) DECODE (expression, result [, search, result]… [, default], search)
c) DECODE (search, result [, search, result]… [, default], expression)
d) DECODE (expression, search, result [, search, result]… [, default])
4. For select operation the ________ appear in the subscript and the ___________
argument appears in the paranthesis after the sigma.(a)
a) Predicates, relation
b) Relation, Predicates
c) Operation, Predicates
d) Relation, Operation
5. The ___________ operation, denoted by −, allows us to find tuples that are in one
relation but are not in another.(b)
a) Union
b) Set-difference
c) Difference
d) Intersection