they achieve quite good performance for the level of abstraction for which you typically use themįinally, SQL is very portable.they come with an expressive, yet relatively flexible static type system.they provide an interactive programming environment.Modern SQL engines such as PostgreSQL also offer several practical benefits: the fact that the data is centralized and at hand eliminates many difficult concerns associated with moving data (encoding and packaging the data, validation, distributed systems issues etc.).relations being more powerful data abstractions than the ones available in general-purpose languages (arrays, structs, maps, lists, objects etc.).More concretely, I believe the advantages of SQL come from: It's a shame, because SQL is actually very expressive! When applied to business logic, SQL can make for programs that are not only more concise and readable, but also more declarative (that is, programs that express only their intent, not how to achieve it) which is a very effective way of eliminating accidental complexity from your code. Why SQL?Ī lot of programmers think of SQL merely as a protocol for interacting with data storage, and prefer to express domain logic in a general-purpose language (JavaScript, Ruby, C#. I ended up expressing much more of the business logic than I thought using pure SQL - more precisely, temporary SQL Views - so I thought I'd share my findings here. Because the problem was inherently very relational, I was naturally led to use an SQL database in the project (in this case PostgreSQL). I recently worked on a project which consisted of merging related data exports from a variety of sources and extracting accounting information from them. What's missing: 'parameterized' temporary views.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |