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
<p>For this tutorial, we'll be using the <ahref="https://sqlite.org/index.html">SQLite</a> Database Management System (DBMS). SQLite support is built into the Python standard library and, because there is no server to install and configure, it's eminently suitable for the example code we'll be running.</p>
70
-
<p>To communicate with our database, we'll be using the <ahref="http://www.sqlalchemy.org/">sqlalchemy</a> Python library. Sqlalchemy is a comprehensive toolkit for working with databases within Python. It has two main components: its Core and its Object Relational Mapper (ORM). If you've ever written a Flask application, you will be familiar with the ORM but, for this tutorial, we'll be using the Core component to issue SQL commands directly to our sqlite database.</p>
70
+
<p>To communicate with our database, we'll use the <ahref="http://www.sqlalchemy.org/">sqlalchemy</a> Python library. Sqlalchemy is a comprehensive toolkit for working with databases within Python. It has two main components: the Core and the Object Relational Mapper (ORM). (If you've ever written a Flask application, you will be familiar with the ORM). For this tutorial, we'll use the Core component to issue SQL commands directly to our SQLite database.</p>
71
71
<p>First, let's import the sqlalchemy libary:</p>
72
72
73
73
</div>
@@ -90,8 +90,8 @@ <h1 id="Let's-Create-a-Database!">Let's Create a Database!<a class="anchor-link"
<p>Sqlalchemy uses an 'engine' object to interact with the database which you can create using a 'database url' string. The <ahref="http://docs.sqlalchemy.org/en/latest/core/engines.html#database-urls">sqlalchemy documentation</a> has details on the different types of url you need to use for various DBMSs.</p>
94
-
<p>SQLite uses a single file for each database and the url is essentially a path to that file. Our example database will contain data about High Altitude Balloon flights. Let's create an engine and call our database file 'flights.db:'</p>
93
+
<p>Sqlalchemy uses an 'engine' object to interact with a database. You create an engine using a 'database url' string. The <ahref="http://docs.sqlalchemy.org/en/latest/core/engines.html#database-urls">sqlalchemy documentation</a> has details on the different types of url you need to use for various DBMSs.</p>
94
+
<p>SQLite uses a single file for each database and the url is a path to that file. Our example database will contain data about High Altitude Balloon flights. Let's create an engine and call our database file 'flights.db:'</p>
95
95
96
96
</div>
97
97
</div>
@@ -113,7 +113,8 @@ <h1 id="Let's-Create-a-Database!">Let's Create a Database!<a class="anchor-link"
<p>Now, we'll connect to our database using a 'connection' object. At this point, sqlalchemy will connect to a database if it already exists and, if not, it will create the database file and connect to it.</p>
116
+
<p>Now, we'll connect to our database using a 'connection' object.</p>
117
+
<p>At this point, sqlalchemy will connect to a database if it already exists and, if not, it will create the database file and connect to it.</p>
0 commit comments