Changes between Version 12 and Version 13 of Normalization


Ignore:
Timestamp:
12/26/25 21:33:55 (7 days ago)
Author:
211101
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Normalization

    v12 v13  
    2525- Табелата има примарен композитен клуч(user_id, transaction_id, transaction_account_id, transaction_breakdown_id)
    2626- Нема повторувачки групи, сите што биле во денормализираната форма сега се во посебен ред
    27  
     27
     28==== R
    2829||= //user_id =||= //user_name =||= //email =||= //password =||= //transaction_account_id =||= //account_name =||= //balance =||= //transaction_id =||= //transaction_name =||= //amount =||= //net_amount =||= //date =||= //transaction_breakdown_id =||= //spent_amount =||= //earned_amount =||= //tag_id =||= //tag_name =||
    2930|| 1|| james || james@fein.com || $2y$10$rcqLdIzMcYfmGFWCP3kix.JNTOzjIp0xVehMd11wzaanAXUDFLQMu || 1|| credit card || 5000|| 1|| electricity bill || -1800|| -1800|| 18:03:25 Sep 26, 2025 || 1|| -1800|| 0|| 1|| bills ||
     
    5556- Секој од атрибутите кој не е клуч, зависи од целосниот примарен клуч - со тоа се спречуваат аномалии на внесување, бришење и менување
    5657
    57 ==== 1
     58==== R1
    5859
    5960{ user_id } → {user_name, email, password}
     
    6465|| 2 || anita || anita@fein.com || $2y$10$CsSsqA.FFhBR/TWCZCUWYOPxYA.HmGb7ULQPgJGhv3vQS2xRqluYm ||
    6566
    66 ==== 2
     67==== R2
    6768
    6869{transaction_account_id} → {account_name, balance, user_id}
    6970
    70 {transaction_account_id} → {user_id} → {user_name, email}
    71 
    72 ||= TRANSACTION_ACCOUNT_WITH_USER_DATA =||=  =||=  =||=  =||=  =||=  =||
    73 ||= //transaction_account_id =||= //account_name =||= //balance =||= //user_id =||= //user_name =||= //email ||
    74 || 1 || credit card || 5000 || 1 || james || james@fein.com ||
    75 || 2 || cash || 1200 || 1 || james || james@fein.com ||
    76 || 3 || debit card || 3200 || 2 || anita || anita@fein.com ||
    77 
    78 ==== 3
     71||= TRANSACTION_ACCOUNT =||=  =||=  =||= ||
     72||= //transaction_account_id =||= //account_name =||= //balance =||= //user_id ||
     73|| 1 || credit card || 5000 || 1 ||
     74|| 2 || cash || 1200 || 1 ||
     75|| 3 || debit card || 3200 || 2 ||
     76
     77==== R3
    7978
    8079{transaction_id} → {transaction_name, amount, net_amount, date, tag_id}
     
    8887|| 3 || nail polish || -200 || -200 || 19:31:32 Sep 12 2025 || 3 || beauty ||
    8988
    90 ==== 4
     89==== R4
    9190
    9291{transaction_breakdown_id} → {transaction_id, transaction_account_id, spent_amount, earned_amount}
     
    115114- Се отргнуваат транзитивните функционални зависности, со тоа се овозможува сите атрибути кои не се клучеви да зависат само од примарниот клуч и од никој друг атрибут
    116115
    117 ==== 1
     116==== R1
    118117
    119118{user_id} → {user_name, email, password}
     
    124123|| 2 || anita || anita@fein.com || $2y$10$CsSsqA.FFhBR/TWCZCUWYOPxYA.HmGb7ULQPgJGhv3vQS2xRqluYm ||
    125124
    126 ==== 2
     125==== R2
    127126
    128127{transaction_account_id} → {account_name, balance, user_id}
     
    134133|| 3 || debit card || 3200 || 2 ||
    135134
    136 ==== 3
     135==== R5
    137136
    138137{transaction_id} → {transaction_name, amount, net_amount, date}
     
    144143|| 3 || nail polish || -200 || -200 || 19:31:32 Sep 12 2025 ||
    145144
    146 ==== 4
     145{tag_id} → {tag_name}
     146
     147||= TAG =||=  =||
     148||= //tag_id =||= //tag_name =||
     149|| 1 || bills ||
     150|| 2 || food ||
     151|| 3 || beauty ||
     152
     153==== R4
    147154
    148155{transaction_breakdown_id} → {transaction_id, transaction_account_id, spent_amount, earned_amount}
     
    154161|| 3 || 3 || 3 || -200 || 0 ||
    155162
    156 ==== 5
    157 
    158 {tag_id} → {tag_name}
    159 
    160 ||= TAG =||=  =||
    161 ||= //tag_id =||= //tag_name =||
    162 || 1 || bills ||
    163 || 2 || food ||
    164 || 3 || beauty ||
    165 
    166 ==== 6
     163==== R6
    167164
    168165{transaction_id, tag_id} → {}