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:
  #1  
Old December 4th, 2003, 04: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, 01: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: 6
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





 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

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





© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 5 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek