4 ms·
I have been thinking of writing an SQL tutorial specifically for folks who have only worked in ORMs. Do folks here have a favorite SQL tutorial that I should lo
by afarrell 11y ago
I have been thinking of writing an SQL tutorial specifically for folks who have only worked in ORMs. Do folks here have a favorite SQL tutorial that I should look at for stylistic inspiration?
- john2x 11y agoI'm spoiled by ORM's, but I have no problem using SQL to query the database. What I have trouble with though is creating tables using raw SQL and managing schema migrations. Even when using an ORM it seems kind of messy. I'd love a tutorial on how to properly maintain migrations without an ORM.
- eip 11y agohttp://www.liquibase.org/ http://www.liquibase.org/
- eximius 11y agoStanford has an online databases course that is a bit more thorough than you'd probably intend, but it is very excellent.
- marcus_holmes 11y agoThe things that no-one seems to know about from ORMs are: 1. Stored procedures. the idea that you treat your SQL like other code, and put it in sprocs, parameterise it, version it, etc. 2. Optimising tables and playing around with different normal forms and indexes to get the best results. Database design, basically. The 1:1 Object:Table mapping that ORMs use is not always optimal. 3. Indexing multiple fields that get queried together. If you commonly query on user name and state, then create an index for that. Maybe. If that table is read from more than it's written to. If read time optimisation is more important than write time optimisation. I haven't looked at a SQL tutorial recently, so I can't help with that, sorry