Live data from Hacker News

Ask HN: Backend developers of HN, where and how often do you still use SQL?

news.ycombinator.com

11–20 of 20 posts

Re: Ask HN: Backend developers of HN, where and how often do you still use SQL?

#11
SQL makes things sooo much easier, those complex queries are... complex! for a reason, SQL does a lot of the heavy lifting that would take months to code from scratch. Not only that it offers speed, time tested reliability, and pretty much supported on all platforms.

Re: Ask HN: Backend developers of HN, where and how often do you still use SQL?

#12
SQLite is the backend where data goes to be sorted and analyzed and searched in a reasonable amount of time. I tried keeping everything in flat files and generating results with grep but for millions of records it was clear flat files and grep would be far too slow.

Re: Ask HN: Backend developers of HN, where and how often do you still use SQL?

#13
Everyday. Doing CRUD and ETL. My team uses gasp stored procedures for essentially everything. So, we end up writing raw queries and saving them to the DB to be called over and over. Using an ORM like Dapper helps make that map to runtime object easier.

I’ve used several ORMs for different languages. Dapper and stored procedures have become my favorite approach. Like anything, there are trade offs. You end up with logic hidden in the DB or sometimes need to update your procs after you alter a table. If you have a good pattern established for your tables, you can easily autogenerate CRUD procs for each table!

Re: Ask HN: Backend developers of HN, where and how often do you still use SQL?

#14
Our legacy systems use SQL and relational DBs. There's a big push to go to DynamoBD for everything new. We are copying old data into these new systems. It's a real mess trying to slot DB2 or Oracle data into multiple DynamoDBs, and in piecemeal fashion no less.

Re: Ask HN: Backend developers of HN, where and how often do you still use SQL?

#15
Not enough. As my current team is in love with NoSQL and refuse to learn anything related to SQL. But when dealing with legacy stuff, I get to do all SQL related work. Anything in SQL is faster to develop and execute than NoSQL. Only advantage of NoSQL is that you don't need to think about your data, just stuff everything in a json.

Re: Ask HN: Backend developers of HN, where and how often do you still use SQL?

#16
post #2

I work at a startup, we are 6 engineers, 2 of us are back-end engineers. I use PostgreSQL everyday. We tried using an ORM, and creating our own ORM, but it wasn't worth it for us. When you are dealing with medium-large databases, you're going to want to use indexes, to do custom queries with joins etc and it's just not worth it trying to use ORMs.

I've found Hibernate within Spring has been fairly easy to use and adapt. Pretty easy to just add @Query() to a method if you really need to drop into your own SQL. It also generates schemas and with something like Liquibase or Flyway, you can manage the migrations pretty easily as well.

Re: Ask HN: Backend developers of HN, where and how often do you still use SQL?

#17
We use Postgres so using SQL daily. We have a mixture of pure SQL and Honey SQL[0] in our code base and we utilize jsonb columns as well, which gives us a nosql feel while still using a traditional relational database.

[0] https://github.com/seancorfield/honeysql

Re: Ask HN: Backend developers of HN, where and how often do you still use SQL?

#18
use it almost daily. * debugging * seeing how tables are defined * seeing what enums are defined in the db * seeing what the composite keys of the table are * testing if my failure is because of missing data or because the data doesn't match table spec, etc...

it's an exceptionally good language for querying data. One of my favorite languages ever. focused, easy to understand (except the really complex stuff but that applies to all languages).

Re: Ask HN: Backend developers of HN, where and how often do you still use SQL?

#19
I use it a lot because I'm too lazy to learn new code syntax every time I work with new a framework or language. SQL stays the same so it's more transferable. Besides, once you become an advanced SQL user, you find queries that are harder to build using code instead of SQL. It happened to me a lot when writing Apache Spark code.

Re: Ask HN: Backend developers of HN, where and how often do you still use SQL?

#20
post #2

I work at a startup, we are 6 engineers, 2 of us are back-end engineers. I use PostgreSQL everyday. We tried using an ORM, and creating our own ORM, but it wasn't worth it for us. When you are dealing with medium-large databases, you're going to want to use indexes, to do custom queries with joins etc and it's just not worth it trying to use ORMs.

Do you have a decent GUI client you use? It’s always something I’ve found a complete hassle when working with Postgres over MySQL. I usually use SequelPro on Mac and Heidi on my Windows machine.
Post reply on HN