You are on page 1of 8

Yellow color is the focused area

Q1 Consider a database table T containing two columns  X and Y each of type integer. After the
creation of the table, one record (X=1, Y=1) is inserted in the table.

Let MX and MY denote the respective maximum values of X and Y among all records in the
table at any point in time. Using MX and MY, new records are inserted in the table 128 times
with X and Y values being MX+1, 2*MY+1 respectively. It may be noted that each time after
the insertion, values of MX and MY change. What will be the output of the following SQL query
after the steps mentioned above are carried out?
SELECT Y FROM T WHERE X=7;
(a) 127    (b) 255    (c) 129    (d) 257

https://interviewmania.com/discussion/91893-database-database-miscellaneous

http://www.btechonline.org/2013/01/gate-question-dbms-sql.html
https://gateoverflow.in/2134/gate2011-32

https://questions.examside.com/past-years/gate/question/consider-a-database-table-t-containing-two-
columns-x-and-y-e-gate-cse-2011-marks-2-kwfeujav9jpu2lyt.htm

http://targatenet.com/2017/03/18/dbms-mcq-in-gate-solved-set-2/

https://edurev.in/course/quiz/attempt/-1_SQL-MCQ-Quiz-1/1fb94caa-e8d1-4d54-a5ab-679deb8c9ce2

https://www.geeksforgeeks.org/gate-gate-cs-2011-question-32/

https://compscibits.com/DBMS/GATE-cse-question-paper/discussion/6854

q2

Consider the following relational schema:

Suppliers(sid:integer, sname:string, city:string, street:string)


Parts(pid:integer, pname:string, color:string)
Catalog(sid:integer, pid:integer, cost:real)
(sid,pid are primary keys)
Assume that, in the suppliers relation above, each supplier and each street within a
city has a unique name, and (sname, city) forms a candidate key. No other functional
dependencies are implied other than those implied by primary and candidate keys.
Which one of the following is TRUE about the above schema?
a. The schema is in BCNF
b. The schema is in 3NF but not in BCNF
c. The schema is in 2NF but not in 3NF
d. The schema is not in 2NF
https://www.geeksforgeeks.org/gate-gate-cs-2009-question-56/
https://questions.examside.com/past-years/gate/question/consider-the-following-relational-
schemasupplierssid-integer-gate-cse-2009-marks-2-bc0jjhhel9zb9rgx.htm

https://compscibits.com/DBMS/GATE-cse-question-paper/discussion/6896

http://www.btechonline.org/2013/01/gate-question-dbms-sql.html

http://targatenet.com/2017/03/18/dbms-mcq-in-gate-solved-set-1/

https://gateoverflow.in/1339/gate2009-55

https://www.computersciencejunction.in/2018/11/04/dbms-gate-questions-html/

https://edurev.in/course/quiz/attempt/-1_SQL-MCQ-Quiz-1/1fb94caa-e8d1-4d54-a5ab-679deb8c9ce2

https://study.com/academy/answer/consider-the-following-schema-suppliers-sid-integer-sname-string-
address-string-parts-pid-integer-pname-string-color-string-catalog-sid-integer-pid-integer-cost-real-the-
ca.html

Q3 SQL allows tuples in relations and correspondingly defines the multiplicity of tuples in the
result of joins. Which one of the following queries always gives the same answer as the nested
query shown below.

select * from R where a in (select S.a from S)


a.select R.* from R, S where R.a=S.a (D)
b.select distinct R.* from R,S where R.a=S.a
c.select R.* from R,(select distinct a from S) as S1 where R.a=S1.a
d.select R.* from R,S where R.a=S.a and is unique R
https://www.computersciencejunction.in/2018/11/04/dbms-gate-questions-html/

https://edurev.in/course/quiz/attempt/-1_SQL-MCQ-Quiz-1/1fb94caa-e8d1-4d54-a5ab-679deb8c9ce2

https://www.geeksforgeeks.org/gate-gate-cs-2014-set-2-question-64/

https://compscibits.com/DBMS/GATE-cse-question-paper/discussion/6861

https://gateoverflow.in/2021/gate2014-2-54

Q4 Consider the following relational schema:

employee (empId,empName,empDept) 

customer (custId,custName,salesRepId,rating) 

salesRepId is a foreign key referring to empId of the employee relation. Assume that each
employee makes a sale to at least one customer. What does the following query return?

SELECT empName FROM employee E


WHERE NOT EXISTS (SELECT custId
FROM customer C
WHERE C.salesRepId = E.empId
AND C.rating <> 'GOOD');

A. Names of all the employees with at least one of their customers having a ‘GOOD’ rating. 
B. Names of all the employees with at most one of their customers having a 'GOOD' rating.
C. Names of all the employees with none of their customers having a 'GOOD' rating.
D. Names of all the employees with all their customers having a 'GOOD' rating.

https://edurev.in/question/1706751/Consider-the-following-relational-schemaemployee-e

https://questions.examside.com/past-years/gate/question/consider-the-following-relational-
schemaemployee-empid-empna-gate-cse-2014-set-3-marks-2-ki0l6kf3xegyals7.htm

https://compscibits.com/mcq-questions/DBMS/GATE-cse-question-paper/2

https://questions.examside.com/past-years/gate/question/consider-the-following-relation-student-tg-
border-coll-2015-set-1-marks-2-3qkqwig0pctp8ok0.htm

https://gateoverflow.in/2089/gate2014-3-54

https://www.geeksforgeeks.org/gate-gate-cs-2014-set-3-question-64/

https://interviewmania.com/discussion/91901-database-database-miscellaneous

Q5 in E-R Diagram,the total participation by entities is represented as ----

Q6 which is a bottom up approach in which two lower level entities combine to form a higher level
entity

Q7 ODBC is based on -----

Q8 which of the following categories of the data integrity RDMS will enforce specific business logic

Q9 which SQl command delete all records and does not remove the structure

Q10 consider the relation X(P,Q,R,S,T,U) with the following set of functional dependencies

Q11 given the following two statements

S:every table with two single-Valued attributes is in 1NF,2NF,3NF and BCNF

Q12 which of the following are the simplest NoSQL Databases

Q13 Data manipulation language enables users to

Q14 in a relational database ,each tuple is divided into fields called

Q15 point out the correct statement


Document can contain many different key-value pairs ,or key-array pairs ,or even nested document

Q16 a collection of conceptual tools for describing data ,relationships, semantics and constraints is
referred as

Q17 the candidate key is that you choose to identify each row uniquely is called

Q18 given the following statements:

S1 A foreign key declaration can always be replaced by an equivalent check assertion in SQL

Q19 which option is true about the SQL query given below Select firstName ,LastName from employee
where lastname between ‘A%’ and ‘D%’

Q20 Which of the following statements are True about an SQL query

P:An SQL query can contain a HAVING clause even if does not have a GROUP BY clause

Q21 Database locking concept is used to solve the problem of

Q22 Consider the following functional dependencies in a database:

Date _of Birth->age

Q23 Consider the following relation schema pertaining to a students database :

Student(rollno,name,address)

Q24 the following tables has two attributes A and C where A is a primary key and C is the foreign key
referring A with on Delete cascade

Q25 A relation is a

Subset of a Cartesian of a list of attributes

Q26 Solve the below case study

The employee information in accompany is stored in the relation

Employee(name,sex,salary,deptname)

Q27 which of the following is not a No SQL database

Q28 Which of the following is special type of integrity constraint that relates two relations and maintains
consistency across the relations

Q29 solve the below case study

Consider a relational table with a single record for each register student with the following attributes.
1 registration num : unique registration number of each registration student

Q30 which of the following is correct

Function dependencies are not associated with relations; they are based on the semantics of
information that we are dealing with

Q31 solve the below case study

In schema with attributes A,B,C,D and E following set of functional dependencies are given

Q32 solve the below case study

The relation scheme student Performance (name,courseNo, rollNo, grade)has the following dunctional
dependencies

Q33 Solve the below case study

Consider the following relation

Cinema (theater ,address,capacity)

Q34 which statement is used in conjunction with the aggregate functions to group ztheresult set one or
more columns

Q35 in oracle ,who owns the data dictionary

Q36 solve the below case study

Given the following schema:

Employees(emp-id,last-name,hire-date,dept-id,salary)

Q37 which of the following is not correct

Each entity must include some descriptive information

Q38 solve the below case study

The relation book(title,price) contains the titles and price of different books assuming that no two books
have the same price ,what does the following SQL query list

Q 39 solve the below case study

Consider the transactions T1,T2 and T3 and the schedules S1 and s2 given below

Q40 solve the below case study


A relational database contain two tables student and department in which student t able has columns
roll_no ,nameand dept_id and department table has dept_id and dept_name

Q41 which of the following is a procedure for acquiring the necessary locks for a transaction where all
necessary locks are acquired before any are reeased

Q42 which allows a unique number to be generated when a new record is inserted into a table

Q43 solve the below case study

Given relation r(w,r)and s(y,z),the result of select distinct w,r from r,s is guaranted to be same as r,
provided

Q44 what is the multiplication of all the values in the attributes

Q45 a foreign key in one table points to a ----- key in another table

Q46 a functional dependency between tow or more non key attributes is called

Q47 solve the below case study

Consider the relato “enrolled(student,course)” in which (student,couse) is the primary key and relation
“paid(student,amount)” where stydent is the primary key .no null values and no foreign keys or integrity
constraints.

Q48 solve the below case study

Database table by name Loan_Records is given below

Borrower Bank_Manager Loan_Amount

Q49 solve the below case study Consider set of relations shown beow and the SQL query that follws.

Studnets:(Roll_number,Name ,Date _of_birth)

Q50 What is used to temporarily rename a tabe or heading of a column

Q51 which of the following is a wide –column store

Q52 Long datatype allows whole numbers between---

Q53 what is the process of organizing data into related tables

Q54 Solve the below case study

Consider the following log sequence of two transactions on a banks account with initial balance
12000,that transfer 2000 to a mortgage payment and then apply a 5% interest

Q55 what does the following SQL statement do ? slect * from Customer where Cust_Type =”Best”;
Q56 solve the below case study

Consider the following transactions with data items P and Q initialized to zero:

Q57 which operator is used to display a record if either the first condition or the second is true

Q58 solve the below case study

A relational schema for a train reservation database is given below. Passanger(pid,pnmae,age)


Reservation(pid,class,tid)

Q59 In Sql ,wildcard characters are used with the ----Operator

Q60 Solve The below case study

Consider the following employee table

ID Salary DeptName

1 10000 EC

Q61 Solve the below Case Study

Consider the following relational schemes for alibrary databse


:Book(Title,Author,Catalog_no,Publisher,Year,Price) Collection (Title ,author,catalog_no) with in the
following functional dependencies ;

Q62 What is ACID Properties of transactions

Q63 Which TCL Command Restores the database to last committed state

Q64 Which of the following is correct regarding aggregate functions

Q65 who proposed the relational model

Q66 which refers to the correctness and completeness of the date in a database

Q67 A relation that has no partial dependencies is in which normal form

Q68 Solve the below case study

Consider the following transaction involving two bank accounts x and y

Read (x)

X:=x-50

Q69 solve the below case study

Consider the following functional dependencies in database “


Data_of Birth-> Ag e

You might also like