Skip to content
geeksforgeeks
  • Tutorials
    • Python
    • Java
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
    • Practice Coding Problems
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Aptitude
  • Engineering Mathematics
  • Discrete Mathematics
  • Operating System
  • DBMS
  • Computer Networks
  • Digital Logic and Design
  • C Programming
  • Data Structures
  • Algorithms
  • Theory of Computation
  • Compiler Design
  • Computer Org and Architecture
Open In App
Next Article:
Database Management Systems | Set 6
Next article icon

Database Management Systems | Set 6

Last Updated : 13 Dec, 2022
Comments
Improve
Suggest changes
Like Article
Like
Report

Following questions have been asked in GATE 2009 CS exam. 

1) Consider two transactions T1 and T2, and four schedules S1, S2, S3, S4 of T1 and T2 as given below: 
T1 = R1[X] W1[X] W1[Y] 
T2 = R2[X] R2[Y] W2[Y] 
S1 = R1[X] R2[X] R2[Y] W1[X] W1[Y] W2[Y] 
S2 = R1[X] R2[X] R2[Y] W1[X] W2[Y] W1[Y] 
S3 = R1[X] W1[X] R2[X] W1[Y] R2[Y] W2[Y] 
S1 = R1[X] R2[Y]R2[X]W1[X] W1[Y] W2[Y] 
Which of the above schedules are conflict-serializable? 
(A) S1 and S2 
(B) S2 and S3 
(C) S3 only 
(D) S4 only 

Answer (B) 
There can be two possible serial schedules T1 T2 and T2 T1. The serial schedule T1 T2 has the following sequence of operations 
R1[X] W1[X] W1[Y] R2[X] R2[Y] W2[Y] 
And the schedule T2 T1 has the following sequence of operations. 
R2[X] R2[Y] W2[Y] R1[X] W1[X] W1[Y] 
The Schedule S2 is conflict-equivalent to T2 T1 and S3 is conflict-equivalent to T1 T2. 




2) Let R and S be relational schemes such that R={a,b,c} and S={c}. Now consider 
the following queries on the database: 
 


 

IV) SELECT R.a, R.b         FROM R,S              WHERE R.c=S.c


Which of the above queries are equivalent? 
(A) I and II 
(B) I and III 
(C) II and IV 
(D) III and IV 

Answer (A) 
I and II describe the division operator in Relational Algebra and Tuple Relational Calculus respectively. See Page 3 of this and slide numbers 9,10 of this for more details. 




3) 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)


Consider the following relational query on the above database: 
 

SELECT S.sname      FROM Suppliers S          WHERE S.sid NOT IN (SELECT C.sid                              FROM Catalog C                              WHERE C.pid NOT IN (SELECT P.pid                                                    FROM Parts P                                                                                                                                                      WHERE P.color<> 'blue'))


Assume that relations corresponding to the above schema are not empty. Which one of the following is the correct interpretation of the above query? 

(A) Find the names of all suppliers who have supplied a non-blue part. 
(B) Find the names of all suppliers who have not supplied a non-blue part. 
(C) Find the names of all suppliers who have supplied only blue parts. 
(D) Find the names of all suppliers who have not supplied only blue parts. 

Answer (A) 
The subquery "SELECT P.pid FROM Parts P WHERE P.color<> 'blue'" gives pids of parts which are not blue. The bigger subquery "SELECT C.sid FROM Catalog C WHERE C.pid NOT IN (SELECT P.pid FROM Parts P WHERE P.color<> 'blue')" gives sids of all those suppliers who have supplied blue parts. The complete query gives the names of all suppliers who have supplied a non-blue part 





4) 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 

Answer (A) 
A relation is in BCNF if for every one of its dependencies X ? Y, at least one of the following conditions hold: 

    X ? Y is a trivial functional dependency (Y ? X)      X is a superkey for schema R 



Since (sname, city) forms a candidate key, there is no non-trivial dependency X ? Y where X is not a superkey 


Please see GATE Corner for all previous year paper/solutions/explanations, syllabus, important dates, notes, etc. 

Please write comments if you find any of the answers/explanations incorrect, or you want to share more information about the topics discussed above.
 


Next Article
Database Management Systems | Set 6

K

kartik
Improve
Article Tags :
  • DBMS
  • GATE CS
  • MCQ
  • GATE-CS-2009

Similar Reads

    Database Management Systems | Set 7
    Following questions have been asked in GATE 2008 CS exam. 1) Let R and S be two relations with the following schema R (P,Q,R1,R2,R3) S (P,Q,S1,S2) Where {P, Q} is the key for both schemas. Which of the following queries are equivalent? (A) Only I and II (B) Only I and III (C) Only I, II and III (D)
    3 min read
    Types of Database Management Systems
    A Database Management System (DBMS) is a software system that is designed to manage and organize data in a structured manner. It allows users to create, modify, and query a database, as well as manage the security and access controls for that database.What is DBMS?A DBMS (Database Management System)
    5 min read
    Structure of Database Management System
    A Database Management System (DBMS) is software that allows users to define, store, maintain, and manage data in a structured and efficient manner. It acts as an intermediary between data and users, allowing disparate data from different applications to be managed. A DBMS simplifies the complexity o
    8 min read
    RDBMS Full Form - Relational Database Management Systems
    RDBMS stands for Relational Database Management Systems. A database is an organized collection of data stored in a computer system and usually controlled by a database management system (DBMS). The data in common databases is modeled in tables, making querying and processing efficient. What is RDBMS
    7 min read
    DBMS Full Form - Database Management System
    DBMS stands for Database Management System. DBMS is the software that is used to manage databases. For example, MySQL, Oracle, PostgreSQL, etc., are popular commercial DBMSs used in different applications. It is a reliable, easy, and efficient way of data processing and management. History of DBMSIn
    3 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences