Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsOtherProgramming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
  #1  
Old December 4th, 2003, 03:00 PM
malteser0205126 malteser0205126 is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 2 malteser0205126 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Unhappy Confused by Queries

Hey im completely new 2 this so it will probably seem easy to any1 reading this but heres the query i have to do
thanx

Consider the database schema on the relations (where the key attributes are followed by a *)

COURSES(Number*, Faculty, CourseName)
STUDENT(Number*, Surname, FirstName, Faculty)
EXAMS(Student*, Course*, Grade, Date)

Relation EXAMS stores the registration number(attribute Student) of students that passed the exam for a given course (attribute Course is the number of course, not the name of the course), the grade and the date of the exam.

Write the query that finds the surnames of students and the exams they passed (number of course and corresponding grade) in SQL, Relational Algebra, and Relational Calculus.

Any help will be greatly appreciated
Thanks

Reply With Quote
  #2  
Old January 1st, 2004, 12:59 PM
Skip's Avatar
Skip Skip is offline
Contributing User
ASP Free Novice (500 - 999 posts)
 
Join Date: Nov 2003
Location: UK
Posts: 816 Skip User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 21 m 47 sec
Reputation Power: 5
well you can do

** UNTESTED
<%

'/// DB Connection Here
set RS = Server.createObject("ADODB.RecordSet")
SQL ="Select STUDENT.Surname, STUDENT.FirsName, STUDENT.Faculty" & _
"COURSES.CourseName, COURSES.Number, EXAMS.Grade, EXAMS.Date" & _
" From EXAMS Inner Join STUDENT on EXAMS.Student = STUDENT.NUMBER" & _
"inner join COURSES on EXAMS.Course = COURSES.Number"

RS.Open SQL, Conn
If RS.EOF Then
Response.write("Database is Empty")
Else
Do Until RS.EOF
Response.write( RS("Surname") RS("CourseName") RS("Number) RS("Grade")& " <BR>")
RS.MoveNext
Loop
%>

Reply With Quote
Reply

Viewing: ASP Free ForumsOtherProgramming Help > Confused by Queries


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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 On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway