# Online Test Quiz -cs-b

40 Questions  Settings  .

Related Topics
• 1.
Which of the following gives a logical structure of the database graphically ?
• A.

Entity-relationship diagram

• B.

Entity diagram

• C.

Both A and B are correct.

• D.

Neither A nor B

• 2.
Every weak entity set can be converted into a strong entity set by:
• A.

Using generalization

• B.

• C.

Using aggregation

• D.

None of the above

• 3.
In a one-to-many relationship, the entity that is on the one side of the relationship is called a(n) ________ entity.
• A.

Parent

• B.

Child

• C.

Subtype

• D.

Instance

• 4.
Weak entity relationship is represented as
• A.

Underline

• B.

Double line

• C.

Double diamond

• D.

Double rectangle

• 5.
The ER model includes additional concepts like:
• A.

Specialization

• B.

Generalization

• C.

Categorization

• D.

All of the Above

• 6.
E-R modelling techniques is a:
• A.

Top-down approach

• B.

Bottom-up approach

• C.

Left-right approach

• D.

None of the above

• 7.
The total participation by entities is represented in E-R diagram as
• A.

Dashed line

• B.

Double line

• C.

Double rectangle

• D.

Circle

• 8.
Which relationship is used to represent a specialization entity ?
• A.

ISA

• B.

AIS

• C.

ONIS

• D.

WHOIS

• 9.
A _____________ constraint requires that an entity belong to no more than one lower-level entity set.
• A.

Disjointness

• B.

Uniqueness

• C.

Special

• D.

Relational

• 10.
The completeness constraint may be one of the following: Total generalization or specialization , Partial generalization or specialization . Which is the default ?
• A.

Total

• B.

Partial

• C.

Should be specified

• D.

Cannot be determined

• 11.
• A.

2NF

• B.

5NF

• C.

4NF

• D.

3NF

• 12.
Consider a schema R(A, B, C, D) and functional dependencies A -> B and C -> D. Then the decomposition of R into R1 (A, B) and R2(C, D) is
• A.

Dependency preserving and lossless join

• B.

Lossless join but not dependency preserving

• C.

Dependency preserving but not lossless join

• D.

(d) not dependency preserving and not lossless join

• 13.
Relation R with an associated set of functional dependencies, F, is decomposed into BCNF. The redundancy (arising out of functional dependencies) in the resulting set of relations is
• A.

Zero

• B.

More than zero but less than that of an equivalent 3NF decomposition

• C.

Proportional to the size of F+

• D.

Indeterminate

• 14.
A table has fields F1, F2, F3, F4, and F5, with the following functional dependencies: 1) F1->F3 2) F2->F4 3) (F1,F2)->F5 in terms of normalization, this table is in
• A.

1NF

• B.

2NF

• C.

3NF

• D.

NONE OF THE ABOVE

• 15.
Consider the following functional dependencies in a database. 1) Date_of_Birth->Age 2) Age->Eligibility 3)Name->Roll_number 4)Roll_number->Name 5)Course_number->Course_name 6)Course_number->Instructor 7)(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.

In none of the above

• 16.
The relation schema Student_Performance (name, courseNo, rollNo, grade) has the following FDs: 1) name,courseNo->grade 2) rollNo,courseNo->grade 3)name->rollNo 4) rollNo->name The highest normal form of this relation scheme is
• A.

2NF

• B.

BCNF

• C.

3NF

• D.

4NF

• 17.
The relation EMPDT1 is defined with attributes empcode(unique), name, street, city, state, and pincode. For any pincode,there is only one city and state. Also, for any given street, city and state, there is just one pincode. In normalization terms EMPDT1 is a relation in
• A.

1NF only

• B.

3NF and hence also in 2NF and 1NF

• C.

BCNF and hence also in 3NF, 2NF and 1NF

• D.

2NF and hence also in 1NF

• 18.
• A.

A prime attribute can be transitively dependent on a key in a BCNF relation.

• B.

Any relation with two attributes is in BCNF

• C.

A relation in which every key has only one attribute is in 2NF

• D.

A prime attribute can be transitively dependent on a key in a 3 NF relation.

• 19.
Consider the following relational schemes for a library database: Book (Title, Author, Catalog_no, Publisher, Year, Price) Collection (Title, Author, Catalog_no) With the following functional dependencies: I. Title Author -> Catalog_no II. Catalog_no -> Title Author Publisher Year III. Publisher Title Year -> Price Assume {Author, Title} is the key for both schemes. Which of the following statements is true?
• A.

Both Book and Collection are in 3NF only

• B.

Book is in 2NF and Collection is in 3NF

• C.

Both Book and Collection are in BCNF

• D.

Both Book and Collection are in 2NF only

• 20.
Let R(A,B,C,D,E,P,G) be a relational schema in which the following FDs are known to hold: 1) AB->CD 2) DE->P 3) C->E 4) P->C 5) B->G The relation schema R is
• A.

Not in 2NF

• B.

In 3NF, but not in BCNF

• C.

In 2NF, but not in 3NF

• D.

In BCNF

• 21.
Relation R has eight attributes ABCDEFGH. Fields of R contain only atomic values. F={CH→G, A→BC, B→CFH, E→A, F→EG} is a set of functional dependencies (FDs) so that F + is exactly the set of FDs that hold for R. How many candidate keys does the relation R have?
• A.

3

• B.

5

• C.

4

• D.

6

• 22.
Relation R has eight attributes ABCDEFGH. Fields of R contain only atomic values. F={CH→G, A→BC, B→CFH, E→A, F→EG} is a set of functional dependencies (FDs) so that F + is exactly the set of FDs that hold for R. The relation R is
• A.

In 2NF, but not in 3NF.

• B.

In 3NF, but not in BCNF.

• C.

In 1NF, but not in 2NF.

• D.

In BCNF.

• 23.
Every time attribute A appears, it is matched with the same value of attribute B, but not the same value of attribute C. Therefore, it is true that:
• A.

A → B.

• B.

A → C.

• C.

A → (B,C).

• D.

(B,C) → A.

• 24.
A functional dependency is a relationship between or among:
• A.

Tables

• B.

Rows

• C.

Relations

• D.

Attributes

• 25.
If every functional dependency in set E is also in closure of F then this is classified as
• A.

FD is covered by E

• B.

E is covered by F

• C.

F is covered by E

• D.

F+ is covered by E

• 26.
Inst_dept (ID, name, salary, dept name, building, budget) is decomposed into instructor (ID, name, dept name, salary) department (dept name, building, budget) This comes under
• A.

Lossy-join decomposition

• B.

Lossy decomposition

• C.

Lossless-join decomposition

• D.

Both a and b

• 27.
Consider a relation R(A,B,C,D,E) with the following functional dependencies: ABC -> DE and D -> AB The number of superkeys of R is:
• A.

2

• B.

7

• C.

10

• D.

15

• 28.
In a two-phase locking protocol, a transaction release locks in ......... phase.
• A.

Shrinking phase

• B.

Growing phase

• C.

Running phase

• D.

Initial phase

• 29.
............ protocol grantees that a set of transactions becomes serializable.
• A.

Two phase locking

• B.

Two phase commit

• C.

Transaction locking

• D.

Checkpoints

• 30.
The situation in which a transaction holds a data item and waits for the release of data item held by some other transaction, which in turn waits for another transaction, is called .......
• A.

Serialiable schedule

• B.

Process waiting

• C.

Concurrency

• D.

• 31.
The database system must take special actions to ensure that transactions operate properly without interference from concurrently executing database statements. This property is referred to as
• A.

Atomicity

• B.

Durability

• C.

Isolation

• D.

Consistency

• 32.
• A.

Record controller

• B.

Exclusive lock

• C.

Authorization rule

• D.

Two phase lock

• 33.
When transaction Ti requests a data item currently held by Tj , Ti is allowed to wait only if it has a timestamp smaller than that of Tj (that is, Ti is older than Tj ). Otherwise, Ti is rolled back (dies). This is
• A.

Wait-die

• B.

Wait-wound

• C.

Wound-wait

• D.

Wait

• 34.
Consider the following transactions with data items P and Q initialized to zero: T1: read (P) ; read (Q) ; if P = 0 then Q : = Q + 1 ; write (Q) ; T2: read (Q) ; read (P) ; if Q = 0 then P : = P + 1 ; write (P) ; Any non-serial interleaving of T1 and T2 for concurrent execution leads to..
• A.

