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.

Two common mistakes when using databases

19 pointsby muriithiabout 17 years ago

2 comments

xiriumabout 17 years ago
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 未加载
Tichyabout 17 years ago
"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.