Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Student(snum: integer, sname: string, major: string, level: string, age: integer) Class(name: string, meets_at: time, room: string, fid: integer) Enrolled(snum: integer, cname: string) Faculty(fid: integer, fnarne:

Student(snum: integer, sname: string, major: string, level: string, age: integer) Class(name: string, meets_at: time, room: string, fid: integer) Enrolled(snum: integer, cname: string) Faculty(fid: integer, fnarne: string, deptid: integer)

Grade(snum, cname, score) Prerequisite(cname, prereqcname)

> No 2 Class can have same name. > Score is an integer value which indicates students score out of 100. > sname, cname are same as defined in Class and Student table. > A student can take more than 1 class.

Use above information as needed while creating tables. 2. Use the csv files from zip and insert given data into the database. 3. Write and execute all these queries on your database.

  1. Complete all queries from Exercise 5.1.

  2. Find name of Students who have enrolled in some classes, but have not yet received

    any grades for any of those classes.

  3. For each class, print the name of the class and name of student who topped the class. If

    2 students have the same score, select the one who is younger.

  4. Find the 2nd topper for class Operating System Design. If there are two students with

    the same score, select the one whose name is lexicographically smallest.

  5. Query to check if 2 students have same name.

  6. Rank each student for the class Operating System Design. For example, one who has

    scored highest will have rank 1, second highest will have rank 2 and so on. If 2 students

    have scored the same, they will have the same rank.

  7. Find classnames with no prerequisites.

  8. Find all prerequisite for class Operating System Design and Multivariate Analysis.

  9. Find all class names with at least 2 prerequisite.

  10. Find youngest student by each department and major if their average grade score is

    more than 80 and order them by their name.

  11. Add 5 to the score of every student who has grades for database systems, but ensure

    no one's score goes beyond 100.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advances In Spatial And Temporal Databases 11th International Symposium Sstd 2009 Aalborg Denmark July 8 10 2009 Proceedings Lncs 5644

Authors: Nikos Mamoulis ,Thomas Seidl ,Kristian Torp ,Ira Assent

2009th Edition

3642029817, 978-3642029813

More Books

Students also viewed these Databases questions

Question

Describe the criteria necessary for a business to record revenue.

Answered: 1 week ago