VOOZH about

URL: https://www.geeksforgeeks.org/python/python-getting-started-with-psycopg2-postgresql/

⇱ Python | Getting started with psycopg2-PostGreSQL - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Python | Getting started with psycopg2-PostGreSQL

Last Updated : 20 Feb, 2019
PostgreSQL is a powerful, open source object-relational database system. PostgreSQL runs on all major operating systems. PostgreSQL follows ACID property of DataBase system and has the support of triggers, updatable views and materialized views, foreign keys. To connect PostgreSQL we use psycopg2 . It is the best and most friendly Database adapter in python language. It is both Unicode and Python3 friendly. Installation Required -
 pip install psycopg2 
Let's get started and understand PostgreSQL connection in parts. Step #1: Connection to PostGreSQL   Step #2: Declare Cursor Allows Python code to execute PostgreSQL command in a database session.   Step #3: Write your SQL Query and execute it.   Step #4: Close the connection
Comment
Article Tags: