<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>David Cramer's Blog - Latest Comments in Cleaning up with JSON and SQL in Django</title><link>http://davidcramer.disqus.com/</link><description></description><atom:link href="https://davidcramer.disqus.com/thread_01/latest.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Sun, 03 Oct 2010 10:45:29 -0000</lastBuildDate><item><title>Re: Cleaning up with JSON and SQL in Django</title><link>http://cramer.io//448/cleaning-up-with-json-and-sql.html#comment-83466216</link><description>&lt;p&gt;David, you rock!  Thanks for sharing this.  Comparing the JSONField implementation with:  &lt;a href="http://www.davidcramer.net/code/181/custom-fields-in-django.html" rel="nofollow noopener" target="_blank" title="http://www.davidcramer.net/code/181/custom-fields-in-django.html"&gt;http://www.davidcramer.net/...&lt;/a&gt;  I added an if value is None: return statement to the to_python() method (as my code was throwing exceptions for None values)  Take it easy...&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Hal</dc:creator><pubDate>Sun, 03 Oct 2010 10:45:29 -0000</pubDate></item><item><title>Re: Cleaning up with JSON and SQL in Django</title><link>http://cramer.io//448/cleaning-up-with-json-and-sql.html#comment-50153910</link><description>&lt;p&gt;@ashwoods The only downside to things like couchdb is (last I looked) they haven't been proven. I'd love to use a non-relational database but there's really no great solution out there yet.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">David Cramer</dc:creator><pubDate>Wed, 22 Apr 2009 15:06:27 -0000</pubDate></item><item><title>Re: Cleaning up with JSON and SQL in Django</title><link>http://cramer.io//448/cleaning-up-with-json-and-sql.html#comment-50153907</link><description>&lt;p&gt;Peter, Yes, siteconfig app is great and very useful :)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">igorekk</dc:creator><pubDate>Thu, 16 Apr 2009 04:05:30 -0000</pubDate></item><item><title>Re: Cleaning up with JSON and SQL in Django</title><link>http://cramer.io//448/cleaning-up-with-json-and-sql.html#comment-50153905</link><description>&lt;p&gt;The djblets projects has a similar field called JSONField. It is also used in their siteconfig app (which works great for my needs).&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Peter Sanchez</dc:creator><pubDate>Wed, 15 Apr 2009 16:12:19 -0000</pubDate></item><item><title>Re: Cleaning up with JSON and SQL in Django</title><link>http://cramer.io//448/cleaning-up-with-json-and-sql.html#comment-50153903</link><description>&lt;p&gt;A good use case for JSON fields are user preferences in my opinion.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Henning</dc:creator><pubDate>Wed, 15 Apr 2009 15:15:00 -0000</pubDate></item><item><title>Re: Cleaning up with JSON and SQL in Django</title><link>http://cramer.io//448/cleaning-up-with-json-and-sql.html#comment-50153901</link><description>&lt;p&gt;Yep I can give you two great examples:&lt;/p&gt;&lt;p&gt;1) Lifestream&lt;/p&gt;&lt;p&gt;We store custom data based on each extension, in one table. The extension then decides how to handle this data. It's a smart denormalization.&lt;/p&gt;&lt;p&gt;2) iBegin&lt;/p&gt;&lt;p&gt;We have way too many rows and an alter requires downtime. This metadata doesn't change often, but it's just that, metadata. If we need to build indexes on it we can do that in another fashion.&lt;/p&gt;&lt;p&gt;It's much more efficient using it out of a JSONField rather than doing more SQL queries for a set of key/value pairs.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">David Cramer</dc:creator><pubDate>Wed, 15 Apr 2009 13:34:55 -0000</pubDate></item><item><title>Re: Cleaning up with JSON and SQL in Django</title><link>http://cramer.io//448/cleaning-up-with-json-and-sql.html#comment-50153899</link><description>&lt;p&gt;I can attest that in the real world frequently there are requests for '1 more field' or frequently unused data types that may only exist on a few objects.&lt;/p&gt;&lt;p&gt;Traditional database design doesn't fit well in many scenarios.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">sharms</dc:creator><pubDate>Wed, 15 Apr 2009 13:25:19 -0000</pubDate></item><item><title>Re: Cleaning up with JSON and SQL in Django</title><link>http://cramer.io//448/cleaning-up-with-json-and-sql.html#comment-50153898</link><description>&lt;p&gt;@Andy Baker&lt;/p&gt;&lt;p&gt;Because it is a ridiculously large dataset. The schema doesn't keep changing, just different records store a little bit of extra custom data.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Andrew McCloud</dc:creator><pubDate>Wed, 15 Apr 2009 09:53:23 -0000</pubDate></item><item><title>Re: Cleaning up with JSON and SQL in Django</title><link>http://cramer.io//448/cleaning-up-with-json-and-sql.html#comment-50153896</link><description>&lt;p&gt;I'm having a trouble imagining a use-case here.&lt;/p&gt;&lt;p&gt;If your schema does change that often how about a table for key/value pairs or something like that?&lt;/p&gt;&lt;p&gt;Why does your schema keep changing? Is there a better way to model the data that might avoid the problem?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Andy Baker</dc:creator><pubDate>Wed, 15 Apr 2009 07:52:12 -0000</pubDate></item></channel></rss>