HN user

petalmind

494 karma

https://databasedesignbook.com/

Posts23
Comments74
View on HN
kb.databasedesignbook.com 3mo ago

5NF and Database Design

petalmind
203pts83
github.com 3mo ago

Rubysyn: Clarifying Ruby's Syntax and Semantics

petalmind
72pts16
kb.databasedesignbook.com 6mo ago

A modern guide to SQL JOINs

petalmind
2pts1
www.newyorker.com 8mo ago

Some people can't see mental images

petalmind
183pts368
americanaffairsjournal.org 11mo ago

Accounting for State Capacity

petalmind
2pts0
www.nasa.gov 11mo ago

NASA Systems Engineering Handbook (2018) [pdf]

petalmind
19pts1
bureau.rocks 2y ago

"Designing Transit Maps", an interactive book

petalmind
3pts0
peter.eisentraut.org 3y ago

SQL:2023 is finished: Here is what's new

petalmind
278pts153
arxiv.org 3y ago

Biological Systems as Evolved, Overloaded, Multi-Scale Machines

petalmind
2pts0
minimalmodeling.substack.com 3y ago

How to Grow as a Database Developer?

petalmind
3pts0
minimalmodeling.substack.com 4y ago

Organizational scalability and flexible database schemas

petalmind
2pts0
minimalmodeling.substack.com 4y ago

Handling Time with Supersecond Resolution

petalmind
3pts0
minimalmodeling.substack.com 5y ago

Making sense of 1NF, pt. II

petalmind
1pts0
github.com 5y ago

Iguvium extracts tables from PDF file in a structured form (2018)

petalmind
1pts0
breakingsmart.substack.com 5y ago

The Unreasonable Effectiveness of Small Optimizations (2016)

petalmind
1pts0
minimalmodeling.substack.com 5y ago

Two Hundred Forty Tables and No Documentation?

petalmind
6pts0
minimalmodeling.substack.com 5y ago

Left Joins, Pt. II

petalmind
5pts0
minimalmodeling.substack.com 5y ago

Many Faces of Left Join

petalmind
5pts0
maxkoehler.com 5y ago

Continuous Typography. Notes toward a continuous framework for screen typography

petalmind
60pts10
blog.koehntopp.info 5y ago

MySQL from Below

petalmind
2pts0
zverok.github.io 5y ago

Some things to know about Hunspell dictionaries format

petalmind
5pts0
minimalmodeling.substack.com 5y ago

Erasure in Database Modeling

petalmind
14pts0
minimalmodeling.substack.com 5y ago

Concatenability Principle in Software Engineering

petalmind
6pts0

I think I understand this "Cartesian product" reasoning behind 4NF/5NF, I just find it irrelevant I guess.

Cartesian product is explained in Kent: case (3) in https://www.bkent.net/Doc/simple5.htm#label4.1 ("A "cross-product" form, where for each employee, there must be a record for every possible pairing of one of his skills with one of his languages")

I do not explicitly mention this Cartesian product even tho it is present in both posts ("sports / languages" in 4NF, and "brands / flavours" in 5NF).

it demonstrates [one of] the precise problem[s] the normal form sets out to solve: a combinatorial explosion of rows.

I just don't understand this wording of "a combinatorial explosion of rows" — what's so dramatic here? I don't need four iterations of algebra-dense papers to explain this concept, I think it's pretty simple frankly.

And my implicit argument is, I guess, exactly that you could design tables that handle both problems without invoking 4NF and 5NF — people are doing that all the time.

I have so many questions about that. Should that normal form basically replace 5NF for the purposes of teaching?

Why do they hate us and do not provide any illustrative real-life example without using algebraic notation? Is it even possible?

I just want to see a CREATE TABLE statement, and some illustrative SELECT statements. The standard examples always give just the dataset, but dataset examples are often ambiguous.

(in its joins)

Do you understand what are "its" joins? What is even "it" here.

I'm super frustrated. This paper is 14 years old.

Imperative mood "normalize" assumes that you had something not-normalized before you received that instruction. It's not useful when your table design strategy is already normalization-preserving, such as the most basic textbook strategy (a table per anchor, a column per attribute or 1:N link, a 2-column table per M:N link).

And this is basically the main point of my critique of 4NF and 5NF. They both traditionally present an unexplained table that is supposed to be normalized. But it's not clear where does this original structure come from. Why are its own authors not aware about the (arguably, quite simple) concept of normalization?

It's like saying that to in order to implement an algorithm you have to remove bugs from its original implementation — where does this implementation come from?

The other side of this coin is that lots of real-world design have a lot of denormalized representations that are often reasonably-well engineered.

Because of that if you, as a novice, look at a typical production schema, and you have this "thou shalt normalize" instruction, you'll be confused.

This is my big teaching pet peeve.

Someone, somewhere writing down a list and that list being blessed with the imprimatur of Academic Approval (TM)

One problem is that normal forms are underspecified even by the academy.

E.g., Millist W. Vincent "A corrected 5NF definition for relational database design" (1997) (!) shows that the traditional definition of 5NF was deficient. 5NF was introduced in 1979 (I was one year old then).

2NF and 3NF should basically be merged into BCNF, if I understand correctly, and treated like a general case (as per Darwen).

Also, the numeric sequence is not very useful because there are at least four non-numeric forms (https://andreipall.github.io/sql/database-normalization/).

Also, personally I think that 6NF should be foundational, but that's a separate matter.

Do you know if Redex could be a tool that would be useful in my situation?

Claude suggests it, but I need to learn a lot of Redex to understand how to apply it.

I have a general understanding of what operational semantics is. Or maybe, are there any Redex implementations for common programming languages? \lambda_v is a bit too abstract.

on the 'reflection' level, where most languages have specific keywords that cannot be used 'first class' with the rest of the language.

In Ruby this is also the other way around, and it's one of my pet peeves.

`Kernel#callcc` looks like a method (arguably, of a special class), yet it's impossible to re-implement directly in the language, as far as I can tell.

Same with `raise`, I keep forgetting that it's not a keyword even.

Yeah, I was also going to say that conflating trivial syntax and "supremely easy to learn" is a very weak flex.

The first Smalltalk-80 book you randomly find is 560 pages.

Also, there is a weird bargaining with "but not block temporaries" and "not an instance variable". Why not? Half of the postcard is basically empty. Also, "except primitives" — how many primitives are there?

Lisp? Then I would use Lisp...

Lisp has completely different runtime semantics. Even the lexical scope in Ruby is extremely peculiar. One of the hard parts of writing this document was to remove the intuitive influence of Lisp because it just doesn't make sense for Ruby.

Question: but how many different numbers can you fit in 64 bits using your encoding (sorry I understand the general approach but I have no idea how that fast hierarchy works). I guess it's still 2^64 different numbers?

So basically you have a very low density of representable numbers (2^64 / w218), I wonder how quickly it grows as you use more and more 1-bits, and is there even a correlation between the bit pattern and the corresponding number value?

“What [schools are] bad at is teaching people to win in adversarial environments. And they're also bad at the meta-game of reminding someone that knowing the basic mechanics of some process does not make them an expert, but does make them a mark. Said differently: if you know which hands win in poker, thinking that this means you know how to play the game makes you a mark, not an expert.”

https://capitalgains.thediff.co/p/teachingfinance

“And it's hard for a teacher to end a class by telling students that they got an A+ in financial literacy and are now equipped to get ripped off in entirely new ways by an entirely different set of adversaries. But it's also impossible to create a repeatable standardized test that accurately simulates such an adversarial environment, because any time everyone gets the same correct answer, that answer would need to become wrong.”

Funny that Nicolas Cage comes up in this context. Here is a trivia snippet from https://www.imdb.com/title/tt23468450/trivia/:

During an interview, Osgood Perkins recalled a story from production where he learned Nicolas Cage has a particular skill that he says no other actor possesses: the ability to recognize how high or low he is able to speak without messing up the audio. According to Perkins: "The sound guy came over to me one day...(he) comes up to me a couple of days into Nic being on set and he's like 'Oz, I've never seen anything like it. When Nic is mic'd, I'm watching the dials, when Nic goes big, he goes right to the line. Anything more, a decibel or two over that, and it would be hard to use. Then he goes down, he goes soft and his whispering and he's barely talking, he goes right to the line. Anything past that line, you wouldn't be able to use it. He knows where the lines are. It's the craziest thing I've ever seen in my life'."

Maybe Cage can contribute to the sound design problem actually.

The fact that there are situations when implementing referential integrity is difficult does not mean you shouldn’t do it at all.

Referential integrity is specified at the logical level and does not dictate any particular implementation. OTOH violating 1NF makes it impossible to even specify RI constraints.

Now we're bargaining. If referential integrity does not dictate any particular implementation, then having an application-level RI and no database-level constrains should also be acceptable. Yet this is not a common FK enthusiasts position.

We just had a discussion of DSQL where a lot of people were saying things like "no FKs thus no real database". Well, I dunno.