Answered step by step
Verified Expert Solution
Question
1 Approved Answer
V. Consider the following tables and write the Relational Algebra Statements and SQL Statements for the following. (5*2=10 Marks) COURSE Course ID COMP244 COMP 255
V. Consider the following tables and write the Relational Algebra Statements and SQL Statements for the following. (5*2=10 Marks) COURSE Course ID COMP244 COMP 255 COMP151 COMP422 COMP270 Course Name Database Concepts Data Structures Introduction to Algorithms Artificial Intelligence Internet Programming Credit Hours 3 3 4 3 3 SECTION Section ID SICOMP151 SICOMP244 S2COMP 244 S1COMP255 S1COMP270 SICOMP422 Teacher ID 101297 101267 101268 101200 101297 101267 Course ID COMP151 COMP244 COMP244 COMP255 COMP270 COMP422 TEACHER Teacher ID 101200 101267 101268 101297 101298 Teacher Name Alaa Sayed Naeem Maged Lohani Designation Asst Professor Lecturer Lecturer Lecturer Lecturer Nationality Iragi Indian Omani Tunisian Indian Age 48 36 46 29 26 Room No 11A1 11A6 11A5 11A5 11A6 Question 5 1. Show the average of Age and count the number of records grouped by Room No from TEACHER relation. Answer in Relational Algebra: Answer in SQL: 2. Select only those teachers are 'Lecturer' and 'Indian' from TEACHER relation. Answer in Relational Algebra: 3. Show the Course Id and Course Name of the Courses not having Credit Hours more than 3 from the COURSE relation. Answer in Relational Algebra: Answer in SQL: 4. Show the Section ID, Teacher ID from SECTION relation those who are handling 'COMP244'. Answer in Relational Algebra: Answer in SQL: 5. Show distinct nationalities from TEACHER relation. Answer in Relational Algebra: Answer in SQL
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started