Database & SQL

Moderators: None (Apply to moderate this forum)
Number of threads: 1174
Number of posts: 2221

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
SQL Quries Posted by tayyabali on 31 May 2009 at 11:05 PM
Consider the following few relations of Academic systems.

1. Semester (SemNo, Sem_Dur, Start_Date, End_Date)
2. Professor (VUPid, P_Name, Age, Deptid, CourseCode)
3. Prof_Exp(VUPid, Experience)

4. Department (Deptid, D_Name, Main_Office, HOD)
5. Project (Pid, Title, Start_Date, Due_Date, Prj_Instructor)
6. CoursePre-Req(CourseCode, Pre-requisite)
7. Course (CourseCode, C_Name, Prg_Code)
8. Student (VUSid, Std_Name, Std_Age, Prg_Code, )
9. Program (Prg_Code, Prg_Name, No_of_Sem)
10. ProgramDur (Prg_Code , Max_Dur)

Write down the QUERIES for the following given situations.

a. Create a new data base. Name it VUDBMS.
b. Create Tables with attributes and name them accordingly.
c. Insert data in related Tables (program, student, professor, degree).
***. Show one command for single entry in each relation.
d. List the names, ages, Department Name of professors, working in a different department.
e. List the professor Names, Total Experience and Group by professor Names.( using aggregate functions)
f. List the program code, program Name, Max. Duration from relations named Program. ( using aggregate functions)
g. List Department Name, Address and HOD Name.
h. List student ID, Student Name, student age where student ages are between 18 and 25 and sort by age field in ascending order.
i. Alter student relation by adding column Address.
j. List project title, start date and project instructor where project due date is greater then today date and sort result by start date field in Ascending order (using aggregate function getdate())




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.