搜索


会员资源切换至【手机版】

切换本帖至【手机版】


开启左侧

SQL与关系理论 SQL Relational Theory C.J. Date 清晰版[PDF]

[复制链接]
发表于 2021-8-9 22:55:53 | 显示全部楼层 |阅读模式

游客,本帖隐藏的内容需要积分高于 1 才可浏览,您当前积分为 0


资源信息:



中文名


: SQL与关系理论


原名


: SQL&Relational Theory


作者


: C.J. Date


资源格式


: PDF


版本


: 清晰版


出版社


: O'Reilly Media


书号


: 0596523068


发行时间


: 2009年


地区


: 美国


语言


: 英文


概述


:




内容简介


: 自E.F Codd于1969年首次定义关系模式以来,数据库理论与实践就一直在发展。本书独立于任何SQL,产品,描绘了关系数据库理论十几年来的研究进展,为读者介绍了有关关系数据库理论的最新知识。任何具有一定SQL知识的人都可以从中的很多方面受益。C.J. Date于1970的早期在IBM开始从事数据库方面工作。他是一个多产的作者,其著名的教材是“An Introduction to Database Systems(Addison-Wesley)”,该书被广泛地认为是关于数据库管理基础知识的最好教科书之一。数据库是否应该使用视图而不是基表来访问?数据库中的Null是否使你得到了错误的答案,为什么?关于Null,你又可以做些什么呢?是否可以编写一个SQL查询,通过这个查询,可以得到在同一个部门中同时工作超过六个月的员工?SQL支持“量化的比较”,但是最好避免使用它们。为什么?你又该如何来避免使用它们?约束是非常重要的,但是大部分的SQL一产品都没有恰当地支持它们。为了解决这个问题,你能做些什么呢? 在关系数据库系统中,SQL已经成为了事实标准。SQL语言使用非常广泛,现在流行的所有数据库系统几乎都支持SQL。但是,SQL难以使用,它非常复杂,并且很令人费解。本书主要介绍了关系数据库的原理与SQL的内在关系,阐述了该如何把关系理论直接应用到SQL的应用中,并通过大量的例子以及对其背后理论解释,帮助读者编写出高效而精确的SQL代码。全书由12章和4个附录组成,每章后面都给出了一定的练习题,帮助读者巩固所学的内容,并在附录C中给出了这些练习题的答案,因此极大地方便了读者的学习和使用。 Understanding SQL's underlying theory is the best way to guarantee that your SQL code is correct and your database schema is robust and maintainable. On the other hand, if you're not well versed in the theory, you can fall into several traps. In SQL and Relational Theory, author C.J. Date demonstrates how you can apply relational theory directly to your use of SQL. With numerous examples and clear explanations of the reasoning behind them, you'll learn how to deal with common SQL dilemmas, such as: Should database access granted be through views instead of base tables? Nulls in your database are causing you to get wrong answers. Why? What can you do about it? Could you write an SQL query to find employees who have never been in the same department for more than six months at a time? SQL supports "quantified comparisons," but they're better avoided. Why? How do you avoid them? Constraints are crucially important, but most SQL products don't support them properly. What can you do to resolve this situation? Database theory and practice have evolved since Edgar Codd originally defined the relational model back in 1969. Independent of any SQL products, SQL and Relational Theory draws on decades of research to present the most up-to-date treatment of the material available anywhere. Anyone with a modest to advanced background in SQL will benefit from the many insights in this book.


内容截图


:




目录