A Serializable Schedule

• B.

A Schedule that is not conflict Serializable

• C.

A Conflict Serializable Schedule

• D.

A Schedule for which a precedence graph cannot be drawn

• 35.
Consider the transactions T1, T2, and T3 and the schedules S1 and S2 given below. T1: r1(X); r1(Z); w1(X); w1(Z) T2: r2(Y); r2(Z); w2(Z) T3: r3(Y); r3(X); w3(Y) S1: r1(X); r3(Y); r3(X); r2(Y); r2(Z); w3(Y); w2(Z); r1(Z); w1(X); w1(Z) S2: r1(X); r3(Y); r2(Y); r3(X); r1(Z); r2(Z); w3(Y); w1(X); w2(Z); w1(Z) Which one of the following statements about the schedules is TRUE?
• A.

Only S1 is conflict Serializable

• B.

Only S2 is conflict Serializable

• C.

Both S1 and S2 is conflict Serializable

• D.

Neither S1 nor S2 is conflict Serializable

• 36.
Consider the following transaction involving two bank accounts x and y. read(x); x := x – 50; write(x); read(y); y := y +50; write(y) The constraint that the sum of the accounts x and y should remain constant is that of
• A.

Atomicity

• B.

Consistency

• C.

Durability

• D.

Isolation

• 37.
The file organization which allows us to read records that would satisfy the join condition by using one block read is
• A.

Heap file organization

• B.

Sequential file organization

• C.

Clustering file organization

• D.

Hash file organization

• 38.
The highest level in the hierarchy of data organization is called
• A.

Databank

• B.

Database

• C.

Datafile

• D.

Datarecord

• 39.
• A.

EXISTS operator

• B.

NOT operator

• C.

IS NULL operator

• D.

None of these

• 40.
In SQL, which command(s) is(are) used to change a table's storage characteristics?
• A.

ALTER TABLE

• B.

MODIFY TABLE

• C.

CHANGE TABLE

• D.

All of the above

• 41.
• A.

All views are not updatable

• B.

The views may be referenced in an SQL statement whenever tables are referenced

• C.

The views are instantiated at the time they are referenced and not when they are defined

• D.

The definition of a view should not have GROUP BY clause in it

• 42.
Find the temperature in increasing order of all cities
• A.

SELECT city FROM weather ORDER BY temperature;

• B.

SELECT city, temperature FROM weather;

• C.

SELECT city, temperature FROM weather ORDER BY temperature;

• D.

SELECT city, temperature FROM weather ORDER BY city;

• 43.
Find the names of these cities with temperature and condition whose condition is neither sunny nor cloudy
• A.

SELECT city, temperature, condition FROM weather WHERE condition NOT IN ('sunny', 'cloudy');

• B.

SELECT city, temperature, condition FROM weather WHERE condition NOT BETWEEN ('sunny', 'cloudy');

• C.

SELECT city, temperature, condition FROM weather WHERE condition IN ('sunny', 'cloudy');

• D.

SELECT city, temperature, condition FROM weather WHERE condition BETWEEN ('sunny', 'cloudy');

• 44.
• A.

There is common sharing of data among the various applications

• B.

It is file oriented

• C.

Programs are dependent on the file

• D.

It is inflexible

• 45.
The information about data in a database is called _______.
• A.

• B.

Hyperdata

• C.

• D.

None of these

• 46.
A data dictionary is a special file that contains?
• A.

The names of all fields in all files

• B.

The data types of all fields in all files

• C.

The widths of all fields in all files

• D.

All of the mentioned

• 47.
The DBMS acts as an interface between what two components of an enterprise-class database system?
• A.

Database application and the database

• B.

Data and the database

• C.

The user and the database application

• D.

Database application and SQL

• 48.
Suppose we are given a view tot credits (year, num credits) giving the total number of credits taken by students in each year.The query that computes averages over the 3 preceding tuples in the specified sort order is
• A.

Select year, avg(num credits) over (order by year rows 3 preceding) as avg total credits from tot credits;

• B.

Select year, avg(num credits) over (order by year rows 3 unbounded preceding) as avg total credits from tot credits;

• C.

Both a and b

• D.

Either a or b