Results 1 to 4 of 4

Thread: query codes

  1. #1
    Join Date
    Apr 2009

    Unanswered: query codes

    Hey sorry if this is posted in wrong place.

    Im new to Database stuf.

    In need to do some queries on this relational model:

    Department(DeptNum, Descrip, Instname, DeptName, State, Postcode)
    Academic(AcNum, DeptNum, FamName, GiveName, Initials, Title)
    Paper(PaNum, Title)
    Author(PaNum, AcNum)
    Field(FieldNum, ID, Title)
    Interest(FieldNum, AcNum, Descrip)

    The queries i need to do are:

    1. Which academics have the title ‘Mr’? List their FamName, GiveName, and DeptNum.
    2. Which academics in Victoria have fewer than 2 research interests? Output the same details as in question 1.
    You must use NATURAL JOIN.
    3. Which academics in Victoria have no research interests? Output the same details as in question 1.You must
    use (NOT) EXISTS.
    4. Are there any departments that do not have any academics? List the DeptNum of any such departments.
    You must use a set operator.
    5. The research output of a department is measured by the total number of papers written by its staff members
    (as an author of a paper). For EACH department, calculate the total number of papers written. Output the
    DeptNum and total number of papers in decreasing order.
    6. DEST would like a report on the hot research areas in Category B. To this end, find the B-type (from ID)
    research fields that academics are most interested in. Return the full details of such research fields. You
    must use ANY or ALL.
    7. Get the full details of academics who have not written any papers. You must write a join query.
    8. Among the academics who have no papers, who has the greatest number of interests? List the AcNum,
    FamName, and GiveName of the academic.
    9. Which academics in the “NLP Research Unit” department have co-authored papers with whom they do not
    share an interest? Return their AcNum, FamName and GiveName.
    10. Active researchers are academics who have at least two research interests and have written at least two
    papers. Among the departments that have academics, which departments have at least 10 active
    researchers? Return their DeptNum and total number of active researchers in descending order.

    Could any one please explain to me how i would go about doing those queries?

  2. #2
    Join Date
    May 2005
    This wouldn't happen to be an end of the term assignment now would it?

    If it is, asking people to do your homework for you is not ok in so many ways.

    If it isn't, then what have you done so far? Where are you stuck? That's an aweful lot to be asking for in one thread without at least giving us where you're at and what the specific problem is.
    Me.Geek = True

  3. #3
    Join Date
    Apr 2009
    It is a uni assignment.

    I'm not asking for answers, Id just like n explanation how i can go about doing question 4 at this stage.. I have done questions 1,2 and 3.

    I'm currently stuck on Question 4, and the use of a set operator.

  4. #4
    Join Date
    Nov 2007
    Adelaide, South Australia
    Could any one please explain to me how i would go about doing those queries?
    Yes. Quit fooling around with other stuff and bloody well learn the material instead of just posting your assignment needs in a forum and expecting everyone else to give you the answers.

    Ask your lecturer about question 4? I would not use SET for such a basic query.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!

    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts