Back to the 2025 paper

Module 2: Relational Query Languages & Design

202510m

Consider:

  • Student(SID, Name, Dept, Age)
  • Course(CID, CName, Faculty)
  • Enroll(SID, CID, Marks)
  1. Write relational algebra expressions to find:
    • a) Students enrolled in DBMS
    • b) Students scoring >80 marks
    • c) Students not enrolled in any course
  2. Write SQL queries:
    • a) Find highest marks
    • b) Find average marks department-wise
    • c) Display students enrolled in more than two courses
  3. Translate the following query into tuple relational calculus:
    • "Find names of students from CSE department."
  4. Convert the following relational algebra into SQL:
    • πName(σMarks>85(Student⋈Enroll))\pi_{Name}(\sigma_{Marks > 85}(Student \bowtie Enroll))

Similar questions

Database Management SystemWhich query is best solved using division operation? (i) Find students enrolled in DBMS (ii) Find students enrolled in all courses (iii) Find students with marks >80 (iv) Find students from CSE20252mDatabase Management SystemConsider the following schema for institute library: Student (RollNo, Name, Father_Name, Branch) Book (ISBN, Title, Author, Publisher) Issue (RollNo, ISBN, Date-of-Issue) Write the following queries in SQL and relational algebra: (i) List roll number and name of all students of the branch 'CSE'. (ii) Find the name of student who has issued a book published by 'ABC' publisher. (iii) List title of all books and their authors issued to a student 'RAM'. (iv) List title of all books issued on or before December 1, 2020. (v) List all books published by publisher 'ABC'20247mDatabase Management SystemConsidering the following schema, create the appropriate tables and insert at least 5 records: AUTHOR (author-id, name, city, country) PUBLISHER (publisher-id, name, city, country) CATALOG (book-id, title, author-id, publisher-id, category-id, year, price) CATEGORY (category-id, description) ORDER-DETAILS (order-no, book-id, quantity) Write each of the following queries in SQL and relational algebra: (a) Obtain the names of authors who have 2 or more books in the catalog. (b) Find the author of the book which has maximum sales. (c) Obtain the names of author who have maximum number of publisher. (d) Obtain the name of the city, author, publisher where publisher and author belong to same city. (e) Obtain the title of books which has maximum sales. (f) Obtain the book-id, description for the author who have exactly 3 books in the catalog. (g) Obtain the author and publisher who have published books in more than or equal to 2 categories.201914mDatabase Management SystemConsider the following employee database, primary keys are underlined. Employee (ename, street, city) Works (ename, cname, salary) Company (cname, city) Manages (ename, manager-name) Write SQL queries to (i) Find the names of all the employees who work for XYZ. (ii) Find all employees who live in the same city as the company for which they work. (iii) Find all employees who live in the same cities and on the same streets as do their managers. (iv) Find all employees who earn more than the average salary of all employees of their company.202214m
Free AppAndroid App

Coursify Android App

Generate AI courses, take quick quizzes between classes, and master complex engineering concepts on the go.