Computer Science and Information Technology - Database Management System
Exam Duration: 45 Mins Total Questions : 30
The process of assigning similar objects/entities to object classes/entity type, known as
- (a)
classification
- (b)
instantiation
- (c)
specialization
- (d)
generalization
The interface between the low level data stored in the database and the application programs provide by the
- (a)
storage manager
- (b)
query processor
- (c)
data model
- (d)
transaction manager
The concurrent transaction executions proceed without conflicting are ensured by
- (a)
transaction manager
- (b)
query processor
- (c)
storage manager
- (d)
data model
Iif every non-key attributes is functionally depentdent on the primary key, then the relation will be in
- (a)
first normal form
- (b)
Second normal form
- (c)
third normal form
- (d)
fourth normal form
What are the potential problems when a DBMS executes multiple transcations concurrently?
1.The lost update problem
2.The dirty read problem
3.The unrepeatable read problem
4.The phantom problem
- (a)
3 and 4
- (b)
1, 2 and 4
- (c)
2 and 3
- (d)
All of these
Minimal super key is
- (a)
primary key
- (b)
partial key
- (c)
candidate key
- (d)
super key
Like 'Amit\%Shah%' EsCAPE'\' matches
- (a)
gives error
- (b)
all string beginning with "Amit\%Shah"
- (c)
all string beginning with "Amit%Shah"
- (d)
all string beginning with "AmitShah"
The five aggregation operators in SQL are
- (a)
SUM, AVG, IN, DISTINCT, COUNT
- (b)
SUM, AVG, MIN, MAX, COUNT
- (c)
SUM, AVG, MIN, MAX, DISTINCT
- (d)
SUM, AVG, IN, ALL, ANY
A specific example where physical data independence would not hold is
- (a)
when data file is changed from an unordered file to a sorted file.
- (b)
When an additional access structure is created for a relation
- (c)
When DBA decides to store the data in a B+ TREE
- (d)
When the user writes an application program to join tables
Projection in SQL is achieved by
- (a)
WHERE
- (b)
FROM
- (c)
PROJECT
- (d)
SELECT
In SQL, which command is used to create a synonym for a schema object?
- (a)
CREATE SAME
- (b)
CREATE SYNONYM
- (c)
CREATE SCHEMA
- (d)
None of these
If P and Q are predicates and P is the relational algebra expression, then which of the following equivalence are valid?
- (a)
\({ \sigma }_{ P }({ \sigma }_{ Q }(e))={ \sigma }_{ Q }({ \sigma }_{ P }(e))\)
- (b)
\({ \sigma }_{ P }({ \sigma }_{ Q }(e))={ \sigma }_{ P\cap Q }(e)\)
- (c)
\({ \sigma }_{ Q }({ \sigma }_{ P }(e))={ \sigma }\Sigma _{ P\cap Q }(e)\)
- (d)
All of the above
The minimum numbers of tab le needed to represent M,N,P,R1,R2 is
- (a)
2
- (b)
3
- (c)
4
- (d)
5
Which of the following query transformation (i.e, replacing the LHS expression by the RHS expression) is incorrect? R1 and R2 are relations.C1,C2 are selection conditions and A1,A.2 are attributes of R1
- (a)
\(\pi { A }_{ 2 }({ \sigma }_{ { C }_{ 1 } }({ R }_{ 1 }))\quad ->\sigma { C }_{ 1 }(\Pi { A }_{ 2 }({ R }_{ 1 }))\)
- (b)
\({ \sigma }_{ { C }_{ 1 } }(\Pi A,{ R }_{ 1 }))\quad ->\Pi { A }_{ 1 }(\sigma { C }_{ 1 }({ R }_{ 1 }))\)
- (c)
\({ \sigma }{ C }_{ 1 }({ R }_{ 1 }\cap { R }_{ 2 })\quad ->{ \sigma }_{ { C }_{ 1 } }({ R }_{ 1 })\cup { \sigma }_{ { C }_{ 1 } }({ R }_{ 2 })\)
- (d)
\({ \sigma }{ C }_{ 1 }({ \sigma }_{ { C }_{ 1 } }({ R }_{ 1 }))\quad ->{ \sigma }{ C }_{ 2 }({ \sigma }_{ { C }_{ 2 } }({ R }_{ 1 }))\)
Relation C is the join of relation A and relation B on condition P
Which of the following statements must be true in all classes?
- (a)
The cordinality of C is freater than the cordinality of A
- (b)
The arity of C is greater than the arity of A
- (c)
The cordinality of C is less than the arity of A
- (d)
None of the above
Consider the relation Student (name, sex, marks),where the primary key is shown underlined pertaining to students in a class that has at least one boy and one girl.What does the following relational algebra expression produce?(Note: \(\rho \) is the rename operator)
\(\Pi _{ name }(r_{ sex=female }(Student)-{ \pi }_{ name }(Student)\)
\(\quad \bowtie \) pn,x,m (student)
sex=female
\(\wedge x=male\\ \wedge marks\le m\)
- (a)
names of girl students with the higher marks
- (b)
names of girl students with more marks than some boy student
- (c)
names of girl students with marks not less than some boy student
- (d)
names of girl students with more marks than all the boy students
Indicate which of the following statements are true:
A relation database which is in 3NF may still have undesirable data redundancy because there may exist
- (a)
transitive functional dependencies
- (b)
non-trivial functional dependencies involving prime attributes on the right side
- (c)
non-trivial functional dependencies involving prime attributes on the left side
- (d)
non-trivial functional dependencies involving only prime attributes
Consider a relation R with five attributes V,W,X,Y, and Z.The following functional dependencies hold: VY->W, WX->Z, and ZY->V. Which of the following is a candidates key for R?
- (a)
VXZ
A lack of normalization can lead to which one of the following problems?
- (a)
Insertion problems
- (b)
Deadlock
- (c)
Lost up dates
- (d)
Deferred updates
Which of the following is correct statement about SQL?
- (a)
Data control language provides facilities to retrieve data
- (b)
Data manipulation language can delete all records and tables in a database
- (c)
Data definition language provides facilities to add more data into a database while providing integrity of data
- (d)
Data definition language provides facilities to modify structures of tables.
Consider the relation employee (\(\underline { name } \), sex, supervisorName) with name as the key.supervisorName gives the name of the supervisor of the employee under consideration. What does the Following Tuple Relational Calculus query produce?
{e.name|employee (e) \(\bigwedge \)}
\((\forall x)\quad [employee(x)\vee \quad x.supervisorName\\ \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad\neq x.sex="male"]\} \)
- (a)
Names of employees with a male supervisor
- (b)
Names of employees with no immediate male
- (c)
Names of employees with no immediate female subordinate
- (d)
Names of employees with a female supervisor
Cascading roll back is one in which
- (a)
single transaction failure leads to single transaction roll back
- (b)
if all transaction are failed then only all transactions are rolled back
- (c)
single transaction failure leads to all transaction roll back
- (d)
None of the above
Lock point of transaction occurs when
- (a)
transaction gets first lock
- (b)
transaction release all lock
- (c)
transaction gets it's final lock
- (d)
None of the above
Which of the following functional dependency implies this set?
- (a)
\(ACF\rightarrow DG\)
- (b)
\(DG\rightarrow ACF\)
- (c)
\(F\rightarrow DGC\)
- (d)
\(F\rightarrow A\)
Lock point of a schedule indicates
- (a)
initial lock of the schedule
- (b)
final lock of the schedule
- (c)
there is no term lock point
- (d)
None of the above
Cascading rollback can be avoided by
- (a)
two phase locking protocol
- (b)
strict two phase locking protocol
- (c)
cannot be avoided
- (d)
can be avoided but there is no actual protocol
Main difference between B+ tree and B tree index file is
- (a)
B tree eliminates the redundant storage of search key value
- (b)
B tree contains redundant search key
- (c)
B tree takes constant time for look up operation
- (d)
None of the above
Which of the following is true?
- (a)
A file can have atmost one primary index or atmost one clustering index
- (b)
A file can have at least one primary index or atleast one clustering index
- (c)
A file can have both primary index and clustering index
- (d)
None of the above
Consider the following funct5ional dependencies in a database:
Date_of_Birth -> Age
Age -> Eligibility
Name -> Roll_Number
Roll_Number -> Name
Course_number -> Course_nmae
Course_number -> Instructor
(Roll_number, Course_number) -> Grade
The relation(Roll_number, Name, Date_of_birth, Age) is
- (a)
in second normal form but not in third normal form
- (b)
in third normal form but not in BCNF
- (c)
in BCNF
- (d)
None of the above
Consider the following SQL query:
select distinct a1, a2, ........., an from r1,r2, ......., rm
Where P
For an arbitrary predicate P, this query is equivalent to which of the following relational algebra expressions?
- (a)
\(\underset { { a }_{ 1 }{ a }_{ 2 },...{ a }_{ n } }{ \Pi } { \sigma }_{ P }\left( { r }_{ 1 }\times { r }_{ 2 }\times .....\times { r }_{ m } \right) \)
- (b)
\(\underset { { a }_{ 1 }{ a }_{ 2 },...{ a }_{ n } }{ \Pi } { \sigma }_{ P }\left( { r }_{ 1 }\rhd \lhd { r }_{ 2 }\rhd \lhd .....\rhd \lhd { r }_{ m } \right) \)
- (c)
\(\underset { { a }_{ 1 }{ a }_{ 2 },...{ a }_{ n } }{ \Pi } { \sigma }_{ P }\left( { r }_{ 1 }\cup { r }_{ 2 }\cup .....\cup { r }_{ m } \right) \)
- (d)
\(\underset { { a }_{ 1 }{ a }_{ 2 },...{ a }_{ n } }{ \Pi } { \sigma }_{ P }\left( { r }_{ 1 }\cap { r }_{ 2 }\cap .....\cap { r }_{ m } \right) \)