TAILIEUCHUNG - Microsoft SQL Server 2008 R2 Unleashed- P88

Microsoft SQL Server 2008 R2 Unleashed- P88:SQL Server 2005 provided a number of significant new features and enhancements over what was available in SQL Server 2000. This is not too surprising considering there was a five-year gap between these major SQL Server 2008 is not as much of a quantum leap forward from SQL Server 2005 | 814 CHAPTER 26 Implementing Data Integrity FIGURE A primary key example. storage. This is particularly important when the primary key is CLUSTERED as in the case of PK_Employee_BusinessEntityID. The key values from the clustered index are used by all nonclustered indexes as lookup keys. If the clustered key is large this consumes more space and affects performance. Surrogate keys are often good choices for primary keys. The BusinessEnityID column in the table is an example of a surrogate key. Surrogate keys consist of a single column that automatically increments and is inherently unique as in the case of an identity column. Surrogate keys are good candidates for primary keys because they are implicitly unique and relatively short in length. You should avoid using large multicolumn indexes as primary keys. They can impede performance because fewer index rows can be stored on each index page. The performance implications related to primary key indexes and other indexes are discussed in more detail in Chapter 34 Data Structures Indexes and Performance. NOTE Over the years there has been much debate over the use of surrogate keys for primary keys. One school of thought is to avoid surrogate keys because insertions always occur at the end of the primary key index and are not distributed. This can lead to hot spots in the index because the insert activity is always on the last page of the index. In addition surrogate keys have no real meaning and are less intuitive than primary keys that have meaning such as lastname and firstname. Download from Using Constraints 815 The other school of thought in favor of using surrogate keys for primary keys emphasizes the importance of defining primary keys that are not based on meaningful columns. If meaningful columns are used and the definitions of those columns change this can have a significant impact on the table that contains the primary key and any tables related to it. Those in .

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.