Page 20 - Phyton_GUIprogrammingwithTkinter
P. 20

P a ge  | 11


               CHAPTER 3 - DATABASE IN PYTHON


               3.1     Introduction to Database


                              A database is a set of related data that has a regular structure and organized
                       in such a way typically stored electronically in a computer system. A database is usually
                       controlled by a database management system (DBMS). The DBMS allows data storage,
                       retrieval, privacy, security and integrity. There are many commercial and open source
                       database as the following:

                          a)  Commercial (SQL Server, Oracle, Ms Access)

                          b)  Open Source (MySQL, SQLite)

                              Like others programming language, Python also has features  for  database
                       programming. In python, we have to first establish a connection between python file
                       and the database. After that, we can add, search, delete or update the database.
                       Moreover, we can retrieve the data from the database, make any operation on it then
                       re-add it  to the database. The database operations are  performed  using the  SQL
                       language  as shown in  the Figure  3.1 below. Data is either in memory, files or
                       databases. Python supports various databases like SQLite, MySQL, Oracle, Maria DB,
                       PostgreSQL,  etc. Python also supports  Data Definition Language (DDL), Data
                       Manipulation Language (DML) and Data Query Statements.














                                Figure 3.1: Illustration Python Connection with Database

                              In this chapter, we will explain about SQLite  and MySQL integration  with
                       Python programming code.
   15   16   17   18   19   20   21   22   23   24   25