应用程序开发人员常见的数据库开发错误有哪些?
当前回答
我不得不说,应用程序开发人员犯的最大错误是没有正确地规范化数据库。
作为一名应用程序开发人员,我意识到正确的数据库结构、规范化和维护的重要性;我花了无数的时间自学数据库结构和管理。根据我的经验,每当我开始与不同的开发人员合作时,我通常必须重组整个数据库并更新应用程序以适应,因为它通常是畸形的和有缺陷的。
For example, I started working with a new project where the developer asked me to implement Facebook Connect on the site. I cracked open the database to see what I had to work with and saw that every little bit of information about any given user was crammed into one table. It took me six hours to write a script that would organize the table into four or five separate tables and another two to get the app to use those tables. Please, normalize your databases! It will make everything else less of a headache.
其他回答
因为“它太神奇了”或“不在我的数据库中”这样的原因,而放弃像Hibernate这样的ORM。 过度依赖像Hibernate这样的ORM,并试图将它硬塞到不合适的地方。
我不得不说,应用程序开发人员犯的最大错误是没有正确地规范化数据库。
作为一名应用程序开发人员,我意识到正确的数据库结构、规范化和维护的重要性;我花了无数的时间自学数据库结构和管理。根据我的经验,每当我开始与不同的开发人员合作时,我通常必须重组整个数据库并更新应用程序以适应,因为它通常是畸形的和有缺陷的。
For example, I started working with a new project where the developer asked me to implement Facebook Connect on the site. I cracked open the database to see what I had to work with and saw that every little bit of information about any given user was crammed into one table. It took me six hours to write a script that would organize the table into four or five separate tables and another two to get the app to use those tables. Please, normalize your databases! It will make everything else less of a headache.
使用Excel存储(大量)数据。
我曾见过一些公司拥有数千行并使用多个工作表(由于以前版本的Excel的行数限制为65535)。
Excel非常适合用于报告、数据演示和其他任务,但不应被视为数据库。
认为他们是dba和数据建模师/设计人员,而他们在这些领域没有任何正式的灌输。 认为他们的项目不需要DBA,因为这些东西都很简单/琐碎。 未能正确区分应该在数据库中完成的工作和应该在应用程序中完成的工作。 未验证备份,或未备份。 在他们的代码中嵌入原始SQL。
使用一些疯狂的构造和应用逻辑,而不是简单的COALESCE。