tailieunhanh - Joe Celko s SQL for Smarties - Advanced SQL Programming P10

Joe Celko s SQL for Smarties - Advanced SQL Programming P10. In the SQL database community, Joe Celko is a well-known columnist and purveyor of valuable insights. In Joe Celko's SQL for Smarties: Advanced SQL Programming, he picks up where basic SQL training and experience leaves many database professionals and offers tips, techniques, and explanations that help readers extend their capabilities to top-tier SQL programming. Although Celko denies that the book is about database theory, he nevertheless alludes to theory often to buttress his practical points. This title is not for novices, as the author points out. Instead, its intended audience. | 62 CHAPTER 2 NORMALIZATION 0. The Foundation Rule Yes there is a rule zero. For a system to qualify as a relational database management system that system must exclusively use its relational facilities to manage the database. SQL is not so pure on this rule since you can often do procedural things to the data. 1. The Information Rule This rule simply requires that all information in the database be represented in one and only one way namely by values in column positions within rows of tables. SQL is good here. 2. The Guaranteed Access Rule This rule is essentially a restatement of the fundamental requirement for primary keys. It states that every individual scalar value in the database must be logically addressable by specifying the name of the containing table the name of the containing column and the primary key value of the containing row. SQL follows this rule for tables that have a primary key but it does not require a table to have a key at all. 3. Systematic Treatment of NULL Values The DBMS is required to support a representation of missing information and inapplicable information that is systematic distinct from all regular values and independent of data type. It is also implied that such representations must be manipulated by the DBMS in a systematic way. SQL has a NULL that is used for both missing information and inapplicable information rather than having two separate tokens as Dr. Codd wished. 4. Active Online Catalog Based on the Relational Model The system is required to support an online in-line relational catalog that is accessible to authorized users by means of their regular query language. SQL does this. 5. The Comprehensive Data Sublanguage Rule The system must support at least one relational language that a has a linear syntax b can be used both interactively and within application programs and c supports data definition operations including view definitions data manipulation operations update as well as retrieval security and integrity .