3 ms·
Do you use a ORM? What kind of boilerplate? --- RDBMS have a less-than-ideal programming API, and also is de-coupled from the front-end (good) but also mean
by mamcx 10y ago
Do you use a ORM?
What kind of boilerplate?
---
RDBMS have a less-than-ideal programming API, and also is de-coupled from the front-end (good) but also mean it requiere to re-implement some stuff in the client (because is a agnostic api). ORMs make this task harder than it must.
--
For testing/debugging not help that a Database is a huge mutable store, and thigh testing was not a thing before.
But more of this is a trouble with the disconnect between the database guys and the app guys.
For example, Firebird (http://firebirdsql.org/ http://firebirdsql.org/) allow to embed the database similar to sqlite and also use it in a separate server process. It mean is easy to create a test environment easily without docker-alike craziness.
Another disconnect is that is impossible to avoid sql. SQL is a poor developer API and is not decoupled so we can use something else.
The advantage of some NoSql is that them not recreate SQL (at first) so them can do some nice stuff as post a JSON and call some basic commands.
- RBerenguel 10y agoWe use it for analytics/data related analysis, so we use straight (or templated) SQL queries. The queries are a bit too thick for using an ORM. The boilerplate is a set of helpers to make sure what the SQL's intention is, is actually fulfilled without problems (lots of sanity checks to make sure the queries are correct before running, column stability, etc). Basically to ensure anything depending on the output still can trust it after the changes.
- mamcx 10y agoSo, basically a kind of static type system? Anyway, reporting is a very hard problem. I don't know if exist a truly good way to solve it in a general case. --- Is part of this not solve with views? Any example to showcase the trouble?
- RBerenguel 10y agoDon't have examples (that I can show). It's trying to be a static check (more than type, but it's close enough) system, indeed. With views, we can isolate the used data, as long as we don't modify too much the underlying structure. Also, the biggest chunks of SQL we handle are essentially "computational": take this, join with that, mangle a lot what we have now, repeat several times and get an output we can use. Can't avoid the big part in the middle
- vog 10y agoNote that the well-designed ORMs have a good query builder that can be used on its own. For example, I've heard many people use Python's SQLAlchemy just to have a more sane SQL syntax. (See also my other comment: https://news.ycombinator.com/item?id=13929111 https://news.ycombinator.com/item?id=13929111 )