| | 51 | ==== DELIVERY ADDRESS |
| | 52 | |
| | 53 | ||= // client_id =||= // address =|| |
| | 54 | || 1 || st.Partizanska 10, 1000 Skopje || |
| | 55 | || 2 || st.Turisticka 5,7000 Bitola || |
| | 56 | || 3 || st.Ilindenska 20, 1000 Skopje || |
| | 57 | |
| | 58 | == STORE |
| | 59 | |
| | 60 | ||=// store_ID =||=// store_name =||=// store_rating =|| |
| | 61 | || 001 || WoodCraft Skopje || 4.6 || |
| | 62 | || 002 || Fox Crochets || 4.8 || |
| | 63 | |
| | 64 | |
| | 65 | == PRODUCT |
| | 66 | |
| | 67 | ||=// product_code =||=// description =||=// price =||=// weight =||=// delivery_cost =|| |
| | 68 | || 00100001 || Handmade wooden chair with oak wood || 700 || 2.5 || 50 || |
| | 69 | || 00200001 || Heart crochet || 50 || 0.2 || 0 || |
| | 70 | || 00200002 || Decorative wall hanging made with beads || 350 || 0.75 || 0 || |
| | 73 | == PRODUCT COLORS |
| | 74 | |
| | 75 | ||=// product_code =||=// description =||=// price =||=// weight =||=// delivery_cost =|| |
| | 76 | || 00100001 || Handmade wooden chair with oak wood || 700 || 2.5 || 50 || |
| | 77 | || 00200001 || Heart crochet || 150 || 0.2 || 0 || |
| | 78 | || 00200002 || Decorative wall hanging made with beads || 199 || 0.75 || 0 || |
| | 79 | |
| | 80 | == PRODUCT IMAGES |
| | 81 | |
| | 82 | ||=// product_code =||=// image =|| |
| | 83 | || 00100001 || chair.jpg || |
| | 84 | || 00200001 || crochet-heart-red.jpg || |
| | 85 | || 00200001 || crochet-heart-blue.jpg || |
| | 86 | || 00200002 || wall_hanging.jpg || |
| | 87 | |
| | 88 | |
| | 89 | == ORDER |
| | 90 | |
| | 91 | ||=// order_num =||=// clien_ID =||=// status =||=// payment =||=// discount =|| |
| | 92 | || 0012025000001 || 2 || Delivered || Cash || 4 || |
| | 93 | || 0022025000001 || 1 || Placed Order || Credit Card || 0 || |
| | 94 | || 0022025000002 || 1 || Packaging || PayPal || 0 || |
| | 95 | || 0012025000002 || 3 || Packaging || Credit Card || 5 || |
| | 96 | || 0022025000003 || 1 || Placed Order || Credit Card || 2 || |
| | 97 | |
| | 98 | |
| | 99 | == ORDER PRODUCTS |
| | 100 | |
| | 101 | || order_num || product_code || quantity || |
| | 102 | || 0012025000001 || 00100001 || 1 || |
| | 103 | || 0022025000001 || 00200002 || 2 || |
| | 104 | || 0022025000002 || 00200001 || 3 || |
| | 105 | || 0012025000002 || 00100001 || 1 || |
| | 106 | || 0012025000002 || 00200001 || 1 || |
| | 107 | || 0022025000003 || 00200002 || 1 || |
| | 108 | |
| | 109 | |
| | 110 | == REVIEW |
| | 111 | |
| | 112 | ||=// order_num =||=// rating =||=// comment =|| |
| | 113 | || 0012025000001 || 4.0 || Great quality, slightly late delivery || |
| | 114 | || 0022025000001 || 5.0 || Excellent craftsmanship || |
| | 115 | || 0022025000002 || 5.0 || Beautiful handmade product || |
| | 116 | || 0012025000002 || 5.0 || Very satisfied || |
| | 117 | || 0022025000003 || 5.0 || Wonderful decoration || |
| | 118 | |
| | 119 | |
| | 120 | == REQUEST |
| | 121 | |
| | 122 | ||=// request_num =||=// client_ID =||=// problem =|| |
| | 123 | || 001112025001 || 2 || Late delivery || |
| | 124 | || 002122025001 || 3 || Military discount || |
| | 125 | || 003122025001 || 3 || Packaging question || |
| | 126 | || 004122025001 || 1 || Shipping question || |
| | 127 | |
| | 128 | |
| | 129 | == REPORT |
| | 130 | |
| | 131 | ||=// store_ID =||=// date =||=// overall_profit =||=// monthly_profit =||=// sales_trend =|| |
| | 132 | || 001 || 2024-11-30 || 125000 || 12500 || Increasing || |
| | 133 | || 002 || 2024-11-30 || 98000 || 8000 || Stable || |
| | 134 | |
| | 135 | |
| | 136 | ==== Explanataion: UNF -> 1NF |
| | 137 | |
| | 138 | The denormalized table violated First Normal Form because several attributes stored multiple values in a single cell. Examples include product colors, product images, multiple products in one order, and multiple stores associated with an order. These repeating groups made the data difficult to search, update, and maintain. |
| | 139 | |
| | 140 | To convert the database into First Normal Form, all repeating groups were removed and each attribute was made atomic. Separate tables were created for product colors, product images, delivery addresses, order contents, and reviews. Each row now contains only one value for every attribute, eliminating multi-valued cells and ensuring that every record can be uniquely identified by a primary key. |
| | 141 | |
| | 142 | Although the database is now in First Normal Form, redundancy still exists. For example, client information is repeated in the Order table, and product details are repeated whenever the same product appears in different orders. These partial dependencies will be removed when converting the schema to Second Normal Form (2NF). |
| | 143 | |