Python Databases

MatDeck, among the other things, is a Python editor that can open, create and build Python documents. All existing Python database libraries for SQL or MySQL databases can be used, for example: MySQL connector, SQLite – sqlite3, PostgreSQL – psycopg2, MongoDB; pymongo and mongodb, SQLAlchemy, Redis, Apache Cassandra, Neo4j…

In MatDeck, Python language can be written and executed in two ways: in Python (.py) documents or included in a MatDeck document; No matter which way you use Python in MatDeck the code can be executed.

We have provided several basic examples of working with SQLite databases using Python from MatDeck:

  1. Connecting to a SQLite Database:
  2. Creating a new table in a SQLite database:
  3. Inserting data into a SQLite table:
  4. Selecting table data:
  5. Deleting table data:
  6. Updating table data:
  7. Inner join in SQLite:

The following examples are basic examples of working with MySQL databases using Python from MatDeck:

  1. Connecting to a MySQL Database:
  2. Creating a new MySQL database:
  3. Creating a new table in a MySQL database:
  4. Inserting data into a MySQL table:
  5. Selecting table data:
  6. Deleting table data:
  7. Updating table data:
  8. Inner join in MySQL:

More

For tips and useful information on how to use the different features in MD Python, use the following manuals: