github

Made bySaurav Hathi

CSE - Practice Test -26

Q1:

In case of any shut down during transaction before commit which of the following statement is done automatically?

Tags:
Section:
Databases
Options:
Q2:

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

Tags:
Section:
Databases
Options:
Q3:

Consider the following action:

TRANSACTION.....

Commit;

ROLLBACK;

What does Rollback do?

Tags:
Section:
Databases
Options:
Q4:

Which of the given options define a transaction correctly?

Tags:
Section:
Databases
Options:
Q5:

Which of the following scenarios may lead to an irrecoverable error in a database system?

Tags:
Section:
Databases
Options:
Q6:

The statement that is executed automatically by the system as a side effect of the modification of the database is

Tags:
Section:
Databases
Options:
Q7:

Which of the following makes the transaction permanent in the database?

Tags:
Section:
Databases
Options:
Q8:


CREATE TABLE SECTION

(Course_id VARCHAR (8),

Sec_id VARCHAR (8),

Semester VARCHAR (6),

YEAR NUMERIC (4,0),

Building NUMERIC (15),

PRIMARY KEY (course_id, sec_id, semester, YEAR),

FOREIGN KEY (course_id) REFERENCES course);

Which of the following has an error in the above create table for the relation section

Tags:
Section:
Databases
Options:
Q9:

……………… clause is an additional filter that is applied to the result.

Tags:
Section:
Databases
Options:
Q10:

Department (dept_name, building, budget) and Employee (employee_id , name, dept_name,salary)
Here the dept_name attribute appears in both the relations.

Using common attributes in relation schema is one way of relating ___________ relations.

Tags:
Section:
Databases
Options:
Q11:

For each attribute of a relation, there is a set of permitted values, called the ________ of that attribute.

Tags:
Section:
Databases
Options:
Q12:

In SQL the spaces at the end of the string are removed by _______ function.

Tags:
Section:
Databases
Options:
Q13:


SELECT name

FROM instructor

WHERE dept name = ’Physics’

ORDER BY name;

By default, the order by clause lists items in ______ order.

Tags:
Section:
Databases
Options:
Q14:

‘_ _ _ ’ matches any string of ______ three characters. ’_ _ _ %’ matches any string of  ______ three characters.

Tags:
Section:
Databases
Options:
Q15:

Which keyword must be used in below query to rename the field name?

SELECT name ____ instructor_name, course_id

FROM instructor, teacher

WHERE instructor.ID= teacher.ID;

Tags:
Section:
Databases
Options: