MASTERING SQL SERVER 2000- P4

Tham khảo tài liệu 'mastering sql server 2000- p4', công nghệ thông tin, cơ sở dữ liệu phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | 120 CHAPTER 4 DATABASE DESIGN AND NORMALIZATION Third Normal Form The rules for Third Normal Form are that the database must be in Second Normal Form and that all nonkey fields must directly depend on the primary key. The most obvious violations of Third Normal Form are calculated fields. If you design an Invoice table that includes Quantity Price and TotalPrice fields with TotalPrice being simply Quantity multiplied by Price you ve violated Third Normal Form. You can derive the total price any time you need it by knowing the Quantity and Price values for the record. Storing it requires you to make multiple changes to keep the record self-consistent any time you must change one of these fields. Third Normal Form also helps you see that some tables need to be split into multiple pieces. For example in the Second Normal Form of the animal feed example if a supplier moved to a different city you d need to make changes to more than one row of the Feed table. This is an inefficient and potentially error-prone process. You re better off moving the list of suppliers and cities to its own table. Tables and show the animal feed database in Third Normal Form. Another way to think about Third Normal Form is that it s concerned with making each table contain information about only one thing. In the Second Normal Form version of these tables the Feed table contained both facts about feeds and facts about suppliers. Now the supplier facts are in their own table. There is still a SupplierName field in the Feed table because you still need to be able to trace the relationships between the tables and preserve referential integrity. Also you can use the Breed field in the Animal table and the Breed field in the Feed table to trace the relationships between animals and feeds. For example llamas eat pasture and llama feed. TABLE ANIMAL TABLE IN THIRD NORMAL FORM Name Breed Danny Horse Tango Scotty Genghis Llama Llama Goat BOYCE-CODD NORMAL FORM J 121 PART TABLE .

Không thể tạo bản xem trước, hãy bấm tải xuống
TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
Đã 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.