Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2007

    Write the following queries in Datalog.


    I have e problem but i don't know where to post it so I decide to post here.
    If anybody can help me God bless him or her.

    Suppose we have the following relations or predicates:
    Students(id, name)
    Courses(number, prereq)
    Enrolls(id, number)

    The interpretation should be obvious: students have ID's (key) and names, courses have numbers (key) and prerequisties, which are themselves course numbers, and enrollments are pairs consisting of a student ID and the number of a course in which that student is enrolled. Write the following queries in Datalog. You may use more than one rule if you wish.

    a) Find the names of the students enrolled in CS145.

    b) Find the students who are enrolled in a course and one of its prerequisites at the same time.

    c) Find the students who are enrolled in only one course.

    with respect

  2. #2
    Join Date
    Jan 2007
    What course is this for?
    Home | Blog

Posting Permissions

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