Skip to Content
Head First Python, 3rd Edition
book

Head First Python, 3rd Edition

by Paul Barry
August 2023
Beginner
666 pages
15h 44m
English
O'Reilly Media, Inc.
Content preview from Head First Python, 3rd Edition

Chapter 12. Databases: Getting Organized

Image

Sooner or later, your application’s data needs to be managed.

And when you need to more appropriately manage your data, Python (on its own) may not be enough. When this happens, you’ll need to reach for your favorite database engine. To keep things… em, eh… manageable, we’re going to stick with database engines that support trusty ol’ SQL. In this chapter, you’ll not only create a database then add some tables to it, you’ll also insert, select, and delete data from your database, performing all of these tasks with SQL queries orchestrated by your Python code.

The Coach has been in touch…

And he’s a little confused.

Image

Whoops.

When you take a look at the Coach’s system, someone copied the new files from the latest swim session into the swimdata folder overwriting the existing data (where the filenames matched).

You assure the Coach he did nothing wrong, and you also confirm you still have a copy of the “old” data as a ZIP archive.

With a friendly “don’t worry,” you commit to adjusting the system so that older, historical data doesn’t get wiped by any new stuff.

All you have to do now is work out how to do this…

Cubicle Conversation

Image
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Head First Python, 2nd Edition

Head First Python, 2nd Edition

Paul Barry

Publisher Resources

ISBN: 9781492051282Errata Page