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
or <ahref="https://pypi.python.org/pypi/MySQL-python/1.2.5">MySQL-python</a> (for
3316
+
MySQL). Take a look at the table below which shows that ORMs can work with
3317
+
different web frameworks and database connectors.</p>
3318
+
<p><imgsrc="theme/img/orm-examples.png" width="100%" alt="Examples of how varying Python ORMs can work with different connectors and backends." class="technical-diagram" /></p>
3319
+
<p>For example, in the above table SQLAlchemy can work with or without an
3320
+
accompanying web framework as well as different database connectors.
3321
+
Developers can also use ORMs without a web framework, such as when creating
3322
+
a data analysis tool or a batch script without a user interface. </p>
3301
3323
<h2>What are the downsides of using an ORM?</h2>
3302
3324
<p>There are numerous downsides of ORMs, including</p>
3303
3325
<ol>
@@ -3307,8 +3329,9 @@ <h2>What are the downsides of using an ORM?</h2>
3307
3329
<li>shifting complexity into the application from the database layer</li>
3308
3330
</ol>
3309
3331
<h2>Django's ORM</h2>
3310
-
<p>The <ahref="/django.html">Django</a> web framework comes with its own built-in
3311
-
object-relational mapping module, generally referred to as "the Django ORM".</p>
3332
+
<p>The <ahref="/django.html">Django</a> web framework comes with
3333
+
its own built-in object-relational mapping module, generally referred to
3334
+
as "the Django ORM" or "Django's ORM".</p>
3312
3335
<p><ahref="https://docs.djangoproject.com/en/dev/topics/db/">Django's ORM</a> works well
3313
3336
for simple and medium-complexity database operations. However, there are often
3314
3337
complaints that the ORM makes complex queries much more complicated than
@@ -3324,19 +3347,27 @@ <h2>Django's ORM</h2>
3324
3347
read up on advanced use cases and tools for doing your best work within the
3325
3348
existing framework.</p>
3326
3349
<h2>SQLAlchemy</h2>
3327
-
<p><ahref="http://www.sqlalchemy.org/">SQLAlchemy</a> is currently the most respected
3328
-
Python ORM because it typically get the abstraction level "just right" and
3329
-
seems to make complex database queries easier to write than the Django ORM
3330
-
in most cases. SQLAlchemy is typically used with Flask as the database ORM
3331
-
via the <ahref="https://pythonhosted.org/Flask-SQLAlchemy/">Flask-SQLAlchemy</a>
3350
+
<p><ahref="http://www.sqlalchemy.org/">SQLAlchemy</a> is
3351
+
currently the most respected Python ORM because it typically get the
3352
+
abstraction level "just right" and seems to make complex database queries
3353
+
easier to write than the Django ORM in most cases. SQLAlchemy is typically
or <ahref="https://pypi.python.org/pypi/MySQL-python/1.2.5">MySQL-python</a> (for
76
+
MySQL). Take a look at the table below which shows that ORMs can work with
77
+
different web frameworks and database connectors.</p>
78
+
<p><imgsrc="theme/img/orm-examples.png" width="100%" alt="Examples of how varying Python ORMs can work with different connectors and backends." class="technical-diagram" /></p>
79
+
<p>For example, in the above table SQLAlchemy can work with or without an
80
+
accompanying web framework as well as different database connectors.
81
+
Developers can also use ORMs without a web framework, such as when creating
82
+
a data analysis tool or a batch script without a user interface. </p>
61
83
<h2>What are the downsides of using an ORM?</h2>
62
84
<p>There are numerous downsides of ORMs, including</p>
63
85
<ol>
@@ -67,8 +89,9 @@ <h2>What are the downsides of using an ORM?</h2>
67
89
<li>shifting complexity into the application from the database layer</li>
68
90
</ol>
69
91
<h2>Django's ORM</h2>
70
-
<p>The <ahref="/django.html">Django</a> web framework comes with its own built-in
71
-
object-relational mapping module, generally referred to as "the Django ORM".</p>
92
+
<p>The <ahref="/django.html">Django</a> web framework comes with
93
+
its own built-in object-relational mapping module, generally referred to
94
+
as "the Django ORM" or "Django's ORM".</p>
72
95
<p><ahref="https://docs.djangoproject.com/en/dev/topics/db/">Django's ORM</a> works well
73
96
for simple and medium-complexity database operations. However, there are often
74
97
complaints that the ORM makes complex queries much more complicated than
@@ -84,19 +107,27 @@ <h2>Django's ORM</h2>
84
107
read up on advanced use cases and tools for doing your best work within the
85
108
existing framework.</p>
86
109
<h2>SQLAlchemy</h2>
87
-
<p><ahref="http://www.sqlalchemy.org/">SQLAlchemy</a> is currently the most respected
88
-
Python ORM because it typically get the abstraction level "just right" and
89
-
seems to make complex database queries easier to write than the Django ORM
90
-
in most cases. SQLAlchemy is typically used with Flask as the database ORM
91
-
via the <ahref="https://pythonhosted.org/Flask-SQLAlchemy/">Flask-SQLAlchemy</a>
110
+
<p><ahref="http://www.sqlalchemy.org/">SQLAlchemy</a> is
111
+
currently the most respected Python ORM because it typically get the
112
+
abstraction level "just right" and seems to make complex database queries
113
+
easier to write than the Django ORM in most cases. SQLAlchemy is typically
0 commit comments