535H1 - students enrolled in the class. 4. Print the names...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
HOMEWORK 1 SUBMISSION: Print screen all your work and paste to MS Word. Hand in Hardcopy in the class on March 28. We do NOT accept any homework after due date. THE DATABASE This project will use a database containing university-type data. The schema of the database is provided below (keys are in bold). Use MS Access . student ( sid , sname, sex, age, year, gpa) dept( dname , numphds) prof( pname , dname) course( cno , cname, dname ) major( dname , sid ) section( dname , cno , sectno , pname) enroll( sid , grade, dname , cno , sectno ) Insert at least 8 records in each table. QUERIES Write SQL queries that answer the questions below (one query per question) and the query answers should be duplicate free, but you should use distinct only when necessary. 1. Print the names of professors who work in departments that have fewer than 20 PhD students. 2. Print the name(s) of student(s) with the highest gpa.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
3. For each Computer Sciences class, print the cno, sectno, and the average gpa of the
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: students enrolled in the class. 4. Print the names and section numbers of all classes with more than five students enrolled in them. 5. Print the name(s) and sid(s) of the student(s) enrolled in the most classes. 6. Print the names of departments that have one or more majors who are under 15 years old. 7. Print the names and majors of students who are taking one of the Mathematics courses. (Hint: Youll need to use the "like" predicate and the string matching character in your query.) 8. For those departments that have no majors taking a Mathematics course, print the department name and the number of PhD students in the department. 9. Print the names of students who are taking both a Computer Sciences course and a Mathematics course. 10. Print the age difference between the oldest and youngest Computer Sciences major(s)....
View Full Document

This note was uploaded on 03/23/2011 for the course COMPUTER Ceng 535 taught by Professor Ersinelbasi during the Spring '11 term at Cambridge College.

Page1 / 2

535H1 - students enrolled in the class. 4. Print the names...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online