TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

What is your goto RDBMS pattern book?

32 点作者 scalatohaskell超过 8 年前
What could you recommend someone with brief understanding of RDBMS but is interested in how to properly design tables, in some real world scenarios - i.e. messaging table, append only without indices so it inserts are super fast, and attached triggers to process, or this table with job queue... or some scenarios like these... I know we have kafka / elastic search / redis etc., but I'd still be interested if I want to keep infrastructure as lightweight as possible, what would be the patterns to do it in lets say Postgres.

3 条评论

tom_b超过 8 年前
I&#x27;ve never come across a great book of relational models specific to domains.<p>My favorite general db book is Database Systems: The Complete Book (DS:CB), by Hector Garcia-Molina, Jeff Ullman, and Jennifer Widom. This is a good book for learning about relational modeling and how to normalize a model so that your eventual schema has as few dependencies between entities as possible. I taught an introductory class where the required (by the department) textbook was Foundations of Database Systems by Elmasri. It&#x27;s definitely not my favorite book, but if you skim chapter 3 on entity-relational modeling and then chapter 9 on converting an entity-relational model to a relational model suitable for an RDBMs, that is a useful starting place. When I was teaching the class, I often had to go back to the Garcia-Molina,Ullman, Widom book for simple and clear language around concepts for my lectures.<p>I&#x27;ll second the recommendation for Joe Celko&#x27;s books for general SQL programming.
kogir超过 8 年前
The problem you&#x27;ll find is that job queues, message queues, etc are actually edge cases. You can implement them in a DB, sure, but to do so with acceptable performance will require deep knowledge of the storage engine, query planner, locking, and DB specific extensions.<p>For just one example: <a href="https:&#x2F;&#x2F;www.mssqltips.com&#x2F;sqlservertip&#x2F;1257&#x2F;processing-data-queues-in-sql-server-with-readpast-and-updlock&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.mssqltips.com&#x2F;sqlservertip&#x2F;1257&#x2F;processing-data-...</a><p>I can&#x27;t find the article, but I remember reading that to get acceptable performance in SQL Server Service Broker it (under the hood) actually padded rows to ensure there was only one item per page on disk (or something similarly implementation specific to SQL Server).
Cieplak超过 8 年前
I&#x27;ve heard people recommend <i>SQL for Smarties</i>. The Postgres docs are pretty awesome, but you sort of need to know what you&#x27;re looking for before jumping in. You can also find schemas on Github and study living examples.