Exercises

SQL and RDBMS Exercises

  1. 17.1 (Books Database) In an IPython session, perform each of the following tasks on the books database from Section 17.2:

    1. Select all authors’ last names from the authors table in descending order.

    2. Select all book titles from the titles table in ascending order.

    3. Use an INNER JOIN to select all the books for a specific author. Include the title, copyright year and ISBN. Order the information alphabetically by title.

    4. Insert a new author into the authors table.

    5. Insert a new title for an author. Remember that the book must have an entry in the author_ISBN table and an entry in the titles table.

  2. 17.2 (Cursor Method fetchall and Attribute description) When you use a sqlite3 Cursor’s execute method to perform a ...

Get Intro to Python for Computer Science and Data Science: Learning to Program with AI, Big Data and The Cloud now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.