What is Database ?
-A database is an organized collection of data.
-Database handlers create database in such a way that only one set of software program provide access of data to all the users.
-The main purpose of database is to operate large amount of information by storing, retrieving and managing.
Database in Python:
To maintain a database, python provide many modules and supports wide range of database servers :
-GadFly
-mSQL
-MySql
-Infomix
-sqlite3
-sybase
What is sqlite3 ?
-sqlite3 is a python module written by Gerhard Haring for managing the database in the simplest way.
How install the sqlite3 ?
open command promt in your system and write the following command
pip install sqlite3
import sqlite3
import sqlite3
conn=sqlite3.connect('r4rDatabase.db')
if conn:
print("Database is successfully created")
else:
print("Error occur")
conn.close()
Database is successfully created
-In this program, we firstly import the sqlite2 module by import sqlite3, then using connect() function we connect or open the database.