0% found this document useful (0 votes)
16 views1 page

DBMS Assignment

The document outlines two schemas: Suppliers and Parts, and Employees and Supervises, along with a series of queries related to these schemas. It includes questions about keys in relations, finding parts by color, retrieving supplier IDs, and employee salary information. The queries require relational algebra and SQL for execution.

Uploaded by

Hightlight Daily
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views1 page

DBMS Assignment

The document outlines two schemas: Suppliers and Parts, and Employees and Supervises, along with a series of queries related to these schemas. It includes questions about keys in relations, finding parts by color, retrieving supplier IDs, and employee salary information. The queries require relational algebra and SQL for execution.

Uploaded by

Hightlight Daily
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Schema 1:

Suppliers(S_ID, S_Name, pincode, mobile_no )

Parts(P_ID, P_Name, colour)

Catalog(S_ID, P_ID, price)

Catalog[S_ID] ⊆ Suppliers[S_ID]

Catalog[P_ID] ⊆ Parts[P_ID]

Q1. If S_ID is a key for the Suppliers relation, could it be a key for the Catalog relation?

Write relational algebra and sql for the below questions:

Q2. Find the names of all blue and green and black parts.

Q3. Find all prices for parts that are red or green and display the highest price part’s name among them.

Q4. Find the S_IDs of all suppliers who supply a part that is blue or black.

Q5. Find the names of all suppliers who supply a part that is not blue or white.

Schema 2:

Employees(E_ID, E_name, E_age, E_salary)

Supervises(boss, employee)

Supervises[boss] ⊆ Employees[E_ID]

Supervises[employee] ⊆ Employees[E_ID]

Q6. Find the names and salaries of all bosses who have an employee earning more than 500000.

Q7. Display the age of the highest paid salary.

Q8. Show the names of all employees who were born in a specific year.

You might also like