52 users online (0 members and 52 guests)  


  Results 1 to 5 of 5
  1. #1
    andrew2005's Avatar
    New User

    Status
    Offline
    Join Date
    Jan 2006
    Posts
    3

    Relational Algebra

    I am stuck on relation agebra I can do for example Find the Last Name and Tel. Number of all staff who are working as manager. Rel1= SELECT FROM Staff WHERE position=manager. Rel2=BRANCH NATJOIN Rel1 with BN common. Rel3= PROJECT Rel2 OVER LastName, TelNumber But am stuck when there is more detailed query such as the one below 1. Find the name (first name and surname) of the customer that have been fixed by mechanic "M111" and results have not been successful Customer (CustomerCode, CustomerSurname, CustomerFirstname, Sex, Age,Ocupation, Address) Mechanic (MechanicCode, MechanicSurName, MechanicFirstName, Address, PhoneNo, Function) Service (Service Code, CustomerCode, Mechanic Code, Date, Time, Result, ServiceType) Is_Seen_By (CustomerCode, MechanicCode, Date, Time). Now am stuck as to the relation algebra to find the name (first name and surname) of the customer that have been fixed by mechanic "M111" and results have not been successful
    Last edited by andrew2005; 01-12-2006 at 09:01 AM.

  2. #2
    vinyl-junkie's Avatar
    Moderator

    Status
    Offline
    Join Date
    Sep 2005
    Posts
    721

    Re: Relational Algebra

    This is untested, but see if it works for you.
    Code:
    SELECT 
    CustomerCode
    , CustomerFirstname
    , CustomerSurname
    , Is_Seen_By.MechanicCode 
    FROM Customer
    INNER JOIN Customer on Customer.CustomerCode = Is_Seen_By.CustomerCode
    WHERE MechanicCode = 'M111'
    Music Around The World - Collecting tips, trade
    and want lists, album reviews, & more

  3. #3
    muh_k's Avatar
    New User

    Status
    Offline
    Join Date
    Mar 2007
    Posts
    1

    Re: Relational Algebra

    Dear andrew2005,
    I am doing project in the same area and I have just started with this, and it seems it is so diffcult, would you plz help me, i need to know what you did and how you started and what you end up with. many thankx.
    plz can you contact mw by my email malkasasbeh@yahoo.com

  4. #4
    andrew2005's Avatar
    New User

    Status
    Offline
    Join Date
    Jan 2006
    Posts
    3

    Re: Relational Algebra

    Quote Originally Posted by vinyl-junkie View Post
    This is untested, but see if it works for you.
    Code:
    SELECT 
    CustomerCode
    , CustomerFirstname
    , CustomerSurname
    , Is_Seen_By.MechanicCode 
    FROM Customer
    INNER JOIN Customer on Customer.CustomerCode = Is_Seen_By.CustomerCode
    WHERE MechanicCode = 'M111'
    sorry about the late reply but that really helped. thanks

  5. #5
    andrew2005's Avatar
    New User

    Status
    Offline
    Join Date
    Jan 2006
    Posts
    3

    Re: Relational Algebra

    Quote Originally Posted by muh_k View Post
    Dear andrew2005,
    I am doing project in the same area and I have just started with this, and it seems it is so diffcult, would you plz help me, i need to know what you did and how you started and what you end up with. many thankx.
    plz can you contact mw by my email malkasasbeh@yahoo.com
    yes i will help you



Tags for this Thread