<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-cn">
		<id>http://wiki.tomtalk.net/index.php?action=history&amp;feed=atom&amp;title=20%E4%B8%AA%E6%95%B0%E6%8D%AE%E5%BA%93%E8%AE%BE%E8%AE%A1%E6%9C%80%E4%BD%B3%E5%AE%9E%E8%B7%B5</id>
		<title>20个数据库设计最佳实践 - 版本历史</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.tomtalk.net/index.php?action=history&amp;feed=atom&amp;title=20%E4%B8%AA%E6%95%B0%E6%8D%AE%E5%BA%93%E8%AE%BE%E8%AE%A1%E6%9C%80%E4%BD%B3%E5%AE%9E%E8%B7%B5"/>
		<link rel="alternate" type="text/html" href="http://wiki.tomtalk.net/index.php?title=20%E4%B8%AA%E6%95%B0%E6%8D%AE%E5%BA%93%E8%AE%BE%E8%AE%A1%E6%9C%80%E4%BD%B3%E5%AE%9E%E8%B7%B5&amp;action=history"/>
		<updated>2026-04-24T05:56:47Z</updated>
		<subtitle>本wiki的该页面的版本历史</subtitle>
		<generator>MediaWiki 1.24.2</generator>

	<entry>
		<id>http://wiki.tomtalk.net/index.php?title=20%E4%B8%AA%E6%95%B0%E6%8D%AE%E5%BA%93%E8%AE%BE%E8%AE%A1%E6%9C%80%E4%BD%B3%E5%AE%9E%E8%B7%B5&amp;diff=5104&amp;oldid=prev</id>
		<title>2017年6月20日 (二) 00:35 Tom</title>
		<link rel="alternate" type="text/html" href="http://wiki.tomtalk.net/index.php?title=20%E4%B8%AA%E6%95%B0%E6%8D%AE%E5%BA%93%E8%AE%BE%E8%AE%A1%E6%9C%80%E4%BD%B3%E5%AE%9E%E8%B7%B5&amp;diff=5104&amp;oldid=prev"/>
				<updated>2017-06-20T00:35:39Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;←上一版本&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;2017年6月20日 (二) 00:35的版本&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第20行：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第20行：&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Image和blob字段不应该定义在常用的数据表中，否则会影响性能。&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Image和blob字段不应该定义在常用的数据表中，否则会影响性能。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# 范式（Normalization）要按照要求使用以提高性能。Normalization做的不够会导致数据冗余，而过度Normalization 会导致太多的join和数据表，这两种情况都会影响性能。&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# 范式（Normalization）要按照要求使用以提高性能。Normalization做的不够会导致数据冗余，而过度Normalization 会导致太多的join和数据表，这两种情况都会影响性能。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;多花点时间在数据库设计上，否则你将来会付出加倍的时间来偿还。（oschina.net虫虫译）&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;多花点时间在数据库设计上，否则你将来会付出加倍的时间来偿还。&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Tom</name></author>	</entry>

	<entry>
		<id>http://wiki.tomtalk.net/index.php?title=20%E4%B8%AA%E6%95%B0%E6%8D%AE%E5%BA%93%E8%AE%BE%E8%AE%A1%E6%9C%80%E4%BD%B3%E5%AE%9E%E8%B7%B5&amp;diff=4224&amp;oldid=prev</id>
		<title>Tom：创建页面，内容为“数据库设计是整个程序的重点之一，为了支持相关程序运行，最佳的数据库设计往往不可能一蹴而就，只能反复探寻并逐步求...”</title>
		<link rel="alternate" type="text/html" href="http://wiki.tomtalk.net/index.php?title=20%E4%B8%AA%E6%95%B0%E6%8D%AE%E5%BA%93%E8%AE%BE%E8%AE%A1%E6%9C%80%E4%BD%B3%E5%AE%9E%E8%B7%B5&amp;diff=4224&amp;oldid=prev"/>
				<updated>2015-07-04T10:55:04Z</updated>
		
		<summary type="html">&lt;p&gt;创建页面，内容为“数据库设计是整个程序的重点之一，为了支持相关程序运行，最佳的数据库设计往往不可能一蹴而就，只能反复探寻并逐步求...”&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;数据库设计是整个程序的重点之一，为了支持相关程序运行，最佳的数据库设计往往不可能一蹴而就，只能反复探寻并逐步求精，这是一个复杂的过程，也是规划和结构化数据库中的数据对象以及这些数据对象之间关系的过程。下面给出了20个数据库设计最佳实践，当然，所谓最佳，还是要看它是否适合你的程序。一起来了解了解吧。&lt;br /&gt;
&lt;br /&gt;
# 使用明确、统一的标明和列名，例如 School, SchoolCourse, CourceID。&lt;br /&gt;
# 数据表名使用单数而不是复数，例如 StudentCourse，而不是StudentCourses。&lt;br /&gt;
# 数据表名不要使用空格。&lt;br /&gt;
# 数据表名不要使用不必要的前缀或者后缀，例如使用School，而不是TblSchool，或者SchoolTable等等。&lt;br /&gt;
# 数据库中的密码要加密，到应用中再解密。 （其实就是散列存储、单向加密）&lt;br /&gt;
# 使用整数作为ID字段，也许现在没有这个必要，但是将来需要，例如关联表，索引等等。&lt;br /&gt;
# 使用整数字段做索引，否则会带来很大的性能问题 。&lt;br /&gt;
# 使用 bit 作为布尔字段，使用整数或者varcha是浪费。同时，这类字段应该以“Is”开头。&lt;br /&gt;
# 要经过认证才能访问数据库，不要给每一个用户管理员权限。&lt;br /&gt;
# 尽量避免使用“select *”，而使用“select [required_column_list]”以获得更好的性能。&lt;br /&gt;
# 假如程序代码比较复杂，使用ORM框架，例如hibernate，iBatis。ORM框架的性能问题可以通过详细的配置去解决。&lt;br /&gt;
# 分割不常使用的数据表到不同的物理存储以获得更好的性能。&lt;br /&gt;
# 对于关键数据库，使用安全备份系统，例如集群，同步等等。&lt;br /&gt;
# 使用外键，非空等限制来保证数据的完整性，不要把所有的东西都扔给程序。&lt;br /&gt;
# 缺乏数据库文档是致命的。你应该为你的数据库设计写文档，包括触发器、存储过程和其他脚本。&lt;br /&gt;
# 对于经常使用的查询和大型数据表，要使用索引。数据分析工具可以帮助你决定如何建立索引。&lt;br /&gt;
# 数据库服务器和网页服务器应该放在不同的机器上。这回提高安全性，并减轻CPU压力。&lt;br /&gt;
# Image和blob字段不应该定义在常用的数据表中，否则会影响性能。&lt;br /&gt;
# 范式（Normalization）要按照要求使用以提高性能。Normalization做的不够会导致数据冗余，而过度Normalization 会导致太多的join和数据表，这两种情况都会影响性能。&lt;br /&gt;
# 多花点时间在数据库设计上，否则你将来会付出加倍的时间来偿还。（oschina.net虫虫译）&lt;/div&gt;</summary>
		<author><name>Tom</name></author>	</entry>

	</feed>