- MySQL for Python
- Albert Lukaszewski, PhD
- 289字
- 2021-04-13 17:12:28
Record retrieval is without doubt the most common activity employed with regard to MySQL and other relational databases. Like most computer programs, MySQL functions on the basis of being invoked with parameters and returning results in accordance with them. As we seen, Python acts as an intermediary to that process. We can use it to access MySQL, login, and connect to a database of our choice.
In this chapter, we will look at the following:
- Forming a MySQL query directly
- Passing a query to MySQL
- User-defined variables in a MySQL query
- Determining characteristics of a database and its tables
- Changing queries dynamically, without user input
Working through each of these points will help you at the end of the chapter, when we get to the project: a command-line search tool.
The four basic functions of any persistent storage system like MySQL spell CRUD:
- Create
- Read
- Update
- Delete
These are key concepts, which each of the basic MySQL commands reflect.
There is nothing technical about the words themselves, but the concepts are very important. They represent the four activities that you can expect to be able to do in every relational database system you use. There are several alternatives to this acronym and keyword series (for example, SCUD for "select, create, update, and delete" or SIDU for "select, insert, delete, and update"). The point of each of these is that database functionality boils down to two sets of opposing activities:
- Creating and deleting database objects (for example, databases, tables, records)
- Inserting and reading data (that is writing and reading)
Each of these will be addressed in the coming chapters. In this one, we start with reading data using SELECT
.
- PS職場達人煉成記:人人都能學會的Photoshop辦公設計技巧
- 工業產品設計(Inventor 2010)
- Authorware應用案例教程
- 斯科特·凱爾比的零基礎攝影后期課 Lightroom數碼照片調修技法
- 中文版Premiere Pro CC實用教程
- 二維計算機繪圖教程:二維CAD工程師取證全程指導
- Photoshop+CorelDRAW平面設計實例教程(第4版)
- Photoshop CS6實戰從入門到精通(超值版)
- Small Business Server 2008 – Installation, Migration, and Configuration
- Stable Diffusion圖像與視頻生成入門教程
- Linux Shell Scripting Cookbook
- Instant Flask Web Development
- Adobe創意大學Premiere Pro影視剪輯師標準實訓教材(CS6修訂版)
- OpenAM
- Hello HarmonyOS?。壶櫭蓱瞄_發從入門到精通