: Chapter 1 Setting the Scene The Relational Model Is Much Misunderstood Some Remarks on Terminology Principles, Not Products A Review of the Original Model Model vs. Implementation Properties of Relations Base vs. Derived Relations Relations vs. Relvars Values vs. Variables Concluding Remarks Exercises Chapter 2 Types and Domains Types and Relations Equality Comparisons Data Value Atomicity What's a Type? Scalar vs. Nonscalar Types Scalar Types in SQL Type Checking and Coercion in SQL Collations in SQL Row and Table Types in SQL Concluding Remarks Exercises Chapter 3 Tuples and Relations, Rows and Tables What's a Tuple? Rows in SQL What's a Relation? Relations and Their Bodies Relations Are n-Dimensional Relational Comparisons TABLE_DUM and TABLE_DEE Tables in SQL Column Naming in SQL Concluding Remarks Exercises Chapter 4 No Duplicates, No Nulls What's Wrong with Duplicates? Duplicates: Further Issues Avoiding Duplicates in SQL What's Wrong with Nulls? Avoiding Nulls in SQL A Remark on Outer Join Concluding Remarks Exercises Chapter 5 Base Relvars, Base Tables Data Definitions Updating Is Set Level Relational Assignment More on Candidate Keys More on Foreign Keys Relvars and Predicates Relations vs. Types Exercises Chapter 6 SQL and Relational Algebra I: The Original Operators Some Preliminaries More on Closure Restriction Projection Join Union, Intersection, and Difference Which Operators Are Primitive? Formulating Expressions a Step at a Time What Do Relational Expressions Mean? Evaluating SQL Table Expressions Expression Transformation The Reliance on Attribute Names Exercises Chapter 7 SQL and Relational Algebra II: Additional Operators Semijoin and Semidifference Extend Image Relations Divide Aggregate Operators Image Relations bis Summarization Summarization bis Group and Ungroup "What If" Queries What About ORDER BY? Exercises Chapter 8 SQL and Constraints Type Constraints Type Constraints in SQL Database Constraints Database Constraints in SQL Transactions Why Database Constraint Checking Must Be Immediate But Doesn't Some Checking Have to Be Deferred? Constraints and Predicates Miscellaneous Issues Exercises Chapter 9 SQL and Views Views Are Relvars Views and Predicates Retrieval Operations Views and Constraints Update Operations What Are Views For? Views and Snapshots Exercises Chapter 10 SQL and Logic Simple and Compound Propositions Simple and Compound Predicates Quantification Relational Calculus More on Quantification Some Equivalences Concluding Remarks Exercises Chapter 11 Using Logic to Formulate SQL Expressions Some Transformation Laws Example 1: Logical Implication Example 2: Universal Quantification Example 3: Implication and Universal Quantification Example 4: Correlated Subqueries Example 5: Naming Subexpressions Example 6: More on Naming Subexpressions Example 7: Dealing with Ambiguity Example 8: Using COUNT Example 9: Join Queries Example 10: UNIQUE Quantification Example 11: ALL or ANY Comparisons Example 12: GROUP BY and HAVING Exercises Chapter 12 Miscellaneous SQL Topics SELECT * Explicit Tables Name Qualification Range Variables Subqueries "Possibly Nondeterministic" Expressions Empty Sets A BNF Grammar for SQL Table Expressions Exercises Appendix The Relational Model The Relational Model vs. Others The Relational Model Defined Objectives of the Relational Model Some Database Principles What Remains to Be Done? Appendix Database Design Theory The Place of Design Theory Functional Dependencies and Boyce/Codd Normal Form Join Dependencies and Fifth Normal Form Two Cheers for Normalization Orthogonality Some Remarks on Physical Design Concluding Remarks Exercises Appendix Answers to Exercises Chapter 1 Chapter 2 Chapter 3 Chapter 4 Chapter 5 Chapter 6 Chapter 7 Chapter 8 Chapter 9 Chapter 10 Chapter 11 Chapter 12 Appendix Suggestions for Further Reading Colophon

主题推广




回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

切换至【手机版】| 主站| Archiver|

JS of wanmeiff.com and vcpic.com Please keep this copyright information, respect of, thank you!JS of wanmeiff.com and vcpic.com Please keep this copyright information, respect of, thank you!

|网站地图

GMT+8, 2026-3-23 23:53 , Processed in 1.348307 second(s), 124 queries .

 

快速回复 返回顶部 返回列表