SitePoint Sponsor

User Tag List

Results 1 to 13 of 13
  1. #1
    SitePoint Wizard billy_111's Avatar
    Join Date
    Jul 2009
    Posts
    1,683
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    SQL to relational algebra

    Hey,

    How can i convert the following SQL query to relational algebra?

    This is the table:-

    Lecturer(LecId, LecName)

    Module(ModuleNumber, LecId, Schedule)

    Enrol(StuId, ModuleNumber)

    Student(StuId, firstName, lastName)
    This is the SQL:-

    SELECT LecName, Schedule FROM Lecturer, Module, Enrol, Student WHERE lastName = 'Burn' AND firstName = 'Edward' AND Module.ModuleNumber = Enrol.ModuleNumber AND Lecturer.LecId = Module.LecId AND Student.StuId = Enrol.StuId
    How can i show this SELECT in relational algebra? With the sybols etc..

    Regards
    Billy

  2. #2
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,580
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    This looks like homework... are you asking us to help you cheat?

  3. #3
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,220
    Mentioned
    58 Post(s)
    Tagged
    3 Thread(s)
    Quote Originally Posted by billy_111 View Post
    How can i show this SELECT in relational algebra?
    why in the world do you think you need to do that?????
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  4. #4
    SitePoint Wizard billy_111's Avatar
    Join Date
    Jul 2009
    Posts
    1,683
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Its not homework

    It's actually revision for exams. I didnt know if anyone would help me with this though.

    Basically i enjoy databases and currently work as a web developer but decided to go forward and do a Masters Degree in Databases.

    Just trying to study Relational Algebra, but cant quite get the syntax right.

    And its not cheating as im not asking you to do my exams for me, its just help i ask for.

    Hope you can help, if not i will delete this thread..

    Regards
    Billy

  5. #5
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,220
    Mentioned
    58 Post(s)
    Tagged
    3 Thread(s)
    masters degree in databases?

    this would imply you already have a graduate degree in databases

    as keyshawn says on monday night countdown, "c'mon, man!!"
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  6. #6
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,220
    Mentioned
    58 Post(s)
    Tagged
    3 Thread(s)
    oops, i meant to say you already have an undergraduate degree

    geez, and i went to university, too
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  7. #7
    SitePoint Wizard billy_111's Avatar
    Join Date
    Jul 2009
    Posts
    1,683
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    lol no i have undergraduate degree in multimedia and internet technology (Bsc hons) and currently doing masters (MSc) in Advanced Databases..

    So do you know where i can get help with this?

    regards

  8. #8
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,220
    Mentioned
    58 Post(s)
    Tagged
    3 Thread(s)
    Quote Originally Posted by billy_111 View Post
    So do you know where i can get help with this?
    1. your course textbook(s)
    2. your course reading materials
    3. your professor
    4. your professor's teaching assistant
    5. fellow students in the same course
    6. http://en.wikipedia.org/wiki/Relational_algebra

    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  9. #9
    SitePoint Wizard billy_111's Avatar
    Join Date
    Jul 2009
    Posts
    1,683
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Lol ok thanks


  10. #10
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,580
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I hope that this is the first course taught in a "Masters in Advanced Databases" degree

  11. #11
    SitePoint Enthusiast
    Join Date
    Dec 2009
    Posts
    48
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, there's another language/syntax/math thingie I don't want to learn. GL

  12. #12
    SitePoint Wizard
    Join Date
    Nov 2005
    Posts
    1,191
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    "c'mon, man!!"
    My faith in the education system has taken another knock. I've answered some of your posts, and I hope to god you aren't really doing a masters in any sort of db field.

  13. #13
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,220
    Mentioned
    58 Post(s)
    Tagged
    3 Thread(s)
    did you mean me, hash? because that was me you quoted

    let me reassure you, there's no way i'm doing a masters in any university except the one i've almost completed at the school of hard knocks
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"


Bookmarks

Posting Permissions

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