Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The data above is stored in a database table called sets, with column names matching the field names in thie csv file. The table has

The data above is stored in a database table called sets, with column names matching the field names in thie csv file. The table has been created using this SQL command: CREATE TABLE IF NOT EXIST sets (set_num, name, year, theme_id, num_parts) Define a Python function getYearSorteByName that accepts both a database cursor and a number representing a year. This function must return a list of the database rows which match the given year, sorted by the name of the set. To do this you will need to define a function that selects the value in the name column as the key for sorting. Remember that name is in column 1. Assuming that cur and year are the names of the parameters for the database cursor and year respectively, you can use this call to execute to select the correct rows: cur.execute('SELECT * FROM sets WHERE year=?',year)

This is in Python. Please help me !

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

Database In Depth Relational Theory For Practitioners

Authors: C.J. Date

1st Edition

0596100124, 978-0596100124

More Books

Students also viewed these Databases questions