- 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
.
- Vue.js框架與Web前端開發從入門到精通
- 設計模式之禪(第2版)
- 3ds max & VRay產品造型設計經典
- Cacti 0.8 Beginner's Guide
- R Graph Cookbook
- Photoshop CS6中文版基礎培訓教程
- 光影之書:Photoshop+Camera Raw攝影后期與創意合成
- 剪映短視頻剪輯與運營全攻略:視頻剪輯+音頻處理+后期特效+運營管理
- Mastering phpMyAdmin 3.1 for Effective MySQL Management
- 中文版Photoshop CC2018從入門到精通(第4版)
- Excel公式、函數與圖表案例實戰從入門到精通(視頻自學版)
- 新印象:CINEMA 4D電商設計基礎與實戰(全視頻微課版)
- Premiere Pro短視頻剪輯零基礎一本通
- 攝影師的后期必修課(調色篇)
- AutoCAD 2010 機械設計與制作技能基礎教程