How to learn database?
Many people learn databases by learning sql.
I recommend people learn DBs by doing a class like this and understanding b-trees.
Nearly Everything about the strengths & weaknesses of RDBMS is understood through knowing btrees and how they affect key insertion, lookup & ordering.
Most people try to speed up a DB by adding indexes — but when you realize you’re just adding one tree on top of another you’re just masking the problem.
Some problems are well suited toward b-trees, and many aren’t.
SQL is just a query interface to a remote b-tree system.
Also in the modern day, it’s valuable to learn common strategies behind column-oriented databases such as late tuple materialization, deferred execution, linear scans vs. binary search, instruction pipelining.
Once you’re familiar with all this, you’d find sometimes in the field what you really need is a simple flat file or an embeddable database like RocksDB, not a DBMS.