r/databasedevelopment • • 19d ago

Is it worth learning more about database internals right now? (9 months in it)

For the past 9 months, I have been learning about databases purely about them. I started off focusing on database administration concept, then switched over to database internals. I began by understanding how hard disks and RAM actually work, and since then I tried to built my own page manager, buffer pool manager, and heap manager.

I want to keep learning, so I would love to get some answers on a few things from indrustry experts:

- Is it worth learning database internals right now, especially in today's AI era?

- Are there actual jobs for this kind of role?

- What is the typical salary range for remote jobs in this niche?

- What should I focus on learning next to get really good at this?

Thanks in advance for any advice!

22 Upvotes

12 comments sorted by

12

u/warehouse_goes_vroom 19d ago

- Is it worth learning database internals right now, especially in today's AI era?

I certainly think so. AI still needs data. Databases remain highly relevant.

- Are there actual jobs for this kind of role?

Yup. Definitely are many companies that pay people to work on database internals. It's a niche, but if you find it interesting, there are jobs in that niche. Like many niches.

- What is the typical salary range for remote jobs in this niche?

It depends on experience, company, et cetera. Probably best to look at companies hiring to get a better sense of that.

- What should I focus on learning next to get really good at this?

Depends on what parts of databases interest you and what you already know. A cascades or volcano style query optimizer might be a fun project. You should ideally be quite comfortable with at least one compiled language (e.g. Rust, C++, C).

2

u/diagraphic 19d ago

First time hearing an optimizer is a fun project. I say this as it's one of the hardest part of a writing a relational database and that's just one part of thousands within these sorts of systems which always evolve. Read literature, understand, and build op.

5

u/warehouse_goes_vroom 19d ago

shrug one of these days I'll get around to doing it for fun. I'm a big nerd, what can I say, I find pretty much all things database development fun and interesting.

6

u/diagraphic 19d ago

Database and storage is my passion I work on these systems all day, almost everyday it doesn’t mean it’s always fun. I enjoy it, sometimes love it, sometimes I’m really stuck, but never hate it, the ah-ha moments are great but yeah. Not every part is fun. That’s my point. Constant fun wouldn’t be best. Challenges is where innovation and creativity to solve a problem sprawl out.

2

u/warehouse_goes_vroom 18d ago

Fair. But depends on how you define fun: https://www.rei.com/blog/climb/fun-scale

There's fun while you're doing it, and fun to look back on.

2

u/Fabulous-Meaning-966 16d ago

Or as scouting leaders used to say, "You don't have to be having fun to be having fun!"

3

u/krenoten 19d ago

The hard stuff is the fun stuff for people like us.

17

u/krenoten 19d ago edited 19d ago • Bravo

Sorry for this long response but this is a great question that has occupied a lot of my thinking over the last few years when things have been climbing the abstraction ladder. I work at a large database company, using AI heavily just like everyone else to a greater and greater extent as we learn how to safely scale its usage. It's a disorienting time for everyone, but the people who know how to specify what they want are able to crank out a lot more and at a comparable or even higher quality level, since now it's basically free (modulo tokens) to leverage formal methods that only a few of us would have been using beforehand and only in a few niche areas.

Engineering is fundamentally about making sure machines have a desired impact on the world outside of themselves. AI is just another machine in the process. Databases are more valuable than ever. AI helps us make them better. I was a formal methods junky before all of this, usually screaming into the wind, but now everyone around me is finally meeting what I had considered the basic bar for high quality in their everyday work much more often.

The other day I needed to make an O(1) forkable KV that would layer on top of another storage system, and I could just specify a few of the properties around prioritized access patterns, underlying data structure choices, read amplification, write amplification, space amplification, cache amplification, compaction costs and corresponding deterministic tripwire tests, property tests, fault injection, simulation, start with a TLA+ model then move to implementation etc... It took me a few minutes to rattle off the spec that I wanted and then some tokens later I had a thing that I would have felt extremely proud of a few years ago and probably given a conference talk about, and today it's just easy to get.

I asked for these things explicitly based on my experience with building and productionizing large databases, and a few months ago claude would have produced something with a much lower quality bar that I would have had to build smaller pieces of at a time, but this time it really came together as hoped with minimal effort. Claude would have still made a much crappier thing if I didn't give precise specifications around what the machine needed to do overall, how assurances should be tested in layers, how to keep different concerns separate, this is all stuff I knew about from learning and building.

I'm not sure how much of this will just be done automatically when people ask "I want an O(1) forkable KV" in the future.

As an engineer, the abstraction level that we work at is increasing very quickly. This is what feels disorienting to me - I don't know what abstraction level I'll be working at in 6 months.

But the best systems will continue to be be built by people who can work at multiple abstraction levels and understand when things are suboptimal relatively low level in the stack. This has always been true in DB eng. We sometimes need to write lock free algorithms, kernel code, assembler, all kinds of exotic stuff.

One of the questions that all of the engineering leaders are asking right now is how do we know that our junior engineers are actually learning. AI hides skill gaps now in more places. It can make mentorship harder for both mentors and mentees. I spend a lot more time discussing theory with my young teammates now, to ensure they are prompting more aspects of optimality given specific situations.

I have no idea what employment will look like in a year, but I think I can confidently say that DB eng is a more durable skillset than higher-level engineering skillsets, due to the additional dimensions of complexity, specification, interaction across disparate layers that must be aligned to achieve compositional properties etc...

These are the things I focus on with the people I mentor:

  • how to be friendly with people you might disagree with, everyone can teach you something and if you can navigate uncertainty and stress in a socially graceful way you will go farther than most
  • everything in the normal literature that everyone recommends. Pavlo lectures, Database Internals book, Designing Data Intensive Applications, Brendan Gregg's books. All extremely relevant if not moreso today because the high level matters more than basic coding.
  • queuing theory basics
  • how different data structures interact from the point of view of read amplifaction, write amplification, space amplification, cache amplification
  • experimental design
  • STAMP, STPA, safety-critical engineering approaches that are increasingly relevant to general software engineering because the tooling is free
  • temporal logic, SMT solvers, logic in general, TLA+, P, Z3, Lean
  • the history of systems engineering, unix wars, the shift from machine code to "pseudocode" in the 50s, c10k, how the missile programs in the 50s and 60s led to safety engineering and getting humans into space while controlling the complex component interactions, how the past always repeats itself, how disks are faster, then network is faster, then compute is faster, then memory is bigger, and how some algorithms remain relevant and others are forgotten, only to be rediscovered later when the geometry between these resources shifts. Knowing the history of our field lets you predict the future successfully.
  • discrete optimization
  • scheduling theory, topics in operations research related to binpacking
  • lock free programming
  • how consensus works and a rough sense of the variants of paxos, etc...

With the exception of the formal methods-y stuff, most of these things are really about learning how to specify rather than specific tooling. Now it's more important to know how to specify correct behavior in a rigorous way than being an expert at spotting subtle C++ iterator invalidation bugs.

Re: your question about "are there actual roles" absolutely, there are lots of companies that employ dozens, hundreds, or thousands of people work on databases. HOWEVER, hiring is slow right now due to interest rates spiking and some amount of fear in the economy overall. It's easier to join small companies right now than huge ones.

Re: pay - it depends where you live, what your experience is, what skills you have that they don't have (pick some of the ones in my list above, these are things most engineers never learn and then you have a real advantage and a reason to be hired even if you haven't been building databases for 20 years). Some people get paid a few hundred US dollars per month, some people get paid a few hundred thousand US dollars per month. I have a few friends who work remotely who got pretty lucky with choosing to work at a company that paid most of the salary in stock, and then the stock value multiplied several times after they started, so they could buy several homes per year if they wanted. It's rare but it absolutely happens. This is a field with a high ceiling if you're good and ambitious.

Welcome to the field, and I hope it's fun for you!

3

u/diagraphic 19d ago

I'll answer your first question: Yes, absolutely. More you learn, the less storage systems are black boxes.

2

u/dolstoyevski 19d ago

My job is not focused on database development but I do it very seriously as a side hustle. My job is mostly backend, infra and data engineering and ai could almost do 100% of it. I have a key value storage engine that I built and building a database is a different beast. It requires managing a gigantic problem while maintaining a reasonable complexity level. AI certainly isn't there yet, but I can't say for sure that it never will be.

1

u/mdhesari 19d ago

Work on your personal branding while learning it. Write articles about what you learn. Try to turn your knowledge into real work by open source projects and contributions and have a strategy to integrate your work with AI. You will have no problem in the future.