e registration system ame, lastName, streeetAddr ipcode) courseNumber, section N
ID: 3755628 • Letter: E
Question
e registration system ame, lastName, streeetAddr ipcode) courseNumber, section Number, year, semester,course ile,os, instructor) RegisteringForCourse( ¡Number, soureld) ess, city, tate, a).In the relation(table) Course, do you find another key among, the anritest W ys do i attributes of the key you found.(7 pts) ioor b).Do you see any table that implements a relationship? If you do, describe how table(representing a relationship) relates other tables/entities)? (7ps) ie c).Writ on that will return all the courses that all the stuent The result set should have the attributes: jNumber, firstName, lastName, courseNumber, pts) sectionN umber, year, and semester. Also write a relational algebra expression to dotum e a relational algebra expressi d). Write a relational algebra expression that will etm Namber, fist students who take Ann Smith's courses. (9 pts)
Explanation / Answer
Hey after seeing the question it seems you already have answers for a,b and c. So I am answering for d here.
d) select s.jNumber,s.firstName,s.lastName from Student s,Course c,RegisteringForCourse rc where s.Jnumber=rc.Jnumber and c.courseId=rc.courseId and c.instructor = "Ann Smith's"
Hints:
1) I have seen column with name courseId in the RegiseringForCourse table. But you are using courseNumber in your c answer. So replace courseId with courseNumber if column name is courseNumber or replace courseNumber with courseId in your c answer.
2)You can replace c.instructor = "Ann Smith's" with c.instructor like "%Ann Smith's%" if required.
3)If database names start with small letters then replace Student s,Course c,RegisteringForCourse rc with student s,course c,registeringForCourse rc in the above query.
Note:
1)Please feel free to ask the doubts if you have any.If you are getting any errors please comment below, I will be happy helping you. Let me know if you want something else in this.
2)Please give your valuable feedback and rating as well. Hope this helps you.... Thank you
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.