
In this lecture we will learn how to install Python on windows computer.
Learn how to install Python IDE PyCharm on windows computer.
Learn how to install Python on Mac.
Learn how to install Python IDE PyCharm on Mac.
Learn how to install Python on a Linux computer.
Learn how to install Python IDE PyCharm on a Linux computer.
Refer to this lecture if you face any difficulties installing and setting up Python
Explore PostgreSQL, a powerful open-source relational database management system with tables, relationships, and object-relational features, using SQL for data manipulation and installation on Windows and Mac.
Download and install Postgres on Windows using the official installer, choose version 16.2 64-bit, set password admin 123 and port 5432, then log in via the sql shell.
Install postgres on mac by downloading the macOS installer, following the setup wizard, configuring a password and port 5432, then connect with psql to localhost to manage databases.
Learn to create and manage databases with Postgres using the SQL shell, view databases with backslash l, and switch or drop databases such as student DB.
Learn to create a student table with fields name, address, age, and phone number, using id serial as the primary key, and practice inserting a record with insert into.
Learn to read data from a students table using select statements, fetching all rows, filtering with where, selecting specific columns, and combining conditions like age and address.
Learn how to update and delete data in a PostgreSQL database using update queries with set and where clauses, id and name filters, and validate changes in the students table.
Install Visual Studio Code on Windows, create a Python file in a project folder, and run it from the Command Prompt by using cd, dir, and Python demo.py.
Install and set up Visual Studio Code on Mac, download the Mac universal option, and learn to write and run Python code using the editor and terminal.
Learn how to connect Python to a PostgreSQL database using the psycopg2 adapter, install it with pip, and handle concurrent database actions such as inserts and updates.
Learn to connect Python to a Postgres database using psycopg2 by calling connect with dbname, user, password, host, port, and connect to the student DB.
Create a PostgreSQL table from Python using a cursor, defining student_id, name, address, age, and number, then commit and close the connection and verify via SQL shell.
Create table and insert_data functions, connect with a cursor, and insert into students using placeholders replaced by user-provided name, address, age, and number.
Write a Python function to update a student's row in the students table by entering the student ID, editing name, address, age, and number, then commit the changes.
Enable updating a single field by choice with a fields dictionary of name, age, address, and number, and dynamic sql to update only the selected field for a student.
Implement the delete data feature by prompting for a student ID, verifying the record with a select query, confirming deletion, executing a delete command, and committing the changes.
Build a Python command-line menu to perform CRUD operations on the student database, with options to create table, insert, read, update, and delete data, looping until the user quits.
Create a Tkinter-based front end for a Python PostgreSQL database app by building a window, frames, and labeled input fields for student data.
Add and organize buttons in a button frame using the grid layout, enabling insert, create table, update, and delete data within a Python & PostgreSQL database application.
Create a tkinter tree view to display database data in rows and columns, with a dedicated tree frame, scrollbar, and linked y view.
Build a reusable run_query function to fetch data via a connection. Execute select star from students with tuple parameters, handle psycopg2 errors, and safely close cursor and connection.
Implement the insert data function in a Tkinter app, building a parameterized insert query from name, address, age, and phone, then refresh the tree view and show a success message.
Python & PostgreSQL: Build Database Applications
Databases are a fundamental part of modern software development. In real-world applications, programs need to store, retrieve, and manage data efficiently. One of the most powerful open-source database systems used in production environments is PostgreSQL.
In this course, you will learn how to connect Python applications with PostgreSQL and build database-driven applications step by step.
Instead of only focusing on theory, this course emphasises practical learning through real coding examples. You will learn how Python programs communicate with a PostgreSQL database and how to perform common database operations directly from your Python code.
We will start by setting up PostgreSQL and creating a database. Then you will learn how to connect Python to PostgreSQL using a database driver and execute SQL queries from your Python programs.
You will also learn how to perform essential database operations such as:
• inserting data
• retrieving records
• updating existing data
• deleting records
By the end of this course, you will build a complete database-driven application using Python and PostgreSQL, helping you understand how backend applications manage data in real-world systems.
This course is designed to help Python developers quickly learn how to integrate PostgreSQL databases into their applications.
What You Will Learn
• Connect Python applications to PostgreSQL databases
• Install and configure PostgreSQL and pgAdmin
• Execute SQL queries from Python programs
• Insert, retrieve, update, and delete database records
• Work with real database tables in Python applications
• Build a complete database-driven application using Python and PostgreSQL
Requirements
• Basic knowledge of Python programming
• Familiarity with basic programming concepts such as variables and functions
• No prior knowledge of PostgreSQL is required
Who This Course Is For
• Python developers who want to work with databases
• Students learning backend development
• Programmers interested in PostgreSQL integration
• Anyone who wants to build database-driven applications using Python