Source: https://www.flsouthern.edu/news/recent/2020/students/computer-science-faculty-students-stay-social-thr.aspx
CSC 3340: Databases
(Fall 2024)

Syllabus

LMS

Teachers


Assignments


Other Pages

Project 3:
Curious Aqua Queries


Assigned: Fri Sep 20 2024
Due: 11:59:00 PM on Mon Oct 07 2024
Team Size: 2
Language: Python 3 and SQLite
Out of: 100 points


In this project, you'll implement many search queries in SQL, effecively replacing some old Python functions. The functions in this project shouldn't take the database connection as a parameter and should return just a single string that contains the query. I'll test that your code works by running the query myself. You can test things yourself by using this tester script, though it does not contain all the tests that I will use; it does not guarantee a score.

Part 0, 10 points: Write a python function, get_biggest_area_lake_query(), that returns a string containing an SQL query that will return a single result that is the name of the lake with the biggest surface area. If you want to improve your old code, replace your get_biggest_area_lake() function from Project 0 to call this query.

Part 1, 10 points: Write a python function, get_deepest_lake_query(), that returns an SQL query that returns a the name of the deepest lake. This can also be used to replace one of your previous functions.

Part 2, 5 points: Let's keep going. Write the appropriate get_biggest_volume_lake_query().

Part 3, 10 points: Next: get_highest_average_depth_lake_query. This one is slightly harder, so it's worth more points. Slightly.

Part 4, 10 points: Next: get_most_southern_lake_query()

Part 5, 10 points: Next: get_number_of_big_lakes_query(). This query should always return a tuple that contains a single number.

Part 6, 10 points: get_number_west_query will take a single parameter: the longitude (number, not string) to compare with.

Part 7, 5 points: The last one to implement from Project 0 is get_deepest_western_lakes_query(). For this one, you'll need to use an alias as part of your search.

Part 8, 10 points: Let's include some new queries using our gator_sightings table. Write get_most_gators_sighted_query(), which returns the lake that has had the most gators in one sighting.

Part 9, 10 points: Write get_gator_lakes_query(), which returns the names of all lakes that have had gator sightings.

Part 10, 10 points: Write get_most_gators_by_lake_query(), which returns pairs (lake name, num gators) where each pair contains the most gators that have been spotted in that lake.

Submitting your Project:

Choose a team name that no other team will choose. Then make sure all your code is in a file labelled with your team name, followed by _project3.py all in snake_case. (For example, my file name would be: kburke_project3.py.) It's very important to name your file correctly in order for me to grade it. Make sure your code runs, then upload it to the project on Canvas. If there is already a file up on Canvas, I recommend deleting that before uploading the new version. If you submit well before the deadline, send me a message on Slack. If there's adequate time, I'll check it and post feedback on Canvas. If you submit after the deadline, please message me so I know I have something late to grade.