4 ms·
Many DBs weren't built to be exposed on the open web. The web didn't even exist at the time some popular databases were invented, and even after the fact, it's
by daliwali 10y ago
Many DBs weren't built to be exposed on the open web. The web didn't even exist at the time some popular databases were invented, and even after the fact, it's still not the purpose.
I would even argue that DBs have overstepped their bounds already with what programming abilities some have built-in. They should be focused on reading and writing structured data efficiently and correctly, not much more than that. Which database to use should depend on access patterns and structural requirements. Let the application logic be handled at a higher layer instead of mixing responsibilities everywhere.
- geon 10y ago> DBs have overstepped their bounds And they have a stringly typed interface! It sucks! When both the languages inside and outside the database are typed, why should the interface between them not be? It is just unfathomably bad.
- majewsky 10y agoUh, what? How is this stringly-typed: https://www.postgresql.org/docs/9.4/static/datatype.html https://www.postgresql.org/docs/9.4/static/datatype.html ? Postgres's type system is actually more sophisticated than any programming language that I know. The problem is that ORM developers are much more serious about interoperability than can be reasonably argued, so you cannot rely on much more than VARCHAR, INTEGER and maybe BOOLEAN.
- dpark 10y agoQuery input to SQL is literally a string. Output is also a string. Thus "stringly typed" interface. Yes, DB storage is strongly typed, but the interface is not. I'm not sure how much an issue this really is, but it's what the GP is talking about.
- majewsky 10y agoSo? Data in computers is all 0s an 1s, but you don't see anyone complaining about bitly-typed languages. Strong typing refers to the presence of type context wherever a value is used, not to the wire protocol.
- geon 10y agoThe data you get out of the database will be untyped. When the language in the database is typed (SQL) and the language outside is typed too (c#, typescript, etc), it would be nice to keep that type information. An ORM doesn't count since it is just a bad attemot to work around the inherent problems with SQL as an interface.
- anarazel 10y ago> The data you get out of the database will be untyped. Uh, no. Nearly all database access protocols maintain type information for the resultsets returned to the client. That's definitely the case for postgres (cf. RowDescription in https://www.postgresql.org/docs/devel/static/protocol-message-formats.html https://www.postgresql.org/docs/devel/static/protocol-messag... , accessible to the provided client library via PQftype,cf. https://www.postgresql.org/docs/devel/static/libpq-exec.html#libpq-exec-select-info https://www.postgresql.org/docs/devel/static/libpq-exec.html... ) There's plenty cases to be made against RDBMs. No need to invent more.
- dragonwriter 10y ago> Many DBs weren't built to be exposed on the open web. Most RDBMSs were built to be exposed on untrusted networks, and their built-in security has explicit mechanisms to address this.