---
title: "RA: employees in both DBMS and MIS"
subject: "Database Management System"
chapter: 3
key: "semester_6/database_management_system:ra-emp-both-dbms-mis"
source: https://www.bctengineer.com/q/semester_6/database_management_system/ra-emp-both-dbms-mis
site: BCT Engineering
---

# RA: employees in both DBMS and MIS

Database Management System · Chapter 3: Relational Languages & Relational Model

- Asked in: year not given
- Video: [Relational Algebra Expressions with Employee, Department & Project Tables | DBMS Module 2 BCS403 VTU](https://www.youtube.com/watch?v=99trDPSh7XY) — Express VTU 4 All
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_6/database_management_system/ra-emp-both-dbms-mis
- Whole chapter: https://www.bctengineer.com/md/semester_6/database_management_system/chapter-3

## Question

Consider the relational schema:
employee (e_no, name, address)
project (p_no, p_name)
work (e_no, p_no)
part (part_no, part_name, qty, size)
use (e_no, p_no, part_no, number)
List emp name working in both projects DBMS and MIS. (Write a relational algebra expression.)

## Short answer

Build employee number sets for projects "DBMS" and "MIS" using selection, join with work, and projection. Intersect to find employees working on both, join with employee, and project name.

## Answer

Relational algebra symbols used: σ select, π project, ⋈ natural join, ∪ union, ∩ intersection, − difference, ρ rename, 𝒢 aggregate.

#### Relational algebra expression
```text
D = π e_no ( work ⋈ σ p_name = "DBMS" (project) )
M = π e_no ( work ⋈ σ p_name = "MIS"  (project) )

π name ( employee ⋈ ( D ∩ M ) )
```

#### Explanation
1. D is the set of employees working on the DBMS project, found by selecting the project, joining with work on p_no and projecting e_no.
2. M is the set of employees working on MIS in the same way.
3. D ∩ M keeps only the employees present in both sets, that is, working on both projects.
4. Joining with employee on e_no and projecting name gives the names.

The two sets are built separately because one tuple of work holds only one project, so a single condition p_name = "DBMS" ∧ p_name = "MIS" can never be true.

#### Equivalent SQL
```sql
SELECT e.name FROM employee e
WHERE e.e_no IN (SELECT e_no FROM work JOIN project USING(p_no) WHERE p_name='DBMS')
  AND e.e_no IN (SELECT e_no FROM work JOIN project USING(p_no) WHERE p_name='MIS');
```

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. How is the 'both projects' requirement solved?
   A. One selection with AND of two names
   B. Union of D and M
   C. Build D and M separately and take D ∩ M
   D. Use difference D - M
   Answer: C. One work tuple holds one project, so two sets are needed. (Key point: Two sets)

2. What does D ∩ M contain?
   A. Employees working on both DBMS and MIS
   B. Employees on either
   C. Employees on DBMS only
   D. Projects of both
   Answer: A. Intersection keeps common elements. (Key point: Intersection meaning)

3. Why join with employee at the end?
   A. To select project
   B. To remove duplicates
   C. To get names from e_no
   D. To compute intersection
   Answer: C. D ∩ M has only e_no. (Key point: Why join with employee)

## Close variants set in other exams

- [RA: parts used in DBMS and MIS](https://www.bctengineer.com/question.md?key=semester_6%2Fdatabase_management_system%3Ara-parts-both-dbms-mis) — Database Management System, chapter 3

## Related in Database Management System

- [RA: employee-projects with no part used](https://www.bctengineer.com/question.md?key=semester_6%2Fdatabase_management_system%3Ara-emp-project-no-part) — Database Management System, chapter 3
- [RA: employees on project DBMS](https://www.bctengineer.com/question.md?key=semester_6%2Fdatabase_management_system%3Ara-emp-project-dbms) — Database Management System, chapter 3
- [RA: employees on no project](https://www.bctengineer.com/question.md?key=semester_6%2Fdatabase_management_system%3Ara-emp-no-project) — Database Management System, chapter 3
- [RA: projects where all used bolts size 6](https://www.bctengineer.com/question.md?key=semester_6%2Fdatabase_management_system%3Ara-projects-all-used-bolts) — Database Management System, chapter 3
- [RA: computer dept employees and supervisors](https://www.bctengineer.com/question.md?key=semester_6%2Fdatabase_management_system%3Ara-computer-emp-supervisor) — Database Management System, chapter 3
- [RA: employees on Network over 15 hours](https://www.bctengineer.com/question.md?key=semester_6%2Fdatabase_management_system%3Ara-network-project-15-hours) — Database Management System, chapter 3
