Question

Consider following relational database schema and translate the queries ‘a’ and ‘b’ into relational algebra expressions...

Consider following relational database schema and translate the queries ‘a’ and ‘b’ into relational algebra expressions

Teacher(ID, Name, Designation, Phone, Address)

Course(CourseCode, CourseName, CreditHour)

Taught(TeacherID, CourseCode, Semester)

a. SELECT Name, Address FROM Teacher, Taught WHERE Teacher.ID=Taught.TeacherID and CourseCode=’IT344’

b. SELECT CourseName FROM Course, Taught WHERE Course.CourseCode=Taught.CourseCode and TeacherID=200

0 0
Add a comment Improve this question Transcribed image text
Know the answer?
Add Answer to:
Consider following relational database schema and translate the queries ‘a’ and ‘b’ into relational algebra expressions...
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
  • 3. (20 POINTS) Consider the LIBRARY relational database schema below to write down the relational algebra...

    3. (20 POINTS) Consider the LIBRARY relational database schema below to write down the relational algebra expressions for the following two queries. No SQL statements are required. BOOK Bookid Title Publisher name BOOK AUTHORS Book id Author name PUBLISHER Name Address Phone BOOK COPIES Book d Branch Id No o copies BOOK LOANS Book Branch Id Card no Date out Due date LIBRARY BRANCH Branch Branch name Address BORROWER Card Name Address Phone 3.A.) (10 POINTS) Let the number of...

  • Give the following queries in the relational algebra using the following relational schema: Student (sid, name,...

    Give the following queries in the relational algebra using the following relational schema: Student (sid, name, age, address, email, cgpa) enrolledIn (sid, modulecode, grade) module (modulecode, modulename, credits, lecturername) a) What are the names of students enrolled in module code “cs3020”? b) Give the module code of all the modules that are taught by the teacher named “Altaf”? c) Who teaches the module with code”cs1500”? d) Give the name of all the teachers teaching the student with id”12f6778”.

  • Specify relational calculus expression for the following descriptions on the Library database schema shown in Figure...

    Specify relational calculus expression for the following descriptions on the Library database schema shown in Figure 4.6. a) Retrieve Publishers’ name and phone number whose books where borrowed from Baltimore Branch. b) List the book title, book id and branch name with less than 10 copies c) List customer card number, customer name, branch name and book title for books which are currently on loan. BOOK Book id Title Publisher_name BOOK_AUTHORS Book idAuthor name PUBLISHER Name Address Phone BOOK COPIES...

  • Relational algebra pls. Appreciate it!(Queries are detailed) Consider the following relational database that stores information about...

    Relational algebra pls. Appreciate it!(Queries are detailed) Consider the following relational database that stores information about bars and customers: Drinker (name, address) Bar (name, address) Beer (name, brewer) Frequents (drinker, bar, times a week) Likes (drinker, beer) Serves (bar, beer, price) Write the following queries in relational algebra: (5 points) Find all drinkers who frequent only those bars that serve some beers they like. 5 points) Find all drinkers who frequent every bar that serves some beers they like (10...

  • Consider the Schema diagram for a university database a. Find the IDs of all students who...

    Consider the Schema diagram for a university database a. Find the IDs of all students who have taken all of the CMPSC courses. Use the division operation. b. Do the same operation as in problem a, using only fundamental operations. student takes ID course id sec id semester 1er 4112 dept_name tot cred grade advisor section course_id sec id semester year building TOOM_10 time_slof_id course course id title dept name credits department dept name building budget time slot time slot...

  • The relational schema shown below is part of a student database. The primary and foreign keys are highlighted in bold.

    The relational schema shown below is part of a student database. The primary and foreign keys are highlighted in bold.Student (studNo, studName, address, mobileNo)Course (courseNo, courseName, creditHour, level) Registration (studNo, courseNo, regDate, semester, session)Project (projNo, projName, courseNo)Assignment (projNo, studNo, startDate, dueDate, hoursSpent)Write SQL queries based on the student database given above: 1. Create tables & constraints for the student database.2. Insert some data into the tables to check that the tables created are correct. No limit on how many rows you want...

  • Using the relational schema for the College Applications database, write relational algebra expressions that perform the...

    Using the relational schema for the College Applications database, write relational algebra expressions that perform the following problems. Complete 5 out of 6 for full credit. Apply(sID, cName, major, decision) Student(sID, sName, GPA, sizeHS) College(cName, state, enrollment) 1. List the ids and names of the students that applied to the CS Dept at MIT. 2. For students that have applied to a college, list the student’s id, name and number of different colleges the students has applied to. 3. List...

  • Consider the following relational schema, representing a database of documents and a set of keywords: Doc(did,...

    Consider the following relational schema, representing a database of documents and a set of keywords: Doc(did, docTitle) Occurs(did, wid) Word(wid, word) Keywords(word) For each of the queries below, show an equivalent relational algebra plan: a.SELECT z.word, count(*) FROM Doc x, Occurs y, Word z WHERE x.did = y.did and y.wid = z.wid GROUP BY z.wid, z.word b.SELECT x.did, x.docTitle FROM Doc x WHERE NOT EXISTS (SELECT * FROM Occurs o, Word w, Keyword k WHERE x.did = o.did AND o.wid...

  • Design an Access database including tables and queries for the model below Relational Model (Project 9)...

    Design an Access database including tables and queries for the model below Relational Model (Project 9) Student SSN Name Address GPA Type SchoolName EnrollDate Current Student SSN ExpectedGraduate Alumni SSN GradDate EmployerName EmployerAddress Position Salary School Name Location Size OfLibrary BudgetForMBA AACSBStatus AACSBDate Curriculum Curriculum Code SchoolName SchoolName Course CourseCode Name Type Curriculum Code Course Topics CourseCode Topic Complete SSN CourseCode

  • Write the following queries in Relational Algebra, for the following bank schema: account (ano, bname, balance)...

    Write the following queries in Relational Algebra, for the following bank schema: account (ano, bname, balance) branch (bname, bcity, assest) customer (Cname, cstreet, ccity) loan (lno, bname, amount) deposit (cname, ano) borrower (cname, ino) -Select all loan tuples where branch name is Abha. -Select all loan tuples where branch name is Abha and loan amount less than 200000.   Please type the solution on the keyboard so that I can copy and paste

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