|
Post by rubina9898 on Dec 24, 2023 22:13:25 GMT -5
RTeduced to the first normal form looks as follows. Table normalized to first normal form Other examples often occurring in databases where it is worth using the first normal form are the division of the name and surname field into two separate ones or the already mentioned division of the address into street and city. Second normal form. The first condition necessary to meet the assumptions of the second normal form is to satisfy the first normal form . The second necessary condition is that all columns Phone Number List in the table must depend on the primary key . I am presenting an example of a table that does not conform to second normal form. table before reducing to second normal form The table presented contains data regarding orders in the online store. First normal form is satisfied because each column is atomic. However the presented table contains far too much unrelated data. First of all customer data i.e. name surname address and city should be separated into a separate table. For simplicity let's assume that one order can contain only one product. In such a case instead of the product name and its price the table should contain a foreign key pointing to the record in the product table. The table with orders after normalization looks as follows. Table reduced to second normal form All data not related to orders has been moved to other tables and only foreign keys are stored in the order.
|
|