Tech News
← Back to articles

Oldest recorded transaction

read original related products more articles

Oldest recorded transaction

The other day I posted a tweet with this image which I thought was funny:

This is the oldest transaction database from 3100 BC - recording accounts of malt and barley groats. Considering this thing survived 5000 years (holy shit!) with zero downtime and has stronger durability guarantees than most databases today.

I call it rock solid durability.

This got me thinking, can I insert this date in today’s database? What is the oldest timestamp a database can support?

So I checked the top three databases: MySQL, Postgres, and SQLite:

MySQL 1000 AD Postgres 4713 BC SQLite 4713 BC

Too bad you cannot use MySQL for this. Postgres and SQLite support the Julian calendar and the lowest date is Jan 01, 4713 BC:

sales =# INSERT INTO orders VALUES ( '4713-01-01 BC' ::date); INSERT 0 1 sales =# SELECT * FROM orders; timestamp --------------- 4713 - 01 - 01 BC ( 1 row ) sales =# INSERT INTO orders VALUES ( '4714-01-01 BC' ::date); ERROR: date out of range: "4714-01-01 BC"

... continue reading