I found this schema of block. I wonder how to make relationship betweeen hash and parent_hash.
In my head, it whould be like this(Postgres).
CREATE TABLE block (
hash VARCHAR(8) PRIMARY KEY,
parent_hash VARCHAR(8) NOT NULL,
FOREIGN KEY (parent_hash) REFERENCES block (hash),
);
Is there no self-reference constraint?