Python for infomatics 14th database and SQL application one (translated)

Source: Internet
Author: User
Tags sqlite sqlite database sqlite db sqlite manager

14.1 What is a database

Database a file that stores structure data. The vast majority of databases resemble dictionaries-mappings between key and value relationships. The biggest difference is that the database is stored on the hard disk or other persistent storage, so it still exists after the program ends. The capacity of the dictionary stored in memory is limited by the memory configuration of the computer, so the database can store more data than the dictionary.

Like dictionaries, database software is very fast when inserting and accessing data, even when it is large data. By creating a data index, the database software maintains its performance and allows the computer to quickly jump to a specific portal.

There are many database systems for different purposes, including: Oracle, MySQL, Microsoft SQL Server, PostgreSQL and SQLite. Because SQLite is a common database and built into Python, this book focuses on SQLite. SQLite is designed for inline applications and provides database support for applications. Firefox, for example, uses the SQLite database internally, just like any other product.
You can access http://sqlite.org/to get more information about SQLite.

SQLite is ideal for dealing with problem-solving data in informatics, such as the Twitter crawler software we describe in this chapter.

14.2 Concept of the database

When you first see a database, it looks like a spreadsheet made up of multiple tables. The primary data structures in the database are: tables, rows, and columns. In the technical description of a relational database, tables, rows, and columns are more formally referred to as relationships, tuples, and attributes. In this chapter we use the informal terminology.


14.3 SQLite Manager- Firefox plugin

While the focus of this chapter is to use Python to manipulate the data in the SQLite database, it is easier to do so with a Firefox plugin called SQLite db Manager. This plugin is available for free from the following addresses:

https://addons.mozilla.org/en-us/firefox/addon/sqlite-manager/
You can easily use your browser to create tables in your database, insert and edit data, or run simple SQL queries.

In a way, the database manager is similar to a text editor that processes text files. When you want to do one or more actions on a text file, you can open it directly with a text editor and make changes. But when you have a lot of other people that need to be modified, you often write a simple Python program. When you do database processing, you will find the same pattern. You will use the Database Manager to do simple operations, and more convenient Python program to do more complex operations.

Note: The original article is Dr. Charles Severance's "Python for Informatics".

Python for infomatics 14th database and SQL application one (translated)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.