Welcome to the dBforums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

If you prefer not to see double-underlined words and corresponding ads, place your cursor
here for ContentLink opt out.

Go Back  dBforums > General > Database Concepts & Design > Write the following queries in Datalog.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-05-07, 05:35
zenun zenun is offline
Registered User
 
Join Date: Oct 2007
Posts: 1
Write the following queries in Datalog.

HELLO EVERYBODY

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
Zenun
Reply With Quote
  #2 (permalink)  
Old 10-05-07, 05:50
georgev georgev is offline
SQL Apprentice
 
Join Date: Jan 2007
Location: hiding
Posts: 8,143
What course is this for?
__________________
George
You only stop learning when you stop asking questions.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On