You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.
Dismiss alert
<meta name="description" content="Full Stack Python shows how an entire Python web application is built and deployed. Each section of the guide explains a different key concept, from the server through the Python WSGI web framework to the front end JavaScript.">
<p>A database is an abstraction on top of an operating system's file system to
ease creating, reading, updating, and deleting persistent data. The
database storage abstraction most commonly used in Python web development is
sets of relational tables. Alternative storage abstractions are explained in
the <a class="reference external" href="../no-sql-datastore.html">NoSQL</a> section of this guide.</p>
<p>Relational databases store all data in a series of tables. Interconnections
between the tables are specified as <em>foreign keys</em>.</p>
<p>Databases storage implementations vary in complexity. SQLite, a database
included with Python, creates a single file for all data per database.
Other databases such as Oracle, PostgreSQL, and MySQL have more complicated
persistence schemes while offering additional advanced features that are
useful for web application data storage.</p>
<p><a class="reference external" href="http://www.postgresql.org/">PostgreSQL</a> and
<a class="reference external" href="http://www.mysql.com/">MySQL</a> are two of the most common open source
databases for storing Python web application data.</p>
<p><a class="reference external" href="http://www.sqlite.org/">SQLite</a> is a database that is stored in a single
file on disk. SQLite is built into Python but is only built for access
by a single connection at a time. Therefore is highly recommended to not
<a class="reference external" href="https://docs.djangoproject.com/en/dev/ref/databases/#database-is-locked-errors">run a production web application with SQLite</a>.</p>
<div class="section" id="id1">
<h2>PostgreSQL</h2>
<p>PostgreSQL is the recommended relational database for working with Python
web applications. PostgreSQL's feature set, active development and stability
contribute to its usage as the backend for millions of applications live
on the Web today.</p>
<div class="section" id="postgresql-resources">
<h3>PostgreSQL resources</h3>
<p>This post on "<a class="reference external" href="http://killtheyak.com/use-postgresql-with-django-flask/">Use PostgreSQL with Django or Flask</a>"
is a great quickstart guide for either framework.</p>
<p><a class="reference external" href="http://postgresweekly.com/">PostgreSQL Weekly</a> is a weekly newsletter of
PostgreSQL content from around the web.</p>
<p><a class="reference external" href="https://www.braintreepayments.com/braintrust/scaling-postgresql-at-braintree-four-years-of-evolution">Scaling PostgreSQL at Braintree</a>. Fascinating
inside look at the evolution of the database's usage at Braintree.</p>
<p><a class="reference external" href="http://www.ibm.com/developerworks/library/os-postgresecurity/">Total security in a PostgreSQL database</a>.
There is no such thing as total security but this is a good article anyway.</p>
and <a class="reference external" href="http://readwrite.com/2013/09/14/google-waves-goodbye-to-mysql-in-favor-of-mariadb">Google</a>.
MySQL remains a viable database option but I always recommend new Python
developers learn PostgreSQL if they do not already know MySQL.</p>
<div class="section" id="mysql-resources">
<h3>MySQL resources</h3>
<p><a class="reference external" href="http://designm.ag/tutorials/28-beginners-tutorials-for-learning-about-mysql-databases/">28 Beginner's Tutorials for Learning about MySQL Databases</a>
is a curated collection on various introductory MySQL topics.</p>
<p>This tutorial shows how to install <a class="reference external" href="http://www.cs.wcupa.edu/rkline/index/mysql-lin.html">MySQL on Ubuntu</a>.</p>