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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Two common mistakes when using databases

19 点作者 muriithi大约 17 年前

2 条评论

xirium大约 17 年前
Portability shouldn't be under-estimated. An ex-colleague had the opportunity to re-write a bad implementation. After gathering the requirements, he had a very nice specification which was portable, lightweight and extensible. Then management wanted to add direct SQL access because old systems had this feature and that made them fast. My ex-colleague didn't want to budge on this issue because the direct access was the reason for the re-write. Management wouldn't budge on the issue either because they were former techies and that's how stuff was implemented on less powerful hardware. Anyhow, the fellow got frustrated and quit. That's how he became an ex-colleague.
评论 #126604 未加载
Tichy大约 17 年前
"Every single element in a relation (aka table) has to be exactly the same type- no superclasses, no variant types."<p>Hibernate offers several ways to deal with subclassing. It is also not just dumping objects in the database, like the person in the discussion does, it is mapping the objects to database tables.<p>True, there may be things databases are not good at (recursion), but overall, in my experience the mapping from objects to database works really well and feels quite natural.