News for hackers. Stuff that matters.
Re:Waiting for PostgreSQL 14 – SEARCH and CYCLE clauses by halostatue on Thursday February 04, 2021 @09:41AM (#26025669)
My standard line for decades has been that the database is more important from the program. You can reconstruct how the program works from the database; you can’t reconstruct the database from how the program works.

A business might be interrupted if their programs accessing the database break. A business will _die_ if their database is lost.

Re:Waiting for PostgreSQL 14 – SEARCH and CYCLE clauses by pmontra on Thursday February 04, 2021 @10:58AM (#26026481)
I'm currently staring at a PostgreSQL database created by a Django app with a lot of inheritance between models.

My favorite /s is the table with a single column containing the id of the record itself.

It's basically impossible to start from the database and understand what's going on. It will be a huge pain to interface to this database from something else.

On the other side, I'm maintaining another Django app for the same customer, with saner tables (no inheritance) and that's on par with other ORMs.

My take is never use inheritance with Django.

Re:Waiting for PostgreSQL 14 – SEARCH and CYCLE clauses by touisteur on Thursday February 04, 2021 @11:13AM (#26026667)
Never use inheritance at all? I was thinking you could reconstruct part of the app stack by observing and clustering the requests and transactions. But then some people think join is the devil and you'd be back to square one. In a perfect world every app would have only views over what they need and prepared requests. But then CI/CD and all kind of tests can become very painful...
Re:Waiting for PostgreSQL 14 – SEARCH and CYCLE clauses by eyelidlessness on Thursday February 04, 2021 @10:10PM (#26032620)
Django is just plain bad at data modeling there I said it
Re:Waiting for PostgreSQL 14 – SEARCH and CYCLE clauses by ttz on Thursday February 04, 2021 @11:16PM (#26033045)
I don't know you, but I think we'd be great friends based solely on this statement.
Re:Waiting for PostgreSQL 14 – SEARCH and CYCLE clauses by eyelidlessness on Friday February 05, 2021 @12:52AM (#26033547)
I don’t make friends as easily as hating on any technology but I do make friends easily on kindness. Hi! I learned a lot great and not great working with DRF. Kind of took it and ran with it on TypeScript and Node. Working on a much better HTTP interface for that platform.
Re:Waiting for PostgreSQL 14 – SEARCH and CYCLE clauses by mattbuilds on Thursday February 04, 2021 @10:09AM (#26025924)
Reminds me of the Fred Brooks quote, "Show me your flowchart and conceal your tables, and I shall continue to be mystified. Show me your tables, and I won't usually need your flowchart; it'll be obvious."

It always starts with the data.