Professional Documents
Culture Documents
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
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.
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
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?
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
Q6 which is a bottom up approach in which two lower level entities combine to form a higher level
entity
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
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
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
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
Employee(name,sex,salary,deptname)
Q28 Which of the following is special type of integrity constraint that relates two relations and maintains
consistency across the relations
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
Function dependencies are not associated with relations; they are based on the semantics of
information that we are dealing with
In schema with attributes A,B,C,D and E following set of functional dependencies are given
The relation scheme student Performance (name,courseNo, rollNo, grade)has the following dunctional
dependencies
Q34 which statement is used in conjunction with the aggregate functions to group ztheresult set one or
more columns
Employees(emp-id,last-name,hire-date,dept-id,salary)
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
Consider the transactions T1,T2 and T3 and the schedules S1 and s2 given below
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
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
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
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.
Q49 solve the below case study Consider set of relations shown beow and the SQL query that follws.
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
ID Salary DeptName
1 10000 EC
Q63 Which TCL Command Restores the database to last committed state
Q66 which refers to the correctness and completeness of the date in a database
Read (x)
X:=x-50