This topic contains 0 replies, has 0 voices, and was last updated by  EduGorilla 2 years, 6 months ago.

  • Author
    Posts
  • #1427692 Reply
     EduGorilla 
    Keymaster
    Select Question Language :


    Consider the relation Enrolled (SID,CID) in which (Sid,Cid) is the primary key, and the relation paid(Sid,amount) where Sid is the primary key. Assume no null values and no foreign keys or integrity constraints.
    Query 1 : Select Sid from Enrolled where Sid in (Select Sid from paid)
    Query 2 : Select Sid from paid where Sid in (Select Sid from Enrolled)
    Query 3 : Select E.Sid from Enrolled E , paid P where E.Sid= P.Side
    Query 4 : Select Sid from Paid where exists (Select * from Enrolled where enrolled.Sid = Paid.Sid)
    Which one of the following statement is correct ?

    Options :-

    1. All queries return identical row sets for any database
    2. Query 2 and Query 4 return identical row sets for all databases but there exist databases for which Query 1 and Query 2 return different row sets
    3. There exist databases for which Query 3 returns strictly fewer rows than Query 2
    4. There exists databases for which Query 4 will encounter an integrity violation at run time
    Post your Training /Course Enquiry
    Are You looking institutes / coaching center for
    • IIT-JEE, NEET, CAT
    • Bank PO, SSC, Railways
    • Study Abroad
    Select your Training / Study category
Reply To: Consider the relation Enrolled (SID,CID) in which (Sid,Cid) is the primary key, and the relation pai….
Your information:




Verify Yourself




Log in with your credentials

or    

Forgot your details?

Create Account