Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Fun with Django and Databases
Search
Andrew Godwin
July 19, 2010
Programming
0
75
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
Reconciling Everything
andrewgodwin
1
330
Django Through The Years
andrewgodwin
0
220
Writing Maintainable Software At Scale
andrewgodwin
0
460
A Newcomer's Guide To Airflow's Architecture
andrewgodwin
0
370
Async, Python, and the Future
andrewgodwin
2
680
How To Break Django: With Async
andrewgodwin
1
740
Taking Django's ORM Async
andrewgodwin
0
740
The Long Road To Asynchrony
andrewgodwin
0
680
The Scientist & The Engineer
andrewgodwin
1
780
Other Decks in Programming
See All in Programming
Devvox Belgium - Agentic AI Patterns
kdubois
1
100
uniqueパッケージの内部実装を支えるweak pointerの話
magavel
0
960
Things You Thought You Didn’t Need To Care About That Have a Big Impact On Your Job
hollycummins
0
210
CSC509 Lecture 01
javiergs
PRO
1
440
CSC509 Lecture 05
javiergs
PRO
0
300
そのpreloadは必要?見過ごされたpreloadが技術的負債として爆発した日
mugitti9
2
3.2k
CI_CD「健康診断」のススメ。現場でのボトルネック特定から、健康診断を通じた組織的な改善手法
teamlab
PRO
0
200
理論と実務のギャップを超える
eycjur
0
120
Web Components で実現する Hotwire とフロントエンドフレームワークの橋渡し / Bridging with Web Components
da1chi
3
2k
Domain-centric? Why Hexagonal, Onion, and Clean Architecture Are Answers to the Wrong Question
olivergierke
2
780
CSC305 Lecture 06
javiergs
PRO
0
210
Django Ninja による API 開発効率化とリプレースの実践
kashewnuts
0
1.2k
Featured
See All Featured
Producing Creativity
orderedlist
PRO
347
40k
Typedesign – Prime Four
hannesfritz
42
2.8k
Embracing the Ebb and Flow
colly
88
4.8k
What's in a price? How to price your products and services
michaelherold
246
12k
Visualization
eitanlees
148
16k
jQuery: Nuts, Bolts and Bling
dougneiner
64
7.9k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.2k
Practical Orchestrator
shlominoach
190
11k
The Cult of Friendly URLs
andyhume
79
6.6k
Six Lessons from altMBA
skipperchong
28
4k
The World Runs on Bad Software
bkeepers
PRO
71
11k
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