Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 829 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
829
Dung lượng
15,02 MB
Nội dung
[...]... First Normal Form (1NF) 2.2.1 Note on Repeated Groups Second Normal Form (2NF) Third Normal Form (3NF) Elementary Key Normal Form (EKNF) Boyce-Codd Normal Form (BCNF) Fourth Normal Form (4NF) Fifth Normal Form (5NF) Domain-Key Normal Form (DKNF) Practical Hints for Normalization Key Types 2.11.1 Natural Keys 2.11.2 Artificial Keys 2.11.3 Exposed Physical Locators 2.11.4 Practical Hints for Denormalization... the ANSI/ISO Standard SQL- 92 is still the common subset that will port across various SQL products to do useful work In fact, the U.S Government described the SQL- 99 standard as “a standard in progress” and required SQL- 92 conformance for federal contracts The reason for the loyalty to SQL- 92 is simple The FIPS-127 conformance test suite was in place during the development of SQL- 92, so all the vendors... SQL for Smarties, ISBN 1-55860-920-2) because there was enough material to justify it I have included a short mention of some techniques here, but not at the detailed level offered in the other book I put programming tips for newbies into a separate book (Joe Celko’s SQL Programming Style, ISBN 1-12088-797-5) This book is an advanced programmer’s book, and I assume that the reader is writing real SQL, ... Normalization, and Advanced Database Topics Books on SQL- 92 and SQL- 99 Standards and Related Groups Web Sites Related to SQL Statistics Temporal Databases New Citations 761 761 761 762 763 763 764 765 765 766 766 768 768 769 769 770 771 771 772 772 773 774 Index 777 About the Author 810 Introduction to the Third Edition T HIS BOOK, LIKE THE first and second editions before it, is for the working SQL programmer... Creation The major problem in learning SQL is that programmers are used to thinking in terms of files rather than tables Programming languages are usually based on some underlying model; if you understand the model, the language makes much more sense For example, FORTRAN is based on algebra This does not mean that FORTRAN is exactly like algebra But if you know algebra, FORTRAN does not look all that strange... have never seen before Programmers are used to working with files in almost every other programming language The design of files was derived from paper forms; they are very physical and very dependent on the host programming language A COBOL file could not easily be read by a FORTRAN program, and vice versa In fact, it was hard to share files even among programs written in the same programming language!... “Personnel,” for the table name 5 Use the same name for the same attribute everywhere in the schema That is, do not name a column in one table “sex” and a column in another table “gender” when they refer to the same property You should have a data dictionary that enforces this on your developers 6 Use singular attribute names for columns and other scalar schema objects I have a separate book on SQL programming. .. and so forth This is usually a “DBA-only” statement that, for obvious reasons, programmers are not typically allowed to use ALTER TABLE The ALTER TABLE statement adds, removes, or changes columns and constraints within a table This statement is in Standard SQL; it existed in most SQL products before it was standardized It is still implemented in many different ways, so you should see your product for. .. SQL- 92, so all the vendors could move in the same direction Unfortunately, the Clinton administration canceled the program, and conformity began to drift Michael M Gorman, the President of Whitemarsh Information Systems Corporation and secretary of INCITS H2 for more than 20 years, has a great essay on this and other political aspects of SQL s history at www.wiscorp.com; it is worth reading 1.2 What... The model for SQL is data kept in sets, not in physical files The “unit of work” in SQL is the whole schema, not individual tables Sets are those mathematical abstractions you studied in school Sets are not ordered, and the members of a set are all of the same type When you perform an operation on a set, the action happens “all at once” to the entire membership of the set That is, if I ask for the subset . CELKO’S SQL FOR SMARTIES: ADVANCED SQL PROGRAMMING THIRD EDITION The Morgan Kaufmann Series in Data Management Systems Series Editor: Jim Gray, Microsoft Research • Joe Celko’s SQL for. B. Zdonik and David Maier JOE CELKO’S SQL FOR SMARTIES: ADVANCED SQL PROGRAMMING THIRD EDITION Joe Celko Publishing Director Michael Forster Publisher Diane Cerra Publishing Services. Techniques with Java Implementations , Ian Witten and Eibe Frank • Joe Celko’s SQL for Smarties: Advanced SQL Programming , Second Edition, Joe Celko • Joe Celko’s Data and Databases: Concepts