Entries tagged with “SQL”.


SQLite is a self-contained, server-less, config-free transactional SQL database engine. Python gained the sqlite3 module all the way back in version 2.5 which means that you can create SQLite database with any current Python without downloading any additional dependencies. Mozilla uses SQLite databases for its popular Firefox browser to store bookmarks and other various pieces of information. In this article you will learn the following:

  • How to create a SQLite database
  • How to insert data into a table
  • How to edit the data
  • How to delete the data
  • Basic SQL queries

This article will be similar in function to the recent SQLAlchemy tutorial that appeared on this site earlier this month. If you want to inspect your database visually, you can use the SQLite Manager plugin for Firefox or if you like the command line, you can use SQLite’s command line shell (more…)

A couple years ago I wrote a rather flawed tutorial about SQLAlchemy. I decided it was about time for me to re-do that tutorial from scratch and hopefully do a better job of it this time around. Since I’m a music nut, we’ll be creating a simple database to store album information. A database isn’t a database without some relationships, so we’ll create two tables and connect them. Here are a few other things we’ll be learning:

  • Adding data to each table
  • Modifying data
  • Deleting data
  • Basic queries

(more…)

MySQL for Python

By Albert Lukaszewski

Amazon

Packt

(more…)

Elixir is a lightweight declarative layer on top of SqlAlchemy that’s been around since 2006, well before SqlAlchemy released their own built-in Declarative syntax. Elixir was created by a collaboration between Jonathan LaCour, Daniel Haus and GaĆ«tan de Menten who had a passion for making SqlAlchemy even easier to use. In this tutorial, we’ll look at how to to create our own database with Elixir and how to communicate with a pre-existing database. (more…)