TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: Resources for Learning about Databases

100 pointsby ud0over 5 years ago
I recently got a Frontend Engineering offer from Facebook. I have dabbled in backend work earlier in my carrier but never did anything beyond simple API’s on a single server. I set a goal for myself that every year I pick a computer science topic &amp; study it thoroughly. I dont have a CS background but I am begining to love CS.<p>I started with Data Structures &amp; Algorithms last year, studied &amp; did over 250 leets, this is why I was able to land an offer with FAANG.<p>Next on my list is Databases, I want to know how they work internally, build a simple RDBS from scratch, learn SQL(I know simple CRUD operations) advanced concepts like procedures &amp; the latest that is being used today.<p>I have googled yes, but I havent found any resource that meets my needs. I also plan to switch to backend soon.<p>Thanks in advance<p>Edit: I know I will not be building databases at Facebook, &amp; I also know they probably have internal tools or ORM to access databases. My goal is not to become a database developer but to have a good knowledge of how they work just to satisfy my curiosity.

19 comments

petepeteover 5 years ago
It gets recommended all the time in these kind of threads, but it&#x27;s so good I don&#x27;t care. Bill Karwin&#x27;s SQL Antipatterns. You need a decent understanding of the basics to get the most from it, but there&#x27;s some excellent information and examples of what to (and what not to) do.<p><a href="https:&#x2F;&#x2F;www.oreilly.com&#x2F;library&#x2F;view&#x2F;sql-antipatterns&#x2F;9781680500073&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.oreilly.com&#x2F;library&#x2F;view&#x2F;sql-antipatterns&#x2F;978168...</a>
photon_linesover 5 years ago
Great intro and overview: <a href="http:&#x2F;&#x2F;coding-geek.com&#x2F;how-databases-work&#x2F;" rel="nofollow">http:&#x2F;&#x2F;coding-geek.com&#x2F;how-databases-work&#x2F;</a><p>Great book: <a href="https:&#x2F;&#x2F;dataintensive.net&#x2F;" rel="nofollow">https:&#x2F;&#x2F;dataintensive.net&#x2F;</a><p>Also great read and overview: <a href="http:&#x2F;&#x2F;www.redbook.io&#x2F;" rel="nofollow">http:&#x2F;&#x2F;www.redbook.io&#x2F;</a><p>Great paper over-viewing the architecture of a DB: <a href="https:&#x2F;&#x2F;perspectives.mvdirona.com&#x2F;content&#x2F;binary&#x2F;ArchitectureOfDatabaseSystem.pdf" rel="nofollow">https:&#x2F;&#x2F;perspectives.mvdirona.com&#x2F;content&#x2F;binary&#x2F;Architectur...</a><p>If you&#x27;re looking into building your own database, there are some great open source projects you can reference here: <a href="https:&#x2F;&#x2F;github.com&#x2F;danistefanovic&#x2F;build-your-own-x#build-your-own-database" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;danistefanovic&#x2F;build-your-own-x#build-you...</a><p>If you want to actually dive into source code - SQLite is amazing. It has very clean and readable code, so I&#x27;d suggest using it as a reference as well: <a href="https:&#x2F;&#x2F;github.com&#x2F;mackyle&#x2F;sqlite" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;mackyle&#x2F;sqlite</a>
lioetersover 5 years ago
Designing Data-Intensive Applications: The Big Ideas Behind Reliable, Scalable, and Maintainable Systems<p><a href="https:&#x2F;&#x2F;dataintensive.net&#x2F;" rel="nofollow">https:&#x2F;&#x2F;dataintensive.net&#x2F;</a>
评论 #21037170 未加载
评论 #21036749 未加载
tonyover 5 years ago
Anything by Joe Celko: <i>SQL for Smarties</i>, <i>Trees and Hierarchies in SQL for Smarties</i>, Joe Celko<p>Also, the internals of Django ORM (<a href="https:&#x2F;&#x2F;github.com&#x2F;django&#x2F;django&#x2F;tree&#x2F;2.2.5&#x2F;django&#x2F;db&#x2F;models" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;django&#x2F;django&#x2F;tree&#x2F;2.2.5&#x2F;django&#x2F;db&#x2F;models</a>) and SQLAlchemy Core (<a href="https:&#x2F;&#x2F;github.com&#x2F;sqlalchemy&#x2F;sqlalchemy&#x2F;tree&#x2F;rel_1_3_8&#x2F;lib&#x2F;sqlalchemy&#x2F;sql" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;sqlalchemy&#x2F;sqlalchemy&#x2F;tree&#x2F;rel_1_3_8&#x2F;lib&#x2F;...</a>) and its dialects (<a href="https:&#x2F;&#x2F;github.com&#x2F;sqlalchemy&#x2F;sqlalchemy&#x2F;tree&#x2F;rel_1_3_8&#x2F;lib&#x2F;sqlalchemy&#x2F;dialects" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;sqlalchemy&#x2F;sqlalchemy&#x2F;tree&#x2F;rel_1_3_8&#x2F;lib&#x2F;...</a>) + ORM (<a href="https:&#x2F;&#x2F;github.com&#x2F;sqlalchemy&#x2F;sqlalchemy&#x2F;tree&#x2F;rel_1_3_8&#x2F;lib&#x2F;sqlalchemy&#x2F;orm" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;sqlalchemy&#x2F;sqlalchemy&#x2F;tree&#x2F;rel_1_3_8&#x2F;lib&#x2F;...</a>)
dominotwover 5 years ago
I have three things for you<p>1. Designing data intenstive applications<p>2. Database internals <a href="https:&#x2F;&#x2F;www.amazon.com&#x2F;Database-Internals-deep-dive-distributed-systems&#x2F;dp&#x2F;1492040347" rel="nofollow">https:&#x2F;&#x2F;www.amazon.com&#x2F;Database-Internals-deep-dive-distribu...</a><p>3. Andy Pavlo&#x27;s database course videos at cmu and guest lecture series <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;channel&#x2F;UCHnBsf2rH-K7pn09rb3qvkA" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;channel&#x2F;UCHnBsf2rH-K7pn09rb3qvkA</a>
cbanekover 5 years ago
I really suggest against building a database from scratch. It&#x27;s just too annoying, and there&#x27;s so much code to write (parser, storage, indexing, query planner, connections). If you&#x27;re interested in internals, I&#x27;d say look at the sqlite codebase instead: <a href="https:&#x2F;&#x2F;sqlite.org&#x2F;src&#x2F;doc&#x2F;trunk&#x2F;README.md" rel="nofollow">https:&#x2F;&#x2F;sqlite.org&#x2F;src&#x2F;doc&#x2F;trunk&#x2F;README.md</a> . If anything, reading code that works is probably more useful than writing code that almost certainly won&#x27;t without months and possibly years of effort.<p>A lot of the more complex database things are only really learned by having a large database system. Performance, distributed databases, and complex schemas come to mind here. Most of the times with simple examples, you&#x27;ll do something wrong performance wise, but you&#x27;ll never know because of the scale (such as forgetting an index, or doing a bad join).<p>Many times, you don&#x27;t need to know that much about database other than some basic SQL.
cozosover 5 years ago
These are more academic than practical (i.e. build a DB from scratch) but still interesting I think.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;rxin&#x2F;db-readings" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;rxin&#x2F;db-readings</a>
dbattagliaover 5 years ago
I found this an enjoyable resource for learning about one of the fundamentals of RDBMS, indices: <a href="https:&#x2F;&#x2F;use-the-index-luke.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;use-the-index-luke.com&#x2F;</a>
joddystreetover 5 years ago
anything on this channel - <a href="https:&#x2F;&#x2F;m.youtube.com&#x2F;channel&#x2F;UCHnBsf2rH-K7pn09rb3qvkA" rel="nofollow">https:&#x2F;&#x2F;m.youtube.com&#x2F;channel&#x2F;UCHnBsf2rH-K7pn09rb3qvkA</a> - CMU DATABASE GROUP. all thanks to - <a href="https:&#x2F;&#x2F;mobile.twitter.com&#x2F;andy_pavlo" rel="nofollow">https:&#x2F;&#x2F;mobile.twitter.com&#x2F;andy_pavlo</a> - Andy Pavlo - has a quote, something like &quot;I only love two things, my wife and the databases&quot;. Follow his lectures and read his suggested papers.
JacKTrocinskIover 5 years ago
I would pick one RDBMS and try to dissect it, there is a lot to chose from nowadays, you can check out db-engines to get a general sense of what&#x27;s out there:<p><a href="https:&#x2F;&#x2F;db-engines.com&#x2F;en&#x2F;ranking" rel="nofollow">https:&#x2F;&#x2F;db-engines.com&#x2F;en&#x2F;ranking</a><p>From what I have seen most enterprises today will be using Oracle or Microsoft, however PostgreSQL seems to have gained popularity with the web developer and small business crowd (as well as with the HN community). I have been an Oracle database developer since 2015 and would definitely recommend going that route if it interests you, at the very least it might be a good starting point because of the fantastic documentation, here&#x27;s a great guide I recommend to get you started with all the basic concepts:<p><a href="https:&#x2F;&#x2F;docs.oracle.com&#x2F;en&#x2F;database&#x2F;oracle&#x2F;oracle-database&#x2F;19&#x2F;cncpt&#x2F;index.html" rel="nofollow">https:&#x2F;&#x2F;docs.oracle.com&#x2F;en&#x2F;database&#x2F;oracle&#x2F;oracle-database&#x2F;1...</a>
评论 #21035958 未加载
dqpbover 5 years ago
Readings in Database Systems <a href="http:&#x2F;&#x2F;www.redbook.io&#x2F;" rel="nofollow">http:&#x2F;&#x2F;www.redbook.io&#x2F;</a>
jjirsaover 5 years ago
Alex’s book: <a href="https:&#x2F;&#x2F;www.databass.dev&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.databass.dev&#x2F;</a>
评论 #21102495 未加载
tmshover 5 years ago
AWS re:invent 2018 talks:<p><a href="https:&#x2F;&#x2F;youtu.be&#x2F;HaEPXoXVf2k" rel="nofollow">https:&#x2F;&#x2F;youtu.be&#x2F;HaEPXoXVf2k</a><p>He has a sequence of 2-3 great talks on DynamoDB, the history of relational databases and the rise of access-pattern oriented db design.
dantodorover 5 years ago
I back up the previous hints for Designing data intensive applications and Database internals. I would suggest also to look at Jepsen tests, <a href="https:&#x2F;&#x2F;aphyr.com&#x2F;tags&#x2F;jepsen" rel="nofollow">https:&#x2F;&#x2F;aphyr.com&#x2F;tags&#x2F;jepsen</a>, and Adrian Colyer&#x27;s blog, <a href="https:&#x2F;&#x2F;blog.acolyer.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;blog.acolyer.org&#x2F;</a>
winridover 5 years ago
You could port a database from one language to another as a learning exercise.
评论 #21037545 未加载
Vasloover 5 years ago
Anything with exercises and answers?
diehundeover 5 years ago
Andy Pavlo courses on youtube.
Takiyaover 5 years ago
Yes
amiroucheover 5 years ago
Do you want to build a database or use one?<p>Also prolly at Facebook they use some API to access the database.