Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up for free
Fun with Django and Databases
Andrew Godwin
July 19, 2010
Programming
0
40
Fun with Django and Databases
A talk I gave at EuroPython 2010
Andrew Godwin
July 19, 2010
Tweet
Share
More Decks by Andrew Godwin
See All by Andrew Godwin
A Newcomer's Guide To Airflow's Architecture
andrewgodwin
0
98
Async, Python, and the Future
andrewgodwin
1
370
How To Break Django: With Async
andrewgodwin
1
310
Taking Django's ORM Async
andrewgodwin
0
340
The Long Road To Asynchrony
andrewgodwin
0
380
The Scientist & The Engineer
andrewgodwin
1
380
Pioneering Real-Time
andrewgodwin
0
150
Just Add Await: Retrofitting Async Into Django
andrewgodwin
2
1.1k
Terrain, Art, Python and LiDAR
andrewgodwin
1
240
Other Decks in Programming
See All in Programming
Terraform Plan/Apply結果の自動通知
ymmy02
0
280
How we run a Realtime Puzzle Fighting Game on AWS Serverless
falken
0
250
Beyond Micro Frontends: Frontend Moduliths for the Enterprise @enterjs2022
manfredsteyer
PRO
0
140
GitHubのユーザー名を変更した後のあれこれ
tahia910
0
120
はてなフォトライフをECSに移行した話 / Hatena Engineer Seminar #20
cohalz
1
820
git on intellij
hiroto_kitamura
0
170
engineer
spacemarket
0
810
Maintaining Software Correctness
dlew
PRO
3
250
JetPackComposeは宣言型プログラミングパラダイムって実はよくわかってないんですが、別に使ってもいいんですよね、
conigashima
0
180
パターンマッチングを学んで新しいJavaの世界へ!Java 18までの目玉機能をおさらいしよう / Java 18 pattern matching
ihcomega56
3
390
GoogleI/O2022 LT報告会資料
shinsukefujita1126
0
310
Improving Developer Experience Through Tools and Techniques 2022
krzysztofzablocki
0
490
Featured
See All Featured
What's in a price? How to price your products and services
michaelherold
229
9.4k
Web Components: a chance to create the future
zenorocha
303
40k
Why You Should Never Use an ORM
jnunemaker
PRO
47
7.6k
Code Reviewing Like a Champion
maltzj
506
37k
Git: the NoSQL Database
bkeepers
PRO
415
59k
Gamification - CAS2011
davidbonilla
75
3.9k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
7
1.1k
Adopting Sorbet at Scale
ufuk
63
7.6k
The MySQL Ecosystem @ GitHub 2015
samlambert
238
11k
Optimizing for Happiness
mojombo
365
63k
Rails Girls Zürich Keynote
gr2m
86
12k
What the flash - Photography Introduction
edds
62
10k
Transcript
Django and Databases Fun with
""Andrew speaks English like a machine gun speaks bullets."" Reinout
van Rees
Introduction
from django.db import models
First, an aside
""When all you have is a hammer, everything looks like
a nail"" Abraham Manslow (paraphrased)
Also, "NoSQL"? Really?
queryset.raw()
qs = Teacher.objects.raw(""" SELECT t.name, COUNT(s.id) FROM school_teacher AS t
INNER JOIN school_student AS s ON t.id = s.teacher_id GROUP BY t.name HAVING COUNT(s.id) > 2 """)
queryset.aggregate()
qs = Teacher.objects.annotate( num_students = models.Count('student') ).filter(num_students__gt=2)
Search haystack __search=
Schema Changes
Changing Requirements
Dynamic/Unknown Data
Document Databases MongoDB CouchDB
Key-Value Stores Redis Cassandra
Redis Sets Sorted Sets Hashes Pub/Sub Atomicity
Message Queues AMQP Celery
Various Others Graph databases Filesystems VCSs
Conclusion
Thanks. Andrew Godwin @andrewgodwin http://aeracode.org