python sqlite3 入门 (视频讲座)

python sqlite3 入门 (视频讲座)

an SQLite mini-series! - Simple Databases with Python

Creating a database, table, and inserting - SQLite3 with Python 3 part 1

2016年1月17日发布
Welcome to an SQLite mini-series! SQLite, as the name suggests, is a lite version of an SQL database. SQLite3 comes as a part of the Python 3 standard library.

Databases offer, typically, a superior method of high-volume data input and output over a typical file such as a text file. SQLite is a "light" version that works based on SQL syntax. SQL is a programming language in itself, but is a very popular database language. Many websites use MySQL, for example.

SQLite truly shines because it is extremely lightweight. Setting up an SQLite database is nearly instant, there is no server to set up, no users to define, and no permissions to concern yourself with. For this reason, it is often used as a developmental and protyping database, but it can and is used in production. The main issue with SQLite is that it winds up being much like any other flat-file, so high volume input/output, especially with simultaneous queries, can be problematic and slow. You may then ask, what really is the difference between a typical file and sqlite. First, SQLite will let you structure your data as a database, which can easily be queried, so you get that functionality both with adding new content and calling upon it later. Each table would likely need its own file if you were doing plain files, and SQLite is all in one. SQLite is also going to be buffering your data. A flat file will require a full load before you can start querying the full dataset, SQLite files don't work that way. Finally, edits do not require the entire file to be re-saved, it's just that part of the file. This improves performance significantly. All right great, let's dive into some SQLite.

https://pythonprogramming.net/sql-dat...

Inserting variables to database table - SQLite3 with Python 3 part 2

2016年1月17日发布
In the previous SQLite tutorial, we learned how to create a database, a table, and how to insert data. In this tutorial, we're going to build on that, covering how to insert dynamically into a database's table, using variables.

Sample code and text tutorial: https://pythonprogramming.net/sqlite-part-2-dynamically-inserting-database-timestamps/

Read from (SELECT) Database table - SQLite3 with Python 3 part 3

  • YouTube https://www.youtube.com/watch?v=NCc5r7Wr7gg&list=PLQVvvaa0QuDezJh0sC5CqXLKZTSKU1YNo&index=3
    2016年1月17日发布
    In the previous tutorials, we've covered creating a database and populating one, now we need to learn how to read from the database. Reading from a database is where the power of using something like SQLite over a flat file starts to make sense. While we can query the entire table, we can instead just query a single column, or even based on specific row values. Let's see what I mean

sample code and text tutorial:https://pythonprogramming.net/sqlite-part-3-reading-database-python/

Graph from database table example - SQLite3 with Python 3 part 4

2016年1月17日发布
In this tutorial, we're going to show how you can use a select query, and iterate through it, to get data that you can make use of. In this example, we're going to generate a Matplotlib graph

Text tutorial and sample code: https://pythonprogramming.net/graphing-from-sqlite-database/

UPDATE and DELETE - SQLite3 with Python 3 part 5

2016年1月17日发布
Up to this point with our SQLite and Python tutorial series, you have been shown how to create a database, a table, how to insert data, and how to read data. In this tutorial, we're going to talk about how to modify existing data, as well as how to delete data.

It is important to note that there are no undos when it comes to SQL. Once you delete something, or once you modify it, that's that. Take your time, read over, and re-read your queries before you do them!

Sample code and text tutorial: https://pythonprogramming.net/sqlite-update-delete-tutorial/

转载于:https://www.cnblogs.com/duan-qs/p/6322547.html

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值