Question

5.10 Express each of the following queries in relational algebra and (ii) SQL using the Student Registration System schema of
Exercises 189 b. List the names of all students who took courses both in spring 1997 and fall 1998
38 CHAPTER 3 The Relational Data Model FIGURE 3.4 Fragment of the Student Registration database schema STUDENT (Id:INTEGER, N
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Answer 1:

select * from Course where deptId in ('EE','MGT')

Answer 2:

Select Name from Sudent where StudId in ( select StudId from Transcript group by StudId having CrsCode='Spring 1997' and CrsCode='fall 1998' );

NOTE - I am little bit confused between crsCode and crsName. i mean given data"Spring 1997" and "fall 1998" belongs to crsCode or crsName. So i am writing the another query that consumes data as crsName if that is the case.

Select Name from Sudent where StudId in ( select StudId from Transcript group by StudId having CrsCode in (select crsCode from course where crsName in('Spring 1997' , 'fall 1998' )));

Add a comment
Know the answer?
Add Answer to:
5.10 Express each of the following queries in relational algebra and (ii) SQL using the Student...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT