HNHacker News
TopNewBestAskShowJobs

b-man

3,908 karma · joined June 14, 2009

Believer in individual freedom and debugging.

ebellani -at- gmail -dot- com

http://github.com/ebellani/

submissionscomments
b-man··on The principles of database design, or, the Truth is out there
Thanks, I didn't knew that. Can you link to one such text?
b-man··on The principles of database design, or, the Truth is out there
Lots of peole got hung up on the example, which I thought would be be helpful on the discussion, but certainly should not replace the main point, which is:

Relations, attributes and tuples are logical. A PK is a combination of one or more attributes representing a name that uniquely identifies tuples and, thus, is logical too[2], while performance is determined exclusively at the physical level, by implementation.

So generating SKs for performance reasons (see, for example, Natural versus Surrogate Keys: Performance and Usability, Performance of Surrogate Key vs Composite Keys) is logical-physical confusion (LPC)[3]. Performance can be considered in PK choice only when there is no logical reason for choosing one key over another.

https://www.dbdebunk.com/2018/04/a-new-understanding-of-keys...

b-man··on The principles of database design, or, the Truth is out there
Depends on the universe of discourse adopted.
b-man··on The principles of database design, or, the Truth is out there
> I still wouldn't use that as a primary key on the citizen table, though.

Why not?

b-man··on The principles of database design, or, the Truth is out there
> Trying to tamp out these ambiguities adds an unbounded number of data model epicycles that add a lot of complexity and performance loss

If you can talk about a business rule, you have a predicate. If you have a predicate, you can make it 5 or 6 normal form, since all that means is that your relation expresses only and completely the predicate.

It seems that your definition of normalization is not the one that I am using above. What is it?

b-man··on The principles of database design, or, the Truth is out there
> Memory, and CPU, and even storage eventually, those would be the main practical examples of where having a key that's composed of something very small saves you space and thus, time.

> Say we want to use a bigint key vs a VARCHAR(30)? depending on your big key you might be talking about terabytes of additional data, just to store a key (1t rows @ bigint = 8TB, 1T rows at 30 chars? 30TB...). The data also is going to constantly shuffle (random inserts).

>> Joins, lookups, indexes

I don't see how what you brought up has anything to do with these.

But the main point is being missed here because of a physical vs logical conflation anyhow.

b-man··on The principles of database design, or, the Truth is out there
> Errors in the initial design should be assumed as the default. Wise software engineering should make change easy.

I don't think I said that errors would not happen.

b-man··on The principles of database design, or, the Truth is out there
> but are those really the only places the ID is used?

I'm curious, where else would they be used?

b-man··on The principles of database design, or, the Truth is out there
- Joins, lookups, indexes. Here data type can matter regarding performance and resource use.

I struggle to see a practical example.

> - Idempotency. Allowing a client to generate IDs can be a big help here (ie UUIDs)

Natural keys solves this

> - Sharing. You may want to share a URL to something that requires the key, but not expose domain data (a URL to a user’s profile image shouldn’t expose their national ID).

The you have another piece of data, which you relate to the natural key. Something like `exposed-name`.

> There is not one solution that handles all of these well

Natural keys solve these issues.

> Also, we all know that stakeholders will absolutely swear that there will never be two people with the same national ID. Oh, except unless someone died, then we may reuse their ID. Oh, and sometimes this remote territory has duplicate IDs with the mainland. Oh, and for people born during that revolution 50 years ago, we just kinda had to make stuff up for them.

If this happens, the designer had a error in his design, and should extend the design to accommodate the facts that escaped him at design time.

> Actually, the article is proposing a new principle

I'm putting it in words, but such knowledge has been common in the database community for ages, afaict.

b-man··on The Long, Painful History of Time (1999)
Anything you would recommend instead?
b-man··on The Long, Painful History of Time (1999)
why?
b-man··on Ask HN: Who wants to be hired? (November 2024)

  Location: EST
  Remote: Yes
  Willing to relocate: Yes
  Technologies: F#, C#, C, PostgreSQL, Java, Clojure, Common Lisp, Scheme, Emacs Lisp, SQL, Python, Ruby, JS, AWS, Linux
  Résumé/CV: https://www.linkedin.com/in/eduardo-bellani/
  Email: ebellani -@- gmail.com
b-man··on How to unlock motivation for high performance in your team
anything in particular?
b-man··on Ask HN: Who wants to be hired? (October 2024)

  Location: EST
  Remote: Yes
  Willing to relocate: Yes
  Technologies: F#, C#, C, PostgreSQL, Java, Clojure, Common Lisp, Scheme, Emacs Lisp, SQL, Python, Ruby, JS, AWS, Linux
  Résumé/CV: https://www.linkedin.com/in/eduardo-bellani/
  Email: ebellani -@- gmail.com
b-man··on Ask HN: Who wants to be hired? (September 2024)

  Location: EST
  Remote: Yes
  Willing to relocate: Yes
  Technologies: F#, C#, C, PostgreSQL, Java, Clojure, Common Lisp, Scheme, Emacs Lisp, SQL, Python, Ruby, JS, AWS, Linux
  Résumé/CV: https://www.linkedin.com/in/eduardo-bellani/
  Email: ebellani -@- gmail.com
b-man··on Soft Deletes with Ecto and PostgreSQL
It is better, as others have written, because it preserves integrity constraints.
b-man··on Soft Deletes with Ecto and PostgreSQL
Temporal tables are an implementation of one of SQL 2011's main features: system time.

https://sigmodrecord.org/publications/sigmodRecord/1209/pdfs...

Postgres itself has not yet added such to the core, since it moves about as fast as an elephant. There are extensions that do implement it (https://wiki.postgresql.org/wiki/Temporal_Extensions).

b-man··on Soft Deletes with Ecto and PostgreSQL
Just use temporal tables. It would cover all the cases you brought up.
b-man··on Soft Deletes with Ecto and PostgreSQL
This is a rehash of all the things explained in the paper http://www.bailis.org/papers/feral-sigmod2015.pdf

TLDR: Not a good idea.

b-man··on Are you considering Event Sourcing? Think again
There were several great ideas at parc, indeed. I think the most powerful one goes unnoticed by most, which is how it was managed by Bob Taylor.
b-man··on Are you considering Event Sourcing? Think again
I get the relational bit. But can you expand on the Smalltalk one?
b-man··on CrowdStrike's outage should not have happened
I did provide an alternative. Formally verify their software, making implausible for such error to occur. I have linked to a peer reviewed article that goes in-depth about such.
b-man··on CrowdStrike's outage should not have happened
> While such techniques are available, would they be really applicable in a very dynamic environment such as with millions of PCs running various windows versions, needing continuous / real-time updates.

I don't see much difference in complexity between the affected software and the several existing formally verified software. At the very least the parser/interpreter could very much be formally verified.

But my point is, have they tried? They don't seem to be even aware of such.

b-man··on CrowdStrike's outage should not have happened
I have proposed a solution, and linked to a peer reviewed paper that goes in depth about it. What else can I do?
b-man··on Call for papers for PGConf Brazil 2024
Today is the last day!
b-man··on Ask HN: Who wants to be hired? (August 2024)

  Location: EST
  Remote: Yes
  Willing to relocate: Yes
  Technologies: F#, PostgreSQL, Clojure, Common Lisp, SQL, Python, Ruby, JS
  Résumé/CV: https://www.linkedin.com/in/eduardo-bellani/
  Email: ebellani -@- gmail.com
b-man··on Ask HN: Who wants to be hired? (November 2022)
- Location :: South America/Brazil (UTC-3) - Remote :: Yes

- Willing to relocate :: Yes

- Technologies :: Clojure, Python, Ruby, Java, Dart, Common Lisp, Scheme, Ocaml, F#, Haskell, Rust, C#, C, C++, Docker, Kubernetes, SQL (Postgres, etc), Linux, Nix, QubesOS

- Résumé/CV :: https://www.linkedin.com/in/eduardo-bellani

- Email :: ebellani@gmail.com

I can help you by:

- Architecting immutable architectures,

- to recruit, train, motivate and lead high performing people,

- program, deploy and maintain code in imperative and functional programming languages (Lisp flavors, ML, C like languages, etc).

I have been involved in the world of technology startups for more than 15 years. As developer, manager, entrepreneur, director. Mostly with functional programming and research oriented projects/companies

b-man··on Ask HN: Who wants to be hired? (October 2022)
- Location :: South America/Brazil (UTC-3)

- Remote :: Yes

- Willing to relocate :: Yes

- Technologies :: Clojure, Python, Ruby, Java, Dart, Common Lisp, Scheme, Ocaml, F#, Haskell, Rust, C#, C, C++, Docker, Kubernetes, SQL (Postgres, etc), Linux, Nix, QubesOS

- Résumé/CV :: https://www.linkedin.com/in/eduardo-bellani

- Email :: ebellani@gmail.com

I can help you by:

- Architecting immutable architectures,

- to recruit, train, motivate and lead high performing people,

- program, deploy and maintain code in imperative and functional programming languages (Lisp flavors, ML, C like languages, etc).

I have been involved in the world of technology startups for more than 15 years. As developer, manager, entrepreneur, director. Mostly with functional programming and research oriented projects/companies.

b-man··on Practice Routines for a Winning Software Team
my point was, why should we invest in trying to produce elite programmers?
b-man··on Practice Routines for a Winning Software Team
Why should we?
← PreviousPage 2 of 6Next →