Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

SQL (10 pts.) Database creation and querying exercise. The schema, DDL, and instance for the University database from the textbook are provided in Appendix A.

SQL

(10 pts.) Database creation and querying exercise.

The schema, DDL, and instance for the University database from the textbook are provided in Appendix A. The electronic form of the DDL and insert statements can be downloaded from the textbook website. Follow Lab material from the textbook home page to Sample tables and download DDL with drop tables and SQL code for creating small relations. Analyze these files. Next, create the university database in SQLite (if you are comfortable with another DBMS, you may use it as long as it follows standard SQL). You do not have to retype any SQL statements, just use the files. Submit sample screenshots of the database schema and the database instance. Attached is one such example. sqlite_interaction.jpgDownload sqlite_interaction.jpg

Note: All screenshots should be included in one document. Zip folder submissions will not be graded.

(10 pts.) Run the following queries on the university database you just created. Submit actual queries and their results (copy and paste text would be best). Hint - All these queries are single relation queries.

List all students.

List only course_ids of courses that are offered in Spring 2009.

List only student names and how many more credits they have to take to complete their degree. Assume that the degree completion requirement is 124 credits for all students.

Find the total number of instructors and their average salary.

List only course_ids of all courses that are either offered in Spring or Summer.

List all rooms that have a capacity of at least 50 and utmost 100.

List all instructors who have a name that begins with K.

List only student_ids of students who have received a grade of A, A-, or B+ in any course.

(8 pts.) Exercise 3.11 - you may want to ignore Spring in part b. Run these queries on the university database you have created. Submit actual queries and their results (copy and paste text would be best).

(4 pts.) Exercise 3.15 parts b and c only.

(4 pts.) Exercise 3.21 parts a and c only.

(2 pts.) Exercise 4.14

(2 pts.) Exercise 5.12

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

Step: 3

blur-text-image

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

Concepts of Database Management

Authors: Philip J. Pratt, Mary Z. Last

8th edition

1285427106, 978-1285427102

More Books

Students also viewed these Databases questions

Question

Under what circumstances are pay differentials justified?

Answered: 1 week ago

Question

=+Have they changed the way employees view IP?

Answered: 1 week ago