SQL VISUAL QUICKSTART GUIDE- P8

SQL VISUAL QUICKSTART GUIDE- P8:SQL (pronounced es-kyoo-el) is the standard programming language for creating, updating, and retrieving information that is stored in databases. With SQL, you can turn your ordinary questions (“Where do our customers live?”) into statements that your database system can understand (SELECT DISTINCT city, state FROM customers;) | Chapter 2 Normalization Other normal forms Higher levels of normalization exist but the relational model doesn t require or even mention them. They re useful in some cases to avoid redundancy. Briefly they are Boyce-Codd normal form is a more rigorous version of 3NF. BCNF deals with tables that have multiple candidate keys composite candidate keys or candidate keys that overlap. A table is in BCNF if every determinant is a candidate key. A determinant column is one on which some of the columns are fully functionally dependent. A table infourth normal form is in BCNF and has no multivalued dependencies MVDs . An MVD occurs when in a table containing at least three columns one column has multiple rows whose values match a value of a single row of one of the other columns. Suppose that employees can be assigned to multiple projects and each employee can have multiple skills. If you stuff all this information into a single table you must use all three attributes as the key because nothing less can identify a row uniquely. The relationship between emp_id and proj_id is an MVD because for each pair of emp_id skill_id values in the table only emp_id independent of skill_id determines the associated set of proj_id values. The relationship between emp_id and skill_id also is an MVD because the set of skill values for an emp_id proj_id pair always depends on only emp_id. To transform a table with MVDs to 4NF move each MVD pair to a new table. A table in fifth normal form is in 4NF and has no join dependencies which are generalizations of MVDs. The aim of 5NF is to have tables that can t be decomposed further into any number of smaller tables. The redundancies and anomalies that 5NF cures are rare and unintuitive. In real databases you ll see 1NF 2NF 3NF and occasionally 4NF. 4NF and even 3NF tables almost always are 5NF too. Denormalization The increased number of tables that normalization generates might sway you to denormalize your database to speed queries because having

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU XEM NHIỀU
TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
57    147    3    29-03-2024
153    54    1    29-03-2024
8    76    2    29-03-2024
111    288    5    29-03-2024
Đã 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.