
Learn to work with SQL databases like MySQL and SQLite and NoSQL databases like MongoDB using Python, and build and manage databases from basics to professional applications.
Identify the two prerequisites: Python basics - variables, data types, conditionals, loops, functions, classes, modules, and packages - and the Jupiter notebook setup, with Anaconda as a download option.
Discover how MySQL, a relational database management system by Oracle, uses SQL to update, query, and administer data, offering open source, flexible, high-performance, secure, and easy-to-use features.
Explore SQLite, a lightweight, serverless, transactional relational database integrated with your application, enabling direct file-based reads and writes in Python with no installation.
MongoDB is an open source database management system that serves as an alternative to relational databases for large distributed data, supporting document oriented data with collections and documents.
Download MySQL using the community installer, choose your operating system, and follow the installation steps to set up MySQL locally on your device.
Install MySQL locally using the installer and launcher, set up the server with MySQL Workbench and MySQL Shell, and install Python MySQL connector via pip to test import and connection.
Install the MySQL connector for Python with pip, import and test it in a Jupyter notebook, then connect to a localhost database as root and query.
Create and test a MySQL database with Python by importing the MySQL connector, establishing a connection, creating a cursor, and executing the create database statement for a new database.
Create tables in MySQL with Python by connecting to the new data database, using a cursor to execute a create table statement for students, and then show tables to confirm.
Create and modify tables by defining a primary key with auto increment in column id, and alter existing tables to add a primary key for unique record identification.
Learn to insert data into tables in MySQL with Python using the insert into statement, including connecting, using a cursor, executing inserts, and committing changes to add new records.
Learn to insert many records into a students table using the execute mini statement, by passing a list of values and committing changes, then display the inserted records.
Execute a select statement in python to fetch all data from the students table using a mysql connector, cursor, and a for loop to print records.
Learn to select specific columns from the students table with a select statement, using Python and the MySQL connector, create a connection and cursor, execute, and print results.
Connect to the new data database, create a cursor, and execute a select statement to retrieve data from the students table; fetch the first record with fetchone and print result.
Filter records from the students table by using a select statement with a where clause, execute it with a cursor, fetch results, and print matching records in Python.
Explore wildcard characters in MySQL to filter records with the like operator, using % and _ to match patterns in the name column.
Sort MySQL query results with Python using the order by clause to arrange records in ascending or descending order by name or code columns in the students table.
Delete records from an existing table using delete from, execute with a cursor, and commit to apply changes, while using placeholders to prevent sql injections in mysql with python.
Learn how to remove a table in MySQL using Python by executing a drop table statement via a cursor, with an optional if exists clause to prevent errors.
Use the update statement to modify existing records in a table, then commit changes and print the result; protect against SQL injection by using placeholders with execute.
Learn to constrain query results in MySQL using limit and offset with Python to fetch the first four rows from the students table.
Explore sqlite3 in Python to connect to a sqlite database or create one with no installation. Import the library and execute SQL statements directly in a lightweight setup.
Import the Sequel 03 package to work with sqlite databases in Python, then use the connect method to connect to data testing and assign the connection to a variable.
Use sqlite3.connect to obtain a Connection object and verify its type with built-in print and type functions. This lesson demonstrates the Connection object as a class type.
Create a new cursor from the database connection to execute sequel operations, print and inspect the cursor type, and fetch results using the cursor.
Use the daytime function from the skylight library in Python to obtain the current date and time via a select statement, then execute and fetch one to print the result.
Close the database connection using the close function on the connection object, such as new_connection.close(), to safely terminate access to the data_testing database.
Learn how to manage SQLite connections in Python using the with statement for clean, readable code. Execute queries with a cursor, fetch results, and print the current date and time.
learn to create and manage a sqlite3 database in python by connecting to a data testing database, creating a clients table, inserting records, committing, closing, and fetching results.
Drop the clients table in the data testing database using the drop table statement. Use if exists to avoid errors, then commit and close the connection.
Create a sqlite3 program in Python that drops and recreates a clients table, uses with statement, inserts multiple records, and selects and prints rows where number > 7.
Discover how Python libraries let you work with diverse databases, including MongoDB with a Mongo module, MySQL with the MySQL Connector, Cassandra with the Cassandra Driver, and Oracle or PostgreSQL.
Learn how MongoDB, a NoSQL database, stores data as JSON-like documents in collections and how to install the Python driver to interact with it.
Download the MongoDB community server from the official page, install MongoDB Compass, and use the PI Mongo package in Python to connect to databases, collections, and documents.
Install the MongoDB driver for Python, then import it in a notebook to verify the setup. Create a Mongo client to start using MongoDB databases in Python.
Create a MongoDB connection with Python and define a new database and collection. Insert your first document into the Students collection with insert_one and verify database appears in MongoDB Compass.
Execute single document insertion with insert_one and print the inserted_id. Insert multiple documents using insert_many with a list of dictionaries into a students collection in a new data database.
Connect to the MongoDB server with Python's MongoClient, create a new data database and a students collection, and insert multiple student documents, then display their inserted_ids in MongoDB Compass.
Specify custom _id values (1 through 6) for documents using Python's MongoClient and InsertMany, print inserted_ids, and view changes in MongoDB Compass for New Students collection in New Data database.
Learn to retrieve data in MongoDB with Python using find and find_one to display the first document from the New Students collection. Loop with find to show all documents.
Use the find method to limit and select documents in the new students collection, then apply advanced query modifiers and order results in ascending or descending order.
Sort the new students collection by name in ascending and descending order using sort with -1, and delete a single document with delete_one in MongoDB with Python part 10.
Apply a query to delete first matching document with delete_one, or delete_many with an empty query to delete all matches in new students collection, and print the deleted count.
Learn how to drop a MongoDB collection, and update documents with update_one and update_many using the set operator, illustrated on the new students collection.
Learn to limit MongoDB results with find and limit, displaying the first three documents from the new students collection, iterating with a for loop and printing each document.
Hello and welcome to the Databases with Python: MySQL, SQLite & MongoDB with Python Course.
Using and manipulating databases is one of the most important and powerful skills that every developer should master well, because it is in great demand in the market constantly and with high salaries.
So, if you want to be a professional developer, engineer or data scientist, it is very important to be familiar with dealing with databases of all kinds.
In this course, you will learn how to use different types of databases with the Python programming language, from beginning to professionalism. You will master the use of SQL through MySQL and SQLite, and Also NoSQL through MongoDB.
You'll learn:
Build and Manipulate Databases with Python
Master SQL programming
Installing and using the MySQL tools
Using MySQL with Python
Create, insert, update, filter and delete records, tables and databases in SQL
Apply the SQL Commands in Python without installing programs
Using SQLite with Python
Master NoSQL programming
Installing and using the MongoDB tools
Practicing MongoDB with Python
Create, insert, update, filter and delete documents and collections in NoSQL
Get the instructor QA support
and more.
A database is a structured collection of data. It may be anything from a simple shopping list to a picture gallery or a place to hold the vast amounts of information in a corporate network.
What is MySQL?
MySQL is a relational database management system (RDBMS) developed by Oracle that is based on structured query language (SQL).
MySQL is open source, flexible, high performance, secure, and easy to use.
What is SQLite?
SQLite is a software library that provides a relational database management system. The lite in SQLite means lightweight in terms of setup, database administration, and required resources.
SQLite has the following noticeable features: self-contained, serverless, zero-configuration, transactional.
What is MongoDB?
MongoDB is an open-source NoSQL database management program used for large sets of distributed data.
Organizations can use Mongo DB for its ad-hoc queries, indexing, load balancing, aggregation, server-side execution and other features.
Hi, my name is Ahmed Ibrahim. I’m a software engineer and Data Science Professional, and I’ll be the instructor for this course.
If you have any questions during this course, please don’t hesitate to ask me questions, and I’ll answer you as soon as possible.
So, we have a lot to cover in this unique course.
Let’s get started