软件世界网 购物 网址 三丰软件 | 小说 美女秀 图库大全 游戏 笑话 | 下载 开发知识库 新闻 开发 图片素材
多播视频美女直播
↓电视,电影,美女直播,迅雷资源↓
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
图片批量下载器
↓批量下载图片,美女图库↓
移动开发 架构设计 编程语言 Web前端 互联网
开发杂谈 系统运维 研发管理 数据库 云计算 Android开发资料
  软件世界网 -> 开发杂谈 -> DatabaseAsaFortress -> 正文阅读
开发杂谈 最新文章
BloomFilter
大学四年编程之历程
内核分析
造人论坛——意识的本质和一个人工脑模型
OFDM信号[matlab描述]
人类还会进化吗?
HDUACM1035RobotMotion简单模拟题
树、二叉树(二)
iisphpweb.config处理404,500等,跳转友好
DatabaseAsaFortress

[开发杂谈]DatabaseAsaFortress

  2015-08-09 14:01:31

?

Database As a Fortress


Dan Chak
THE dATABASE iS WHERE All oF THE dATA, both input by your employ- ees and collected from your customers, resides. User interfaces, business and application logic, and even employees will come and go, but your data lasts forever. Consequently, enough cannot be said about the importance of build- ing a solid data model from Day One.
The exuberance over agile techniques has left many thinking that it’s fine, or even preferable, to design applications as you go. Gone are the days of writ- ing complex, comprehensive technical designs up front! The new school says deploy early and often. A line of code in production is better than 10 in your head. It seems almost too good to be true, and where your data is concerned, it is.
While business rules and user interfaces do evolve rapidly, the structures and relationships within the data you collect often do not. Therefore, it is critical to have your data model defined right from the start, both structurally and analytically. Migrating data from one schema to another in situ is difficult at best, time consuming always, and error prone often. While you can suffer bugs temporarily at the application layer, bugs in the database can be disastrous. Finding and fixing a data-layer design problem does not restore your data once it has been corrupted.
A solid data model is one that guarantees security of today’s data, but is also extensible for tomorrow’s. Guaranteeing security means being impervious to bugs that will—despite your best efforts—be pervasive in an ever-changing application layer. It means enforcing referential integrity. It means building in domain constraints wherever they are known. It means choosing appropriate
?
??keys that help you ensure your data’s referential integrity and constraint satis- faction. Being extensible for tomorrow means properly normalizing your data so that you can easily add architectural layers upon your data model later. It means not taking shortcuts.
The database is the final gatekeeper of your precious data. The application layer, which is by design ephemeral, cannot be its own watchdog. For the data- base to keep proper guard, the data model must be designed to reject data that does not belong, and to prevent relationships that do not make sense. Keys, foreign key relationships, and domain constraints, when described in a schema, are succinct, easy to understand and verify, and ultimately self- documenting. Domain rules encoded in the data model are also physical and persistent; a change to application logic does not wash them away.
To get the most out of a relational database—to make it a true part of the application as opposed to simply a storehouse for application data—you need to have a solid understanding of what you are building from the start. As your product evolves, so too will the data layer, but at each phase of its evolution, it should always maintain its status as Fortress. If you trust it and bestow upon it the heavy responsibility of trapping bugs from other layers of your application, you will never be disappointed.
Dan Chak is the director of software development at CourseAdvisor Inc., a Wash- ington Post company. He is the author of Enterprise Rails (O’Reilly).
上一篇文章      下一篇文章      查看所有文章
2015-08-09 14:01:02  
360图书馆 论文大全 母婴/育儿 软件开发资料 网页快照 文字转语音 购物精选 软件 美食菜谱 新闻中心 电影下载 小游戏 Chinese Culture
生肖星座解梦 三沣玩客 拍拍 视频 开发 Android开发 站长 古典小说 网文精选 搜图网 天下美图 中国文化英文 多播视频 装修知识库
2017-1-18 20:03:59
多播视频美女直播
↓电视,电影,美女直播,迅雷资源↓
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
图片批量下载器
↓批量下载图片,美女图库↓
  网站联系: qq:121756557 email:121756557@qq.com  软件世界网 --