What can SQL do for you?

What can SQL do for you? Chris shares his thoughts on the changelog on how to take full advantage of relational databases:

Where is the place that I can look and see a coherent overview of the parts of my system? In conventional Rails, I think we don’t have a good answer to that. When doing things “by the book,” the notion of “my application” is a diffuse and miasmatic thing. It is often spread among dozens of files. The primary structuring mechanic seems to be accretion rather than declaration, and we’re left without a clear place that we can point to and say “that’s the application.”

… I should learn to lean heavily on database constraints. What could be DRYer than sticking to business logic in your application and using the database to handle boring data integrity problems? More generally, I’m learning to look for what I call declarative layers in applications.

Category: Development