GTU MCA MATERIAL FOR DBMS II

RSS
  • Home
  • Quick Review
  • Assignment
  • Backup and Recovery
  • Differences
  • About Me

Tuesday, May 3, 2011

Assignment - 6 Relational Algebra


Assignment – 6 Relational Algebra    Submission Date 12-05-11  


Q.1
Consider the following relations:

Suppliers (Sid, S_name, Address)
Parts (Pid, P_name, Colour)
Catalogue (Sid, Pid, Cost)

The key fields are underlined. Write the following queries in relational algebra.

1) Find the names of suppliers who supply some red parts.
2) Find the Pid of parts supplied by every supplier at less than INR 500.
3) Find the Pid of parts that are supplied by at least two different suppliers.
4) Find the Sid of suppliers who supply every part or green part.
5) Find the Sid of suppliers who supply every part.
6) Find the Sid of suppliers who supply some red or green part.
7) Find the Sid of suppliers who supply some red and some green parts.
Q.2
Consider the relation schemas as follows and Convert Following query into SQL and Relational Algebra.

WORKS           (PERSON_NAME, COMPANY_NAME, SALARY)
LIVES              (PERSON_NAME, STREET, CITY)
LOCATED_IN   (COMPANY_NAME, CITY)
MANAGERS     (PERSON_NAME, MANAGER_NAME)
          Where manager_name referes to Person_name


1)    Find the name of the persons who work for company ‘FBC’
2)    List the names of the persons who work for company ’FBC’ along with the cities they live in.
3)    Find the persons who work for company ’FBC’ with a salary of more than 10000. List the names of these persons along with the streets and cities where they live.
4)    Find the names of the persons who live and  work in the same city.
5)    Find the names of the persons who live in the same city and on the same street as their managers.
6)    Find the names of the persons who do not work for Company ’FBC’.
7)    Find the persons whose salaries are more than the salary of everybody who work for company ’SBC’.
8)    Find the names of the companies that is located in every city where company ’SBC’ is located in.
Q.3
Write down Relational Algebra for the given schema.

SOFTWARE(sid,software_name,develop_in,selling_cost,development_cost)
PROGRAMMER (pid, pname, date_join, dept_name, sid,Salary, gender)


  1. Find out the selling cost average for packages developed in Oracle.
  2. List details of programmer whose salary is greater than Rs.10,000.
  3. Display details of Software develop by “Mr. Ram”.
  4. How many software has highest development cost.
  5. List details of programmer who join in the current month.
  6. Retrieve name of programmer who do not involve in any software development.
  7. Retrieve all male programmers working in ‘MCA’ department.

Posted by Dr. Parag Shukla at 8:40:00 PM
Email This BlogThis! Share to X Share to Facebook

0 comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Total Pageviews

Blog Archive

  • ►  2019 (1)
    • ►  March (1)
  • ►  2016 (7)
    • ►  August (6)
    • ►  July (1)
  • ▼  2011 (16)
    • ▼  May (2)
      • Assignment - 7 Query Processing & Optimization
      • Assignment - 6 Relational Algebra
    • ►  April (6)
    • ►  March (5)
    • ►  February (3)
  • ►  2010 (9)
    • ►  May (4)
    • ►  March (5)
  • ►  2009 (1)
    • ►  December (1)

Followers

Blog List

Search

Parag Shukla. Powered by Blogger.

Popular Posts

  • Serial Schedule Vs Non-Serial Schedule
    Serial Schedule Non-Serial Schedule A serial schedule is a sequence of operat...
  • Dirty Read Vs Unrepeatable Read
    Dirty Read Unrepeatable Read A dirty read problem occurs when one transaction updates a ...
  • Log Based Recovery
    Log Based Recovery The most widely used structure for recording database modification is the log. The log is a sequence of log ...
  • Lost Update Vs Uncommitted Data
    Lost Update Uncommitted Data This problem is also known as “Multiple Update...
  • Shadow Paging
    Shadow Paging This technique does not require LOG in single user environment In mult...
  • Starvation Vs Deadlock
    Starvation Deadlock Starvation happens if same transaction is always choosen ...
  • Checkpoints
    Checkpoints When System failure occurs o We must consult log to determine those transaction that need to be redone and those tra...
  • Defferred Update method
    Deferred update Do not physically update the database on disk until after a transaction reaches its commit point; Then updates are r...
  • Assignment - 7 Query Processing & Optimization
    Assignment – 7         Query Processing & optimization    Submission Date 30-05-11   Q-1. Explain th...
  • Immediate Update Method
    Immediate update technique Database may be updated by some operations of a transaction before the transaction reaches its commit poi...
Copyright © 2010 GTU MCA MATERIAL FOR DBMS